chore(frontend): Tweaks

This commit is contained in:
Tibo De Peuter 2025-05-19 20:53:05 +02:00
parent e28a57754f
commit f5bf11d812
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
3 changed files with 30 additions and 76 deletions

View file

@ -1,11 +1,11 @@
<script setup lang="ts">
import type { LearningObject } from "@/data-objects/learning-objects/learning-object";
import type { LearningPath } from "@/data-objects/learning-paths/learning-path";
import { useLearningObjectListForPathQuery } from "@/queries/learning-objects";
import { useRoute } from "vue-router";
import UsingQueryResult from "@/components/UsingQueryResult.vue";
import type { LearningObject } from '@/data-objects/learning-objects/learning-object';
import type { LearningPath } from '@/data-objects/learning-paths/learning-path';
import { useLearningObjectListForPathQuery } from '@/queries/learning-objects';
import { useRoute } from 'vue-router';
import UsingQueryResult from '@/components/UsingQueryResult.vue';
const route = useRoute();
const route = useRoute();
const props = defineProps<{
path: LearningPath;
@ -19,6 +19,7 @@
{{ path.title }}
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-lazy>
<using-query-result
:query-result="useLearningObjectListForPathQuery(props.path)"
v-slot="learningObjects: { data: LearningObject[] }"
@ -33,12 +34,13 @@
path: `/discussion-reload/${props.path.hruid}/${node.language}/${node.key}`,
query: route.query,
}"
:title="node.title"
:active="node.key === props.activeObjectId"
>
</v-list-item>
</template>
</using-query-result>
:title="node.title"
:active="node.key === props.activeObjectId"
>
</v-list-item>
</template>
</using-query-result>
</v-lazy>
</v-expansion-panel-text>
</v-expansion-panel>
</template>