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
bce6b8f6
Verified
Commit
bce6b8f6
authored
1 year ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Fix datetime handling
parent
6586e6cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!310
Resolve "Implement Vue substitution frontend"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/chronos/frontend/components/calendar_feeds/details/LessonDetails.vue
+4
-4
4 additions, 4 deletions
...ntend/components/calendar_feeds/details/LessonDetails.vue
aleksis/apps/chronos/schema/__init__.py
+0
-29
0 additions, 29 deletions
aleksis/apps/chronos/schema/__init__.py
with
4 additions
and
33 deletions
aleksis/apps/chronos/frontend/components/calendar_feeds/details/LessonDetails.vue
+
4
−
4
View file @
bce6b8f6
...
...
@@ -2,7 +2,8 @@
<base-calendar-feed-details
v-bind=
"$props"
:color=
"currentSubject ? currentSubject.colour_bg : null"
>
without-location
>
<template
#title
>
<div
:style=
"
{
...
...
@@ -232,9 +233,8 @@ export default {
return
{
...
item
,
amends
:
this
.
selectedEvent
.
meta
.
id
,
// LessonEvent has datetime in UTC & graphql does not like the Z timezone info
datetimeStart
:
this
.
selectedEvent
.
start
.
toISOString
().
replace
(
"
Z
"
,
""
),
datetimeEnd
:
this
.
selectedEvent
.
end
.
toISOString
().
replace
(
"
Z
"
,
""
),
datetimeStart
:
this
.
selectedEvent
.
startDateTime
.
toISO
(),
datetimeEnd
:
this
.
selectedEvent
.
endDateTime
.
toISO
(),
};
},
transformPatchData
(
item
)
{
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/chronos/schema/__init__.py
+
0
−
29
View file @
bce6b8f6
...
...
@@ -73,21 +73,6 @@ class AmendLessonCreateMutation(DjangoCreateMutation):
"
comment
"
,
)
@classmethod
def
handle_datetime_start
(
cls
,
value
,
name
,
info
)
->
int
:
value
=
value
.
replace
(
tzinfo
=
timezone
.
utc
)
return
value
@classmethod
def
handle_datetime_end
(
cls
,
value
,
name
,
info
)
->
int
:
value
=
value
.
replace
(
tzinfo
=
timezone
.
utc
)
return
value
@classmethod
def
before_save
(
cls
,
root
,
info
,
input
,
obj
):
obj
.
timezone
=
obj
.
amends
.
timezone
return
obj
class
AmendLessonPatchMutation
(
DjangoPatchMutation
):
class
Meta
:
...
...
@@ -95,20 +80,6 @@ class AmendLessonPatchMutation(DjangoPatchMutation):
permissions
=
(
"
chronos.edit_substitution_rule
"
,)
only_fields
=
(
"
subject
"
,
"
teachers
"
,
"
groups
"
,
"
rooms
"
,
"
cancelled
"
,
"
comment
"
)
@classmethod
def
handle_datetime_start
(
cls
,
value
,
name
,
info
)
->
int
:
value
=
value
.
replace
(
tzinfo
=
timezone
.
utc
)
return
value
@classmethod
def
handle_datetime_end
(
cls
,
value
,
name
,
info
)
->
int
:
value
=
value
.
replace
(
tzinfo
=
timezone
.
utc
)
return
value
@classmethod
def
before_save
(
cls
,
root
,
info
,
input
,
id
,
obj
):
obj
.
timezone
=
obj
.
amends
.
timezone
return
obj
class
TimetableType
(
graphene
.
Enum
):
...
...
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