fix: bust completion data on feedback submit so that it gets reloaded automatically
This commit is contained in:
parent
3c7b88ae73
commit
53a3a67fef
|
|
@ -8,6 +8,8 @@ import { useRouteQuery } from "@vueuse/router";
|
|||
import log from "loglevel";
|
||||
import { computed, onMounted, reactive, ref } from "vue";
|
||||
import { useCourseSessionDetailQuery, useCurrentCourseSession } from "@/composables";
|
||||
import { bustItGetCache } from "@/fetchHelpers";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
|
||||
const props = defineProps<{
|
||||
content: LearningContentFeedbackVV | LearningContentFeedbackUK;
|
||||
|
|
@ -131,6 +133,9 @@ function mutateFeedback(data: FeedbackData, submit = false) {
|
|||
feedbackSubmitted.value =
|
||||
result.data?.send_feedback?.feedback_response?.submitted || false;
|
||||
}
|
||||
bustItGetCache(
|
||||
`/api/course/completion/${courseSession.value.id}/${useUserStore().id}/`
|
||||
);
|
||||
})
|
||||
.catch((e) => log.error(e));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue