From 20e2a2b1724c019fde09e44cb1d1555b4f3c2506 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 11 Nov 2024 17:03:30 +0100 Subject: [PATCH 01/32] Clean up router index, add route names --- client/src/router/index.ts | 474 ++++++++++++++++++++----------------- client/src/router/names.ts | 3 + 2 files changed, 254 insertions(+), 223 deletions(-) diff --git a/client/src/router/index.ts b/client/src/router/index.ts index a2118426..a24e53b2 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -14,9 +14,12 @@ import { addToHistory, setLastNavigationWasPush } from "@/router/history"; import { onboardingRedirect } from "@/router/onboarding"; import { createRouter, createWebHistory } from "vue-router"; import { + ATTENDANCE_ROUTE, CERTIFICATES_ROUTE, + COCKPIT_ROUTE, COMPETENCE_ROUTE, COMPETENCES_ROUTE, + DOCUMENTS_ROUTE, SELF_EVALUATION_ROUTE, SETTINGS_ROUTE, } from "./names"; @@ -86,88 +89,265 @@ const router = createRouter({ props: true, }, { - path: "/course/:courseSlug/media", + path: "/course/:courseSlug", props: true, - component: () => import("@/pages/mediaLibrary/MediaLibraryParentPage.vue"), children: [ { - path: "", - component: () => import("@/pages/mediaLibrary/MediaLibraryIndexPage.vue"), + path: "media", + component: () => import("@/pages/mediaLibrary/MediaLibraryParentPage.vue"), + children: [ + { + path: "", + component: () => import("@/pages/mediaLibrary/MediaLibraryIndexPage.vue"), + }, + { + path: ":categorySlug", + props: true, + component: () => + import("@/pages/mediaLibrary/MediaLibraryCategoryPage.vue"), + }, + { + path: ":categorySlug/:contentSlug", + props: true, + component: () => + import("@/pages/mediaLibrary/MediaLibraryContentPage.vue"), + }, + ], }, { - path: ":categorySlug", - props: true, - component: () => import("@/pages/mediaLibrary/MediaLibraryCategoryPage.vue"), + path: "competence", + component: () => import("@/pages/competence/CompetenceParentPage.vue"), + children: [ + { + path: "", + props: true, + name: COMPETENCE_ROUTE, + component: () => import("@/pages/competence/CompetenceIndexPage.vue"), + }, + { + path: "certificates", + name: CERTIFICATES_ROUTE, + props: true, + component: () => + import("@/pages/competence/CompetenceCertificateListPage.vue"), + }, + { + path: "certificates/:certificateSlug", + props: true, + component: () => + import("@/pages/competence/CompetenceCertificateDetailPage.vue"), + }, + { + name: SELF_EVALUATION_ROUTE, + path: "self-evaluation-and-feedback", + props: true, + component: () => + import("@/pages/competence/SelfEvaluationAndFeedbackPage.vue"), + }, + { + path: "competences", + name: COMPETENCES_ROUTE, + props: true, + component: () => + import("@/pages/competence/ActionCompetenceListPage.vue"), + }, + ], }, { - path: ":categorySlug/:contentSlug", + path: "learn", + children: [ + { + path: "", + component: () => + import("../pages/learningPath/learningPathPage/LearningPathPage.vue"), + }, + { + path: ":circleSlug", + component: () => + import("../pages/learningPath/circlePage/CirclePage.vue"), + props: true, + }, + { + path: ":circleSlug/evaluate/:learningUnitSlug", + component: () => + import( + "../pages/learningPath/selfEvaluationPage/SelfEvaluationPage.vue" + ), + props: true, + }, + { + path: ":circleSlug/:contentSlug", + component: () => + import( + "../pages/learningPath/learningContentPage/LearningContentPage.vue" + ), + props: true, + }, + ], + }, + { + path: "profile/:userId", + component: () => import("@/pages/userProfile/UserProfilePage.vue"), + children: [ + { + path: "learning-path", + component: () => + import("@/pages/userProfile/LearningPathProfilePage.vue"), + props: true, + name: "profileLearningPath", + meta: { + hideChrome: true, + showCloseButton: true, + }, + }, + { + path: "competence", + component: () => import("@/pages/userProfile/CompetenceProfilePage.vue"), + props: true, + name: "profileCompetence", + meta: { + hideChrome: true, + showCloseButton: true, + }, + children: [ + { + path: "", + name: "competenceMain", + component: () => + import( + "@/components/selfEvaluationFeedback/SelfEvaluationAndFeedbackOverview.vue" + ), + }, + { + path: "evaluations", + name: "competenceEvaluations", + component: () => + import( + "@/components/selfEvaluationFeedback/SelfEvaluationAndFeedbackList.vue" + ), + }, + { + path: "certificates/:certificateSlug", + name: "competenceCertificateDetail", + props: true, + component: () => + import("@/pages/competence/CompetenceCertificateDetailPage.vue"), + }, + { + path: "certificates", + name: "competenceCertificates", + component: () => + import("@/pages/competence/CompetenceCertificateListPage.vue"), + }, + ], + }, + ], + }, + { + path: "learning-mentor", + component: () => import("@/pages/learningMentor/mentor/MentorIndexPage.vue"), + name: "learningMentor", + children: [ + { + path: "", + component: () => + import("@/pages/learningMentor/mentor/MentorParticipantsPage.vue"), + name: "mentorsAndParticipants", + }, + { + path: "tasks", + component: () => + import("@/pages/learningMentor/mentor/MentorOverviewPage.vue"), + name: "learningMentorOverview", + }, + { + path: "self-evaluation-feedback/:learningUnitId", + component: () => + import("@/pages/learningMentor/mentor/SelfEvaluationFeedbackPage.vue"), + name: "mentorSelfEvaluationFeedback", + props: true, + }, + { + path: "details", + component: () => + import("@/pages/learningMentor/mentor/MentorDetailParentPage.vue"), + children: [ + { + path: "praxis-assignments/:praxisAssignmentId", + component: () => + import( + "@/pages/learningMentor/mentor/MentorPraxisAssignmentPage.vue" + ), + name: "learningMentorPraxisAssignments", + props: true, + }, + { + path: "self-evaluation-feedback-assignments/:learningUnitId", + component: () => + import( + "@/pages/learningMentor/mentor/MentorSelfEvaluationFeedbackAssignmentPage.vue" + ), + name: "learningMentorSelfEvaluationFeedbackAssignments", + props: true, + }, + ], + }, + ], + }, + { + path: "assignment-evaluation/:assignmentId/:userId", + component: () => + import("@/pages/assignmentEvaluation/AssignmentEvaluationPage.vue"), props: true, - component: () => import("@/pages/mediaLibrary/MediaLibraryContentPage.vue"), + }, + { + path: "cockpit", + name: "cockpit", + component: () => + import("@/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue"), + props: true, + children: [ + { + path: "", + component: () => + import("@/pages/cockpit/cockpitPage/CockpitExpertHomePage.vue"), + name: COCKPIT_ROUTE, + props: true, + }, + { + path: "profile/:userId/:circleSlug", + component: () => import("@/pages/cockpit/CockpitUserCirclePage.vue"), + props: true, + }, + { + path: "feedback/:circleId", + component: () => import("@/pages/cockpit/FeedbackPage.vue"), + props: true, + }, + { + path: "assignment/:assignmentId", + component: () => + import("@/pages/cockpit/assignmentsPage/AssignmentsPage.vue"), + props: true, + }, + { + path: "attendance", + component: () => + import("@/pages/cockpit/attendanceCheckPage/AttendanceCheckPage.vue"), + props: true, + name: ATTENDANCE_ROUTE, + }, + { + path: "documents", + component: () => import("@/pages/cockpit/documentPage/DocumentPage.vue"), + props: true, + name: DOCUMENTS_ROUTE, + }, + ], }, ], }, - { - path: "/course/:courseSlug/competence", - props: true, - component: () => import("@/pages/competence/CompetenceParentPage.vue"), - children: [ - { - path: "", - props: true, - name: COMPETENCE_ROUTE, - component: () => import("@/pages/competence/CompetenceIndexPage.vue"), - }, - { - path: "certificates", - name: CERTIFICATES_ROUTE, - props: true, - component: () => - import("@/pages/competence/CompetenceCertificateListPage.vue"), - }, - { - path: "certificates/:certificateSlug", - props: true, - component: () => - import("@/pages/competence/CompetenceCertificateDetailPage.vue"), - }, - { - name: SELF_EVALUATION_ROUTE, - path: "self-evaluation-and-feedback", - props: true, - component: () => - import("@/pages/competence/SelfEvaluationAndFeedbackPage.vue"), - }, - { - path: "competences", - name: COMPETENCES_ROUTE, - props: true, - component: () => import("@/pages/competence/ActionCompetenceListPage.vue"), - }, - ], - }, - { - path: "/course/:courseSlug/learn", - component: () => - import("../pages/learningPath/learningPathPage/LearningPathPage.vue"), - props: true, - }, - { - path: "/course/:courseSlug/learn/:circleSlug", - component: () => import("../pages/learningPath/circlePage/CirclePage.vue"), - props: true, - }, - { - path: "/course/:courseSlug/learn/:circleSlug/evaluate/:learningUnitSlug", - component: () => - import("../pages/learningPath/selfEvaluationPage/SelfEvaluationPage.vue"), - props: true, - }, - { - path: "/course/:courseSlug/learn/:circleSlug/:contentSlug", - component: () => - import("../pages/learningPath/learningContentPage/LearningContentPage.vue"), - props: true, - }, + { path: "/lernbegleitung/:courseId/invitation/:invitationId", component: () => import("@/pages/learningMentor/InvitationAcceptPage.vue"), @@ -178,158 +358,6 @@ const router = createRouter({ public: true, }, }, - { - path: "/course/:courseSlug/profile/:userId", - component: () => import("@/pages/userProfile/UserProfilePage.vue"), - props: true, - children: [ - { - path: "learning-path", - component: () => import("@/pages/userProfile/LearningPathProfilePage.vue"), - props: true, - name: "profileLearningPath", - meta: { - hideChrome: true, - showCloseButton: true, - }, - }, - { - path: "competence", - component: () => import("@/pages/userProfile/CompetenceProfilePage.vue"), - props: true, - name: "profileCompetence", - meta: { - hideChrome: true, - showCloseButton: true, - }, - children: [ - { - path: "", - name: "competenceMain", - component: () => - import( - "@/components/selfEvaluationFeedback/SelfEvaluationAndFeedbackOverview.vue" - ), - }, - { - path: "evaluations", - name: "competenceEvaluations", - component: () => - import( - "@/components/selfEvaluationFeedback/SelfEvaluationAndFeedbackList.vue" - ), - }, - { - path: "certificates/:certificateSlug", - name: "competenceCertificateDetail", - props: true, - component: () => - import("@/pages/competence/CompetenceCertificateDetailPage.vue"), - }, - { - path: "certificates", - name: "competenceCertificates", - component: () => - import("@/pages/competence/CompetenceCertificateListPage.vue"), - }, - ], - }, - ], - }, - { - path: "/course/:courseSlug/learning-mentor", - component: () => import("@/pages/learningMentor/mentor/MentorIndexPage.vue"), - props: true, - name: "learningMentor", - children: [ - { - path: "", - component: () => - import("@/pages/learningMentor/mentor/MentorParticipantsPage.vue"), - name: "mentorsAndParticipants", - }, - { - path: "tasks", - component: () => - import("@/pages/learningMentor/mentor/MentorOverviewPage.vue"), - name: "learningMentorOverview", - }, - { - path: "self-evaluation-feedback/:learningUnitId", - component: () => - import("@/pages/learningMentor/mentor/SelfEvaluationFeedbackPage.vue"), - name: "mentorSelfEvaluationFeedback", - props: true, - }, - { - path: "details", - component: () => - import("@/pages/learningMentor/mentor/MentorDetailParentPage.vue"), - children: [ - { - path: "praxis-assignments/:praxisAssignmentId", - component: () => - import("@/pages/learningMentor/mentor/MentorPraxisAssignmentPage.vue"), - name: "learningMentorPraxisAssignments", - props: true, - }, - { - path: "self-evaluation-feedback-assignments/:learningUnitId", - component: () => - import( - "@/pages/learningMentor/mentor/MentorSelfEvaluationFeedbackAssignmentPage.vue" - ), - name: "learningMentorSelfEvaluationFeedbackAssignments", - props: true, - }, - ], - }, - ], - }, - { - path: "/course/:courseSlug/assignment-evaluation/:assignmentId/:userId", - component: () => - import("@/pages/assignmentEvaluation/AssignmentEvaluationPage.vue"), - props: true, - }, - { - path: "/course/:courseSlug/cockpit", - name: "cockpit", - children: [ - { - path: "", - component: () => import("@/pages/cockpit/cockpitPage/CockpitExpertPage.vue"), - props: true, - }, - { - path: "profile/:userId/:circleSlug", - component: () => import("@/pages/cockpit/CockpitUserCirclePage.vue"), - props: true, - }, - { - path: "feedback/:circleId", - component: () => import("@/pages/cockpit/FeedbackPage.vue"), - props: true, - }, - { - path: "assignment/:assignmentId", - component: () => - import("@/pages/cockpit/assignmentsPage/AssignmentsPage.vue"), - props: true, - }, - { - path: "attendance", - component: () => - import("@/pages/cockpit/attendanceCheckPage/AttendanceCheckPage.vue"), - props: true, - }, - { - path: "documents", - component: () => import("@/pages/cockpit/documentPage/DocumentPage.vue"), - props: true, - }, - ], - }, { path: "/statistic/:courseSlug", props: true, diff --git a/client/src/router/names.ts b/client/src/router/names.ts index a8f5d4f3..b52d9c8a 100644 --- a/client/src/router/names.ts +++ b/client/src/router/names.ts @@ -3,3 +3,6 @@ export const CERTIFICATES_ROUTE = "certificates"; export const SELF_EVALUATION_ROUTE = "selfEvaluationAndFeedback"; export const COMPETENCES_ROUTE = "competences"; export const SETTINGS_ROUTE = "settings"; +export const COCKPIT_ROUTE = "cockpit-home"; +export const ATTENDANCE_ROUTE = "attendance"; +export const DOCUMENTS_ROUTE = "documents"; From bc2dd2ba6e642feefb2f671c696b3849e20bac7f Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 11 Nov 2024 17:03:58 +0100 Subject: [PATCH 02/32] Fix styling issue --- client/src/components/header/SubNavItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/header/SubNavItem.vue b/client/src/components/header/SubNavItem.vue index cb38f36b..65f26eeb 100644 --- a/client/src/components/header/SubNavItem.vue +++ b/client/src/components/header/SubNavItem.vue @@ -27,7 +27,7 @@ const isExternalLink = computed(() => { target="_blank" > - + Date: Mon, 11 Nov 2024 17:04:16 +0100 Subject: [PATCH 03/32] Add subpages and subnavigation to cockpit page --- .../cockpitPage/CockpitExpertHomePage.vue | 112 +++++++++++ .../cockpit/cockpitPage/CockpitExpertPage.vue | 186 ------------------ .../cockpitPage/CockpitExpertParentPage.vue | 53 +++++ .../pages/competence/CompetenceParentPage.vue | 11 -- 4 files changed, 165 insertions(+), 197 deletions(-) create mode 100644 client/src/pages/cockpit/cockpitPage/CockpitExpertHomePage.vue delete mode 100644 client/src/pages/cockpit/cockpitPage/CockpitExpertPage.vue create mode 100644 client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue diff --git a/client/src/pages/cockpit/cockpitPage/CockpitExpertHomePage.vue b/client/src/pages/cockpit/cockpitPage/CockpitExpertHomePage.vue new file mode 100644 index 00000000..052f347b --- /dev/null +++ b/client/src/pages/cockpit/cockpitPage/CockpitExpertHomePage.vue @@ -0,0 +1,112 @@ + + diff --git a/client/src/pages/cockpit/cockpitPage/CockpitExpertPage.vue b/client/src/pages/cockpit/cockpitPage/CockpitExpertPage.vue deleted file mode 100644 index c93483a5..00000000 --- a/client/src/pages/cockpit/cockpitPage/CockpitExpertPage.vue +++ /dev/null @@ -1,186 +0,0 @@ - - - - - diff --git a/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue b/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue new file mode 100644 index 00000000..a5fca484 --- /dev/null +++ b/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/client/src/pages/competence/CompetenceParentPage.vue b/client/src/pages/competence/CompetenceParentPage.vue index 8c13cb37..c362b1b4 100644 --- a/client/src/pages/competence/CompetenceParentPage.vue +++ b/client/src/pages/competence/CompetenceParentPage.vue @@ -56,17 +56,6 @@ const items: SubNavEntry[] = [ route: selfEvaluationRoute, }, { id: 3, name: t("a.Handlungskompetenzen"), route: competencesRoute }, - - { - id: 4, - name: "MS Teams", - route: "https://iterativ.ch", - }, - { - id: 5, - name: "Vorschau Teilnehmer", - route: "https://iterativ.ch", - }, ]; From db399e2aa286192a82938b67199298fbabf7b469 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 11 Nov 2024 17:04:44 +0100 Subject: [PATCH 04/32] Add attendance widget and status component --- .../cockpitPage/AttendanceOverview.vue | 21 +++++++++ .../cockpit/cockpitPage/AttendanceStatus.vue | 43 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 client/src/pages/cockpit/cockpitPage/AttendanceOverview.vue create mode 100644 client/src/pages/cockpit/cockpitPage/AttendanceStatus.vue diff --git a/client/src/pages/cockpit/cockpitPage/AttendanceOverview.vue b/client/src/pages/cockpit/cockpitPage/AttendanceOverview.vue new file mode 100644 index 00000000..fd256034 --- /dev/null +++ b/client/src/pages/cockpit/cockpitPage/AttendanceOverview.vue @@ -0,0 +1,21 @@ + + + diff --git a/client/src/pages/cockpit/cockpitPage/AttendanceStatus.vue b/client/src/pages/cockpit/cockpitPage/AttendanceStatus.vue new file mode 100644 index 00000000..489e7e7f --- /dev/null +++ b/client/src/pages/cockpit/cockpitPage/AttendanceStatus.vue @@ -0,0 +1,43 @@ + + From 55515dd10fa7abbd444ac51b19db661072c26eb2 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 12 Nov 2024 14:53:43 +0100 Subject: [PATCH 05/32] Fix route props --- client/src/router/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/router/index.ts b/client/src/router/index.ts index a24e53b2..c5f286a7 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -188,6 +188,7 @@ const router = createRouter({ { path: "profile/:userId", component: () => import("@/pages/userProfile/UserProfilePage.vue"), + props: true, children: [ { path: "learning-path", From 93660cf421416e19f6f89c6083c3509e85152711 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 12 Nov 2024 16:02:50 +0100 Subject: [PATCH 06/32] Hide documents link conditionally --- .../cockpitPage/CockpitExpertParentPage.vue | 23 ++++++++++++++++--- cypress/e2e/settings.cy.js | 8 ++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue b/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue index a5fca484..3e861216 100644 --- a/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue +++ b/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue @@ -1,9 +1,11 @@