fix: workaround voor queries die niet opnieuw ingesteld worden in SingleDiscussion
This commit is contained in:
parent
8c16d57eea
commit
0c1b87ea99
3 changed files with 36 additions and 1 deletions
|
@ -30,7 +30,7 @@ import { ref } from 'vue';
|
||||||
<template v-for="node in learningObjects.data">
|
<template v-for="node in learningObjects.data">
|
||||||
<v-list-item
|
<v-list-item
|
||||||
link
|
link
|
||||||
:to="{ path: `/discussion/${currentPath.hruid}/${node.language}/${node.key}`, query: route.query }"
|
:to="{ path: `/discussion-reload/${currentPath.hruid}/${node.language}/${node.key}`, query: route.query }"
|
||||||
:title="node.title"
|
:title="node.title"
|
||||||
:active="node.key === props.activeObjectId"
|
:active="node.key === props.activeObjectId"
|
||||||
>
|
>
|
||||||
|
|
|
@ -14,6 +14,7 @@ import UserHomePage from "@/views/homepage/UserHomePage.vue";
|
||||||
import SingleTheme from "@/views/SingleTheme.vue";
|
import SingleTheme from "@/views/SingleTheme.vue";
|
||||||
import LearningObjectView from "@/views/learning-paths/learning-object/LearningObjectView.vue";
|
import LearningObjectView from "@/views/learning-paths/learning-object/LearningObjectView.vue";
|
||||||
import authService from "@/services/auth/auth-service";
|
import authService from "@/services/auth/auth-service";
|
||||||
|
import DiscussionForward from "@/views/discussions/DiscussionForward.vue";
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(import.meta.env.BASE_URL),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
|
@ -106,6 +107,13 @@ const router = createRouter({
|
||||||
props: true,
|
props: true,
|
||||||
meta: { requiresAuth: true },
|
meta: { requiresAuth: true },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/discussion-reload/:hruid/:language/:learningObjectHruid",
|
||||||
|
name: "DiscussionForwardWorkaround",
|
||||||
|
component: DiscussionForward,
|
||||||
|
props: true,
|
||||||
|
meta: { requiresAuth: true },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/learningPath",
|
path: "/learningPath",
|
||||||
children: [
|
children: [
|
||||||
|
|
27
frontend/src/views/discussions/DiscussionForward.vue
Normal file
27
frontend/src/views/discussions/DiscussionForward.vue
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type { Language } from '@/data-objects/language';
|
||||||
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
hruid: string;
|
||||||
|
language: Language;
|
||||||
|
learningObjectHruid?: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const discussionURL = "/discussion"
|
||||||
|
+ "/" + props.hruid
|
||||||
|
+ "/" + props.language
|
||||||
|
+ "/" + props.learningObjectHruid
|
||||||
|
|
||||||
|
router.replace(discussionURL);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<main></main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Loading…
Add table
Add a link
Reference in a new issue