From d03f8431a8e29aebddfae710e23ba3c926ccdd15 Mon Sep 17 00:00:00 2001 From: Timo De Meyst Date: Fri, 9 May 2025 00:35:49 +0200 Subject: [PATCH 01/51] feat: discussions link veranderd --- frontend/src/router/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 359eab1a..7e74bbd9 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -100,9 +100,10 @@ const router = createRouter({ meta: { requiresAuth: true }, }, { - path: "/discussion/:id", + path: "/discussion/:hruid/:language/:learningObjectHruid", name: "SingleDiscussion", component: SingleDiscussion, + props: true, meta: { requiresAuth: true }, }, { From ab1c94f01235f110306caeaa967cbde865d219fa Mon Sep 17 00:00:00 2001 From: Timo De Meyst Date: Fri, 9 May 2025 00:36:35 +0200 Subject: [PATCH 02/51] feat: link naar discussions toegevoegd in leerpad pagina --- .../src/views/learning-paths/LearningPathPage.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/src/views/learning-paths/LearningPathPage.vue b/frontend/src/views/learning-paths/LearningPathPage.vue index 63f1b686..b799ea09 100644 --- a/frontend/src/views/learning-paths/LearningPathPage.vue +++ b/frontend/src/views/learning-paths/LearningPathPage.vue @@ -190,6 +190,13 @@ }); } } + + const discussionLink = computed(() => + "/discussion" + + "/" + props.hruid + + "/" + currentNode.value?.language + + "/" + currentNode.value?.learningobjectHruid); + From a3893ac1db1d6797314677d95aeefa833a4ad4b4 Mon Sep 17 00:00:00 2001 From: Timo De Meyst Date: Thu, 15 May 2025 16:59:03 +0200 Subject: [PATCH 16/51] style: enkel leerpad van huidig leerobject is volledig zichtbaar --- .../components/DiscussionSideBarElement.vue | 54 +++++++++++++++++-- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/DiscussionSideBarElement.vue b/frontend/src/components/DiscussionSideBarElement.vue index c58be8d1..476bbfb5 100644 --- a/frontend/src/components/DiscussionSideBarElement.vue +++ b/frontend/src/components/DiscussionSideBarElement.vue @@ -4,7 +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'; +import { computed, ref, watchEffect } from 'vue'; const route = useRoute(); @@ -17,12 +17,30 @@ import { ref } from 'vue'; const learningObjectListQueryResult = useLearningObjectListForPathQuery(currentPath); + let dropdownEnabled = ref(false); + + watchEffect(() => { + const objects = learningObjectListQueryResult.data.value as LearningObject[] | undefined; + + if (objects) { + const objectInThisPath = objects.some((obj) => obj.key === props.activeObjectId); + if (objectInThisPath) { + dropdownEnabled.value = true; + } + } + }); + + const toggleDropdown = () => { + dropdownEnabled.value = !dropdownEnabled.value; + console.log(dropdownEnabled.value) + } + - + From f3b4050f0da0b1f080e326e9c51a4ce7043dccb0 Mon Sep 17 00:00:00 2001 From: Timo De Meyst Date: Thu, 15 May 2025 17:02:20 +0200 Subject: [PATCH 17/51] style: antwoorden zijn duidelijker gescheiden van elkaar --- frontend/src/components/SingleQuestion.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/SingleQuestion.vue b/frontend/src/components/SingleQuestion.vue index daaf1e43..57d829af 100644 --- a/frontend/src/components/SingleQuestion.vue +++ b/frontend/src/components/SingleQuestion.vue @@ -131,6 +131,7 @@ :key="answerIndex" class="text-gray-600" > +
- - - - - - - - + + {{ t("discussions") }} + + From fe397c54e3cfbdf94a04dde63067f651363b8643 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Sat, 17 May 2025 15:16:13 +0200 Subject: [PATCH 25/51] chore(frontend): QandA i18n --- frontend/src/components/QandA.vue | 20 ++++++++++++-------- frontend/src/i18n/locale/de.json | 1 + frontend/src/i18n/locale/en.json | 1 + frontend/src/i18n/locale/fr.json | 1 + frontend/src/i18n/locale/nl.json | 1 + 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/QandA.vue b/frontend/src/components/QandA.vue index 07ae982d..ce9b6419 100644 --- a/frontend/src/components/QandA.vue +++ b/frontend/src/components/QandA.vue @@ -1,6 +1,9 @@ diff --git a/frontend/src/i18n/locale/de.json b/frontend/src/i18n/locale/de.json index f8c77685..e81e520c 100644 --- a/frontend/src/i18n/locale/de.json +++ b/frontend/src/i18n/locale/de.json @@ -128,5 +128,6 @@ "answer-input-placeholder": "Antwort...", "answers-toggle-hide": "Antworten verstecken", "answers-toggle-show": "Antworten anzeigen", + "no-questions": "Keine Fragen", "no-discussion-tip": "Wählen Sie ein Lernobjekt aus, um dessen Fragen anzuzeigen" } diff --git a/frontend/src/i18n/locale/en.json b/frontend/src/i18n/locale/en.json index a874c3a6..80a8d2c9 100644 --- a/frontend/src/i18n/locale/en.json +++ b/frontend/src/i18n/locale/en.json @@ -128,6 +128,7 @@ "answer-input-placeholder": "answer...", "answers-toggle-hide": "Hide answers", "answers-toggle-show": "Show answers", + "no-questions": "No questions asked yet", "no-discussion-tip": "Choose a learning object to view its questions" } diff --git a/frontend/src/i18n/locale/fr.json b/frontend/src/i18n/locale/fr.json index 5ab63b6b..156ffd36 100644 --- a/frontend/src/i18n/locale/fr.json +++ b/frontend/src/i18n/locale/fr.json @@ -128,5 +128,6 @@ "answer-input-placeholder": "réponse...", "answers-toggle-hide": "Masquer réponses", "answers-toggle-show": "Afficher réponse", + "no-questions": "Aucune question trouvée", "no-discussion-tip": "Sélectionnez un objet d'apprentissage pour afficher les questions qui s'y rapportent" } diff --git a/frontend/src/i18n/locale/nl.json b/frontend/src/i18n/locale/nl.json index d5e2ecfb..731b4e71 100644 --- a/frontend/src/i18n/locale/nl.json +++ b/frontend/src/i18n/locale/nl.json @@ -128,5 +128,6 @@ "answer-input-placeholder": "antwoord...", "answers-toggle-hide": "Verberg antwoorden", "answers-toggle-show": "Toon antwoorden", + "no-questions": "Nog geen vragen gesteld", "no-discussion-tip": "Kies een leerobject om zijn vragen te bekijken" } From 0d2b486a2cee2fa933e4d23f751ce824fe8a455b Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Sat, 17 May 2025 15:50:47 +0200 Subject: [PATCH 26/51] chore(frontend): DiscussionsSideBar component --- .../src/components/DiscussionsSideBar.vue | 66 +++ frontend/src/router/index.ts | 6 - .../src/views/discussions/NoDiscussion.vue | 64 +-- .../views/discussions/SingleDiscussion.vue | 511 +++++++++--------- 4 files changed, 317 insertions(+), 330 deletions(-) create mode 100644 frontend/src/components/DiscussionsSideBar.vue diff --git a/frontend/src/components/DiscussionsSideBar.vue b/frontend/src/components/DiscussionsSideBar.vue new file mode 100644 index 00000000..2aecfd5e --- /dev/null +++ b/frontend/src/components/DiscussionsSideBar.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 24998bc0..890ccf39 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -57,12 +57,6 @@ const router = createRouter({ name: "UserClasses", component: UserClasses, }, - // TODO Re-enable this route when the discussion page is ready - // { - // Path: "discussion", - // Name: "UserDiscussions", - // Component: UserDiscussions, - // }, ], }, diff --git a/frontend/src/views/discussions/NoDiscussion.vue b/frontend/src/views/discussions/NoDiscussion.vue index 93d21103..116ee1c5 100644 --- a/frontend/src/views/discussions/NoDiscussion.vue +++ b/frontend/src/views/discussions/NoDiscussion.vue @@ -1,47 +1,13 @@