diff --git a/frontend/package.json b/frontend/package.json index 3ca596fd..6775773d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -29,7 +29,9 @@ "tailwindcss": "^3.3.3", "vue": "^3.4.23", "vue-chartjs": "^5.3.0", - "vue-router": "^4.0.12" + "vue-draggable-next": "^2.2.1", + "vue-router": "^4.0.12", + "vuedraggable": "4.1.0" }, "devDependencies": { "@vitejs/plugin-vue": "^5.0.3", diff --git a/frontend/src/components/AppSidebar.vue b/frontend/src/components/AppSidebar.vue index f395dc93..dbeceba4 100644 --- a/frontend/src/components/AppSidebar.vue +++ b/frontend/src/components/AppSidebar.vue @@ -18,20 +18,28 @@
- - {{ __('Web Pages') }} - -
+
{ socket.on('publish_lms_notifications', (data) => { diff --git a/frontend/src/components/BatchOverlay.vue b/frontend/src/components/BatchOverlay.vue index 91c0ac88..2eb225c2 100644 --- a/frontend/src/components/BatchOverlay.vue +++ b/frontend/src/components/BatchOverlay.vue @@ -41,7 +41,7 @@
- {{ __('Manage Batch') }} + {{ isModerator ? __('Manage Batch') : __('Visit Batch') }} @@ -65,7 +65,7 @@ }" v-else-if="batch.data.paid_batch && batch.data.seats_left" > - -
- -
- - - - {{ lesson.title }} -
-
-
- + + +
diff --git a/frontend/src/pages/Batch.vue b/frontend/src/pages/Batch.vue index 6143d586..0d0ae584 100644 --- a/frontend/src/pages/Batch.vue +++ b/frontend/src/pages/Batch.vue @@ -183,7 +183,7 @@ import { MessageCircle, Globe, } from 'lucide-vue-next' -import { formatTime } from '@/utils' +import { formatTime, updateDocumentTitle } from '@/utils' import BatchDashboard from '@/components/BatchDashboard.vue' import BatchCourses from '@/components/BatchCourses.vue' import LiveClass from '@/components/LiveClass.vue' @@ -286,4 +286,13 @@ const redirectToLogin = () => { const openAnnouncementModal = () => { showAnnouncementModal.value = true } + +const pageMeta = computed(() => { + return { + title: batch.data?.title, + description: batch.data?.description, + } +}) + +updateDocumentTitle(pageMeta) diff --git a/frontend/src/pages/BatchDetail.vue b/frontend/src/pages/BatchDetail.vue index 3724b5fd..d98c3f98 100644 --- a/frontend/src/pages/BatchDetail.vue +++ b/frontend/src/pages/BatchDetail.vue @@ -100,7 +100,7 @@ import { computed, inject } from 'vue' import { useRouter } from 'vue-router' import { BookOpen, Clock } from 'lucide-vue-next' -import { formatTime } from '@/utils' +import { formatTime, updateDocumentTitle } from '@/utils' import { Breadcrumbs, createResource } from 'frappe-ui' import CourseCard from '@/components/CourseCard.vue' import BatchOverlay from '@/components/BatchOverlay.vue' @@ -125,16 +125,6 @@ const batch = createResource({ batch: props.batchName, }, auto: true, - onSuccess(data) { - if (data.students?.includes(user.data?.name)) { - router.push({ - name: 'Batch', - params: { - batchName: props.batchName, - }, - }) - } - }, }) const courses = createResource({ @@ -154,6 +144,15 @@ const breadcrumbs = computed(() => { }) return items }) + +const pageMeta = computed(() => { + return { + title: batch.data?.title, + description: batch.data?.description, + } +}) + +updateDocumentTitle(pageMeta)