From 3cc5f63610bb8deaf16c9be1faddd6d58f123bac Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Tue, 7 Apr 2026 09:38:00 +0200 Subject: [PATCH] feat(vocab): add lesson review functionality and update navigation - Introduced VocabLessonReviewView for reviewing lessons within the vocabulary course structure. - Updated routing in socialRoutes.js to include a new path for lesson reviews, ensuring authenticated access. - Modified VocabCourseView to change the lesson button click behavior to navigate to the review view, enhancing user flow. - Added a new method to handle lesson review navigation, improving the overall user experience in the vocabulary section. --- frontend/src/router/socialRoutes.js | 8 + frontend/src/views/social/VocabCourseView.vue | 9 +- .../views/social/VocabLessonReviewView.vue | 285 ++++++++++++++++++ 3 files changed, 301 insertions(+), 1 deletion(-) create mode 100644 frontend/src/views/social/VocabLessonReviewView.vue diff --git a/frontend/src/router/socialRoutes.js b/frontend/src/router/socialRoutes.js index a3604d1..b6019b9 100644 --- a/frontend/src/router/socialRoutes.js +++ b/frontend/src/router/socialRoutes.js @@ -13,6 +13,7 @@ const VocabChapterView = () => import('../views/social/VocabChapterView.vue'); const VocabCourseListView = () => import('../views/social/VocabCourseListView.vue'); const VocabCourseView = () => import('../views/social/VocabCourseView.vue'); const VocabLessonView = () => import('../views/social/VocabLessonView.vue'); +const VocabLessonReviewView = () => import('../views/social/VocabLessonReviewView.vue'); const EroticAccessView = () => import('../views/social/EroticAccessView.vue'); const EroticPicturesView = () => import('../views/social/EroticPicturesView.vue'); const EroticVideosView = () => import('../views/social/EroticVideosView.vue'); @@ -121,6 +122,13 @@ const socialRoutes = [ props: true, meta: { requiresAuth: true } }, + { + path: '/socialnetwork/vocab/courses/:courseId/lessons/:lessonId/review', + name: 'VocabLessonReview', + component: VocabLessonReviewView, + props: true, + meta: { requiresAuth: true } + }, { path: '/socialnetwork/vocab/courses/:courseId/lessons/:lessonId', name: 'VocabLesson', diff --git a/frontend/src/views/social/VocabCourseView.vue b/frontend/src/views/social/VocabCourseView.vue index e4dc988..526550f 100644 --- a/frontend/src/views/social/VocabCourseView.vue +++ b/frontend/src/views/social/VocabCourseView.vue @@ -87,7 +87,7 @@ :key="`due-${lesson.id}`" type="button" class="course-flow-lesson" - @click="openLesson(lesson.id)" + @click="openLessonReview(lesson.id)" > {{ lesson.title }} {{ formatReviewDue(getLessonProgress(lesson.id, lesson)?.reviewNextDueAt) }} @@ -705,6 +705,10 @@ export default { if (!step?.lesson) { return; } + if (step.type === 'review_due') { + this.openLessonReview(step.lesson.id); + return; + } if (step.type === 'practice') { this.openLessonPractice(step.lesson); return; @@ -717,6 +721,9 @@ export default { lessonId: lesson.id }); }, + openLessonReview(lessonId) { + this.$router.push(`/socialnetwork/vocab/courses/${this.courseId}/lessons/${lessonId}/review`); + }, openLessonAssistant(lessonId) { this.$router.push(`/socialnetwork/vocab/courses/${this.courseId}/lessons/${lessonId}?assistant=1`); }, diff --git a/frontend/src/views/social/VocabLessonReviewView.vue b/frontend/src/views/social/VocabLessonReviewView.vue new file mode 100644 index 0000000..4c27a6d --- /dev/null +++ b/frontend/src/views/social/VocabLessonReviewView.vue @@ -0,0 +1,285 @@ + + + + +