Add comment because of load workaround in cockpit
This commit is contained in:
parent
b36754991e
commit
0df74774d0
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import {
|
||||
useCourseSessionDetailQuery,
|
||||
useCourseDataWithCompletion,
|
||||
useCourseSessionDetailQuery,
|
||||
} from "@/composables";
|
||||
import { useCockpitStore } from "@/stores/cockpit";
|
||||
import * as log from "loglevel";
|
||||
|
|
@ -27,11 +27,14 @@ onMounted(async () => {
|
|||
props.courseSlug,
|
||||
courseSessionDetailResult.findCurrentUser()
|
||||
);
|
||||
|
||||
// workaround so that the completion data is loaded before display
|
||||
const userDataPromises = courseSessionDetailResult.filterMembers().map((m) => {
|
||||
const completionData = useCourseDataWithCompletion(props.courseSlug, m.id);
|
||||
return completionData.resultPromise;
|
||||
});
|
||||
await Promise.all(userDataPromises);
|
||||
|
||||
loaded.value = true;
|
||||
} catch (error) {
|
||||
log.error(error);
|
||||
|
|
|
|||
Loading…
Reference in New Issue