diff --git a/client/src/composables.ts b/client/src/composables.ts index c733f092..6b6dc469 100644 --- a/client/src/composables.ts +++ b/client/src/composables.ts @@ -10,6 +10,7 @@ import { } from "@/services/circle"; import type { DashboardDueDate, DashboardPersonType } from "@/services/dashboard"; import { + courseIdForCourseSlug, fetchDashboardDueDates, fetchDashboardPersons, fetchStatisticData, @@ -613,10 +614,13 @@ export function useCourseCircleProgress(circles: Ref) return { inProgressCirclesCount, circlesCount }; } -export function useCourseStatisticsv2(courseId: string) { +export function useCourseStatisticsv2(courseSlug: string) { + const dashboardStore = useDashboardStore(); const courseStatistics = ref(null); const loading = ref(false); + const courseId = courseIdForCourseSlug(dashboardStore.dashboardConfigsv2, courseSlug); + const fetchData = async () => { loading.value = true; try { @@ -645,5 +649,6 @@ export function useCourseStatisticsv2(courseId: string) { loading, courseSessionName, circleMeta, + courseId, }; } diff --git a/client/src/pages/dashboard/statistic/AssignmentList.vue b/client/src/pages/dashboard/statistic/AssignmentList.vue index 179a2843..2b539e8a 100644 --- a/client/src/pages/dashboard/statistic/AssignmentList.vue +++ b/client/src/pages/dashboard/statistic/AssignmentList.vue @@ -1,5 +1,4 @@