From b92ac8b08aa86be558befb8967598c4d968d3889 Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Thu, 15 Jun 2023 12:05:20 +0200 Subject: [PATCH] Add duedates to frontend --- .../LearningPathAppointmentsMock.vue | 57 +++++++++++++++---- client/src/types.ts | 11 ++++ server/vbv_lernwelt/duedate/models.py | 2 +- 3 files changed, 58 insertions(+), 12 deletions(-) diff --git a/client/src/pages/learningPath/learningPathPage/LearningPathAppointmentsMock.vue b/client/src/pages/learningPath/learningPathPage/LearningPathAppointmentsMock.vue index b0816122..22fb8516 100644 --- a/client/src/pages/learningPath/learningPathPage/LearningPathAppointmentsMock.vue +++ b/client/src/pages/learningPath/learningPathPage/LearningPathAppointmentsMock.vue @@ -1,13 +1,48 @@ + + diff --git a/client/src/types.ts b/client/src/types.ts index 547abd8b..c9cd0b80 100644 --- a/client/src/types.ts +++ b/client/src/types.ts @@ -442,6 +442,7 @@ export interface CourseSession { assignment_details_list: CourseSessionAssignmentDetails[]; documents: CircleDocument[]; users: CourseSessionUser[]; + duedates: DueDate[]; } export type Role = "MEMBER" | "EXPERT" | "TUTOR"; @@ -556,3 +557,13 @@ export interface UserAssignmentCompletionStatus { completion_status: AssignmentCompletionStatus; evaluation_grade: number | null; } + +export type DueDate = { + id: number; + start: Date; + end: Date; + title: string; + url: string; + course_session: number | null; + page: number | null; +}; diff --git a/server/vbv_lernwelt/duedate/models.py b/server/vbv_lernwelt/duedate/models.py index 884fa9be..0b375c5c 100644 --- a/server/vbv_lernwelt/duedate/models.py +++ b/server/vbv_lernwelt/duedate/models.py @@ -17,7 +17,7 @@ class DueDate(models.Model): course_session = models.ForeignKey( 'course.CourseSession', on_delete=models.CASCADE, - related_name='events', + related_name='duedates', null=True, blank=True, )