Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Chronos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Chronos
Commits
e819ee3b
Verified
Commit
e819ee3b
authored
5 months ago
by
permcu
Committed by
Jonathan Weth
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Implement rudimentary substitutions-list
parent
2e38ae32
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!373
Resolve "Substitutions table for new data model"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/chronos/frontend/components/Substitutions.vue
+51
-18
51 additions, 18 deletions
aleksis/apps/chronos/frontend/components/Substitutions.vue
with
51 additions
and
18 deletions
aleksis/apps/chronos/frontend/components/Substitutions.vue
+
51
−
18
View file @
e819ee3b
...
...
@@ -4,46 +4,79 @@ import CRUDList from "aleksis.core/components/generic/CRUDList.vue";
<
template
>
<c-r-u-d-list
headers=
"headers"
show-select=
"false"
enable-create=
"false"
enable-edit=
"false"
:gql-query=
"query"
:gql-additional-query-args=
"
{ date: date }"
:get-gql-data="prepareList"
:headers="headers"
:show-select="false"
:enable-create="false"
:enable-edit="false"
/>
</c-r-u-d-list>
</
template
>
<
script
>
import
{
substitutionsForDate
}
from
"
./substitutions.graphql
"
;
import
{
DateTime
}
from
"
luxon
"
;
export
default
{
name
:
"
Substitutions
"
,
props
:
{
date
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
query
:
substitutionsForDate
,
affectedTeachers
:
[],
affectedGroups
:
[],
// TODO: i18n
headers
:
[
{
text
:
value
:
text
:
"
groups
"
,
value
:
"
groups
"
,
},
{
text
:
value
:
text
:
"
time
"
,
value
:
"
time
"
,
},
{
text
:
value
:
text
:
"
teachers
"
,
value
:
"
teachers
"
,
},
{
text
:
value
:
text
:
"
subject
"
,
value
:
"
subject
"
,
},
{
text
:
value
:
text
:
"
room
"
,
value
:
"
room
"
,
},
{
text
:
value
:
text
:
"
notes
"
,
value
:
"
notes
"
,
},
],
};
},
}
},
methods
:
{
prepareList
(
data
)
{
this
.
affectedTeachers
=
data
.
affectedTeachers
;
this
.
affectedGroups
=
data
.
affectedGroups
;
return
data
.
substitutions
.
map
((
sub
)
=>
{
return
{
groups
:
sub
.
oldGroups
[
0
].
shortName
,
time
:
sub
.
startTime
,
teachers
:
sub
.
oldTeachers
[
0
].
shortName
,
subject
:
sub
.
oldSubject
,
room
:
sub
.
oldRooms
[
0
].
shortName
,
notes
:
sub
.
comment
,
};
});
},
},
};
</
script
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment