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
0face6f9
Verified
Commit
0face6f9
authored
5 months ago
by
permcu
Committed by
Jonathan Weth
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Implement time-field
parent
f25e699b
No related branches found
No related tags found
1 merge request
!373
Resolve "Substitutions table for new data model"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/chronos/frontend/components/Substitutions.vue
+16
-0
16 additions, 0 deletions
aleksis/apps/chronos/frontend/components/Substitutions.vue
aleksis/apps/chronos/schema/__init__.py
+4
-4
4 additions, 4 deletions
aleksis/apps/chronos/schema/__init__.py
with
20 additions
and
4 deletions
aleksis/apps/chronos/frontend/components/Substitutions.vue
+
16
−
0
View file @
0face6f9
...
...
@@ -23,6 +23,22 @@ import CRUDList from "aleksis.core/components/generic/CRUDList.vue";
v-for=
"g in oldGroups"
>
{{
g
.
shortName
}}
</span>
</
template
>
<
template
#time=
"{ item: { startSlot, endSlot, startTime, endTime } }"
>
<span
v-if=
"startSlot && endSlot && startSlot === endSlot"
>
{{
startSlot
}}
.
</span>
<span
v-else-if=
"startSlot && endSlot"
>
{{
startSlot
}}
.–
{{
endSlot
}}
.
</span>
<span
v-else-if=
"startTime && endTime"
>
{{
$d
(
new
Date
(
startTime
),
"
shortTime
"
)
}}
–
{{
$d
(
new
Date
(
endTime
),
"
shortTime
"
)
}}
</span>
<span
v-else
>
TODO 18n all day
</span>
</
template
>
</c-r-u-d-list>
</template>
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/chronos/schema/__init__.py
+
4
−
4
View file @
0face6f9
...
...
@@ -132,8 +132,8 @@ class SubstitutionType(graphene.ObjectType):
new_groups
=
graphene
.
List
(
GroupType
)
start_slot
=
graphene
.
Int
()
end_slot
=
graphene
.
Int
()
start_time
=
graphene
.
Time
()
end_time
=
graphene
.
Time
()
start_time
=
graphene
.
Date
Time
()
end_time
=
graphene
.
Date
Time
()
old_teachers
=
graphene
.
List
(
PersonType
)
new_teachers
=
graphene
.
List
(
PersonType
)
old_subject
=
graphene
.
String
()
...
...
@@ -163,10 +163,10 @@ class SubstitutionType(graphene.ObjectType):
return
root
[
'
REFERENCE_OBJECT
'
].
slot_number_end
def
resolve_start_time
(
root
,
info
):
return
root
[
'
DTSTART
'
].
dt
.
time
()
return
root
[
'
DTSTART
'
].
dt
def
resolve_end_time
(
root
,
info
):
return
root
[
'
DTEND
'
].
dt
.
time
()
return
root
[
'
DTEND
'
].
dt
def
resolve_old_teachers
(
root
,
info
):
le
=
root
[
'
REFERENCE_OBJECT
'
]
...
...
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