diff --git a/client/src/pages/CockpitPage.vue b/client/src/pages/CockpitPage.vue index 2556d10c..873f4dc0 100644 --- a/client/src/pages/CockpitPage.vue +++ b/client/src/pages/CockpitPage.vue @@ -37,7 +37,10 @@ onMounted(async () => {

Kurse

-
+

{{ courseSession.title }}

diff --git a/client/src/stores/completion.ts b/client/src/stores/completion.ts index 3d422aa6..04b81471 100644 --- a/client/src/stores/completion.ts +++ b/client/src/stores/completion.ts @@ -1,4 +1,4 @@ -import { itGetCached, itPost } from "@/fetchHelpers"; +import { bustItGetCache, itGetCached, itPost } from "@/fetchHelpers"; import type { BaseCourseWagtailPage, CourseCompletion } from "@/types"; import { defineStore } from "pinia"; @@ -32,8 +32,9 @@ export const useCompletionStore = defineStore({ completion_status: page.completion_status, }); - if (completionData) { + if (completionData && completionData.length > 0) { this.completionData = completionData; + bustItGetCache(`/api/course/completion/${completionData[0].course}/`); } return this.completionData || [];