feat: elk leerpad is zichtbaar in sidebar
This commit is contained in:
parent
a11440e18f
commit
84ef0e4af0
2 changed files with 14 additions and 17 deletions
|
@ -4,6 +4,7 @@ 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 { ref } from 'vue';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
|
@ -12,7 +13,9 @@ import UsingQueryResult from "@/components/UsingQueryResult.vue";
|
|||
activeObjectId: string
|
||||
}>();
|
||||
|
||||
const learningObjectListQueryResult = useLearningObjectListForPathQuery(props.path);
|
||||
const currentPath = ref(props.path)
|
||||
|
||||
const learningObjectListQueryResult = useLearningObjectListForPathQuery(currentPath);
|
||||
|
||||
console.log(learningObjectListQueryResult.data.value)
|
||||
|
||||
|
@ -21,7 +24,7 @@ import UsingQueryResult from "@/components/UsingQueryResult.vue";
|
|||
<template>
|
||||
<main>
|
||||
<div>{{path.title}}</div>
|
||||
<template>
|
||||
<div>
|
||||
<using-query-result
|
||||
:query-result="learningObjectListQueryResult"
|
||||
v-slot="learningObjects: { data: LearningObject[] }"
|
||||
|
@ -36,7 +39,7 @@ import UsingQueryResult from "@/components/UsingQueryResult.vue";
|
|||
</v-list-item>
|
||||
</template>
|
||||
</using-query-result>
|
||||
</template>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -194,21 +194,15 @@
|
|||
</template>
|
||||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
<div v-if="props.learningObjectHruid">
|
||||
<DiscussionSideBarElement
|
||||
:path="(learningPathQueryResult.data.value as LearningPath)"
|
||||
:activeObjectId="props.learningObjectHruid">
|
||||
</DiscussionSideBarElement>
|
||||
<div>
|
||||
<using-query-result
|
||||
:query-result="learningObjectListQueryResult"
|
||||
v-slot="learningObjects: {data: LearningObject[]}">
|
||||
<v-list-item
|
||||
link
|
||||
:to="{ path: learningObject.key, query: route.query }"
|
||||
:title="learningObject.title"
|
||||
:active="learningObject.key === props.learningObjectHruid"
|
||||
v-for="learningObject in learningObjects.data">
|
||||
</v-list-item>
|
||||
:query-result="allLearningPathsResult"
|
||||
v-slot="learningPaths: {data: LearningPath[]}">
|
||||
<DiscussionSideBarElement
|
||||
v-for="learningPath in learningPaths.data"
|
||||
:path="learningPath"
|
||||
:activeObjectId="props.learningObjectHruid as string">
|
||||
</DiscussionSideBarElement>
|
||||
</using-query-result>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue