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;
}>();
const learningObjectsQuery = useLearningObjectListForPathQuery(props.path);
const learningObjects = useLearningObjectListForPathQuery(props.path);
</script>
<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
:query-result="learningObjectsQuery"
:query-result="learningObjects"
v-slot="learningObjects: { data: LearningObject[] }"
>
<template
@ -46,9 +40,6 @@
</v-list-item>
</template>
</using-query-result>
</v-lazy>
</v-expansion-panel-text>
</v-expansion-panel>
</template>
<style scoped></style>

View file

@ -43,12 +43,21 @@
:query-result="allLearningPathsResult"
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
v-for="learningPath in learningPaths.data"
:path="learningPath"
:activeObjectId="props.learningObjectHruid"
:key="learningPath.hruid"
/>
</v-lazy>
</v-expansion-panel-text>
</v-expansion-panel>
</using-query-result>
</v-expansion-panels>
</div>