fix(frontend): Alleen fetchen bij open

This commit is contained in:
Tibo De Peuter 2025-05-20 15:33:40 +02:00
parent a88390f46b
commit 4ca57d8b8c
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
2 changed files with 39 additions and 39 deletions

View file

@ -13,18 +13,12 @@
activeObjectId: string; activeObjectId: string;
}>(); }>();
const learningObjectsQuery = useLearningObjectListForPathQuery(props.path); const learningObjects = useLearningObjectListForPathQuery(props.path);
</script> </script>
<template> <template>
<v-expansion-panel :value="props.path.hruid">
<v-expansion-panel-title>
{{ path.title }}
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-lazy>
<using-query-result <using-query-result
:query-result="learningObjectsQuery" :query-result="learningObjects"
v-slot="learningObjects: { data: LearningObject[] }" v-slot="learningObjects: { data: LearningObject[] }"
> >
<template <template
@ -46,9 +40,6 @@
</v-list-item> </v-list-item>
</template> </template>
</using-query-result> </using-query-result>
</v-lazy>
</v-expansion-panel-text>
</v-expansion-panel>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -43,12 +43,21 @@
:query-result="allLearningPathsResult" :query-result="allLearningPathsResult"
v-slot="learningPaths: { data: LearningPath[] }" v-slot="learningPaths: { data: LearningPath[] }"
> >
<v-expansion-panel v-for="learningPath in learningPaths.data"
:key="learningPath.hruid"
:value="learningPath.hruid">
<v-expansion-panel-title>
{{ learningPath.title }}
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-lazy>
<DiscussionSideBarElement <DiscussionSideBarElement
v-for="learningPath in learningPaths.data"
:path="learningPath" :path="learningPath"
:activeObjectId="props.learningObjectHruid" :activeObjectId="props.learningObjectHruid"
:key="learningPath.hruid"
/> />
</v-lazy>
</v-expansion-panel-text>
</v-expansion-panel>
</using-query-result> </using-query-result>
</v-expansion-panels> </v-expansion-panels>
</div> </div>