+
diff --git a/client/src/router/index.ts b/client/src/router/index.ts
index cf027b4c..bf6758dd 100644
--- a/client/src/router/index.ts
+++ b/client/src/router/index.ts
@@ -65,6 +65,10 @@ const router = createRouter({
path: "/dashboard/persons",
component: () => import("@/pages/dashboard/DashboardPersonsPage.vue"),
},
+ {
+ path: "/dashboard/duedates",
+ component: () => import("@/pages/dashboard/DashboardDueDatesPage.vue"),
+ },
{
path: "/course/:courseSlug/media",
props: true,
diff --git a/client/src/services/dashboard.ts b/client/src/services/dashboard.ts
index 18d3526b..8367824f 100644
--- a/client/src/services/dashboard.ts
+++ b/client/src/services/dashboard.ts
@@ -13,6 +13,7 @@ import type {
CourseStatisticsType,
DashboardConfigType,
} from "@/gql/graphql";
+import type { DueDate } from "@/types";
export type DashboardPersonRoleType =
| "SUPERVISOR"
@@ -70,6 +71,11 @@ export type DashboardCourseConfigType = {
session_to_continue_id: string;
};
+export type DashboardDueDate = DueDate & {
+ course_session: DashboardPersonCourseSessionType;
+ translatedType: string;
+};
+
export const fetchStatisticData = async (
courseId: string
): Promise => {
@@ -144,6 +150,10 @@ export async function fetchDashboardPersons() {
return await itGetCached("/api/dashboard/persons/");
}
+export async function fetchDashboardDueDates() {
+ return await itGetCached("/api/dashboard/duedates/");
+}
+
export async function fetchDashboardConfigv2() {
return await itGetCached("/api/dashboard/config/");
}
diff --git a/server/vbv_lernwelt/dashboard/views.py b/server/vbv_lernwelt/dashboard/views.py
index 63cd447e..4a74ff53 100644
--- a/server/vbv_lernwelt/dashboard/views.py
+++ b/server/vbv_lernwelt/dashboard/views.py
@@ -275,7 +275,7 @@ def get_dashboard_due_dates(request):
"course_id": str(cs.course.id),
"course_title": cs.course.title,
"course_slug": cs.course.slug,
- "user_role": user_role(cs.roles),
+ "my_role": user_role(cs.roles),
"is_uk": cs.course.configuration.is_uk,
"is_vv": cs.course.configuration.is_vv,
}
@@ -445,7 +445,9 @@ def get_mentor_open_tasks_count(request, course_id: str):
return Response(
status=200,
data={
- "open_task_count": _get_mentor_open_tasks_count(course_id, request.user) # noqa
+ "open_task_count": _get_mentor_open_tasks_count(
+ course_id, request.user
+ ) # noqa
},
)
except PermissionDenied as e: