From a41338c3a24980e8dd0e2ed17aaf8f0bbfaa1951 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Wed, 26 Mar 2025 22:13:08 +0530 Subject: [PATCH] fix: onboarding step improvements --- frappe-ui | 2 +- frontend/components.d.ts | 4 +- frontend/package.json | 4 +- frontend/src/components/AppSidebar.vue | 92 +++++++------ frontend/src/components/CourseOutline.vue | 13 +- frontend/src/components/Evaluators.vue | 126 ++++++++++++++++++ frontend/src/components/Icons/BatchIcon.vue | 23 ---- frontend/src/components/Icons/InviteIcon.vue | 17 +++ frontend/src/components/LessonContent.vue | 7 +- .../components/Modals/BatchCourseModal.vue | 2 +- frontend/src/components/Modals/Question.vue | 5 +- frontend/src/components/Modals/Settings.vue | 12 ++ frontend/src/pages/CourseDetail.vue | 4 +- frontend/src/pages/CourseForm.vue | 19 +-- frontend/src/pages/QuizForm.vue | 3 - frontend/tailwind.config.js | 6 +- frontend/vite.config.js | 2 +- lms/lms/api.py | 21 +++ .../course_evaluator/course_evaluator.json | 41 +++++- .../course_evaluator/course_evaluator.py | 6 + lms/lms/onboarding.py | 4 +- yarn.lock | 53 ++++++-- 22 files changed, 358 insertions(+), 108 deletions(-) create mode 100644 frontend/src/components/Evaluators.vue delete mode 100644 frontend/src/components/Icons/BatchIcon.vue create mode 100644 frontend/src/components/Icons/InviteIcon.vue diff --git a/frappe-ui b/frappe-ui index 10635f31..704a098e 160000 --- a/frappe-ui +++ b/frappe-ui @@ -1 +1 @@ -Subproject commit 10635f3120840ddf67d2694b62046578f77c560c +Subproject commit 704a098eb1982410678cb12e6764c3d4087ea8fb diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 085dc343..4389972d 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -16,7 +16,6 @@ declare module 'vue' { AssessmentPlugin: typeof import('./src/components/AssessmentPlugin.vue')['default'] Assessments: typeof import('./src/components/Assessments.vue')['default'] Assignment: typeof import('./src/components/Assignment.vue')['default'] - AssignmentBlock: typeof import('./src/components/AssignmentBlock.vue')['default'] AudioBlock: typeof import('./src/components/AudioBlock.vue')['default'] Autocomplete: typeof import('./src/components/Controls/Autocomplete.vue')['default'] BatchCard: typeof import('./src/components/BatchCard.vue')['default'] @@ -24,7 +23,6 @@ declare module 'vue' { BatchCourses: typeof import('./src/components/BatchCourses.vue')['default'] BatchDashboard: typeof import('./src/components/BatchDashboard.vue')['default'] BatchFeedback: typeof import('./src/components/BatchFeedback.vue')['default'] - BatchIcon: typeof import('./src/components/Icons/BatchIcon.vue')['default'] BatchOverlay: typeof import('./src/components/BatchOverlay.vue')['default'] BatchStudentProgress: typeof import('./src/components/Modals/BatchStudentProgress.vue')['default'] BatchStudents: typeof import('./src/components/BatchStudents.vue')['default'] @@ -49,11 +47,13 @@ declare module 'vue' { EditCoverImage: typeof import('./src/components/Modals/EditCoverImage.vue')['default'] EditProfile: typeof import('./src/components/Modals/EditProfile.vue')['default'] EvaluationModal: typeof import('./src/components/Modals/EvaluationModal.vue')['default'] + Evaluators: typeof import('./src/components/Evaluators.vue')['default'] Event: typeof import('./src/components/Modals/Event.vue')['default'] ExplanationVideos: typeof import('./src/components/Modals/ExplanationVideos.vue')['default'] FrappeCloudIcon: typeof import('./src/components/Icons/FrappeCloudIcon.vue')['default'] IconPicker: typeof import('./src/components/Controls/IconPicker.vue')['default'] IndicatorIcon: typeof import('./src/components/Icons/IndicatorIcon.vue')['default'] + InviteIcon: typeof import('./src/components/Icons/InviteIcon.vue')['default'] JobApplicationModal: typeof import('./src/components/Modals/JobApplicationModal.vue')['default'] JobCard: typeof import('./src/components/JobCard.vue')['default'] LessonContent: typeof import('./src/components/LessonContent.vue')['default'] diff --git a/frontend/package.json b/frontend/package.json index 44bd7ea6..7990f221 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,13 +26,13 @@ "codemirror-editor-vue3": "^2.8.0", "dayjs": "^1.11.6", "feather-icons": "^4.28.0", - "frappe-ui": "^0.1.121", + "frappe-ui": "^0.1.122", "highlight.js": "^11.11.1", "lucide-vue-next": "^0.383.0", "markdown-it": "^14.0.0", "pinia": "^2.0.33", "socket.io-client": "^4.7.2", - "tailwindcss": "^3.3.3", + "tailwindcss": "3.4.15", "typescript": "^5.7.2", "vue": "^3.4.23", "vue-chartjs": "^5.3.0", diff --git a/frontend/src/components/AppSidebar.vue b/frontend/src/components/AppSidebar.vue index 2193c654..8b18c389 100644 --- a/frontend/src/components/AppSidebar.vue +++ b/frontend/src/components/AppSidebar.vue @@ -88,7 +88,9 @@ " > + + - - diff --git a/frontend/src/components/Icons/BatchIcon.vue b/frontend/src/components/Icons/BatchIcon.vue deleted file mode 100644 index 0156adbf..00000000 --- a/frontend/src/components/Icons/BatchIcon.vue +++ /dev/null @@ -1,23 +0,0 @@ - diff --git a/frontend/src/components/Icons/InviteIcon.vue b/frontend/src/components/Icons/InviteIcon.vue new file mode 100644 index 00000000..94810039 --- /dev/null +++ b/frontend/src/components/Icons/InviteIcon.vue @@ -0,0 +1,17 @@ + + \ No newline at end of file diff --git a/frontend/src/components/LessonContent.vue b/frontend/src/components/LessonContent.vue index 736367af..2bb686c4 100644 --- a/frontend/src/components/LessonContent.vue +++ b/frontend/src/components/LessonContent.vue @@ -4,7 +4,7 @@ class="youtube-video" :src="getYouTubeVideoSource(youtube.split('/').pop())" width="100%" - height="400" + :height="screenSize.width < 640 ? 200 : 400" frameborder="0" allowfullscreen > @@ -15,7 +15,7 @@ class="youtube-video" :src="getYouTubeVideoSource(block)" width="100%" - height="400" + :height="screenSize.width < 640 ? 200 : 400" frameborder="0" allowfullscreen > @@ -66,6 +66,9 @@ diff --git a/frontend/src/components/Modals/Question.vue b/frontend/src/components/Modals/Question.vue index 7ab280bd..28ca4f96 100644 --- a/frontend/src/components/Modals/Question.vue +++ b/frontend/src/components/Modals/Question.vue @@ -109,11 +109,13 @@ import { Dialog, FormControl, TextEditor, createResource } from 'frappe-ui' import { computed, watch, reactive, ref } from 'vue' import Link from '@/components/Controls/Link.vue' import { showToast } from '@/utils' +import { useOnboarding } from 'frappe-ui/frappe' const show = defineModel() const quiz = defineModel('quiz') const questionType = ref(null) const editMode = ref(false) +const { updateOnboardingStep } = useOnboarding('learning') const existingQuestion = reactive({ question: '', @@ -122,7 +124,7 @@ const existingQuestion = reactive({ const question = reactive({ question: '', type: 'Choices', - marks: 0, + marks: 1, }) const populateFields = () => { @@ -261,6 +263,7 @@ const addQuestionRow = (question, close) => { { onSuccess() { show.value = false + updateOnboardingStep('create_first_quiz') showToast(__('Success'), __('Question added successfully'), 'check') quiz.value.reload() close() diff --git a/frontend/src/components/Modals/Settings.vue b/frontend/src/components/Modals/Settings.vue index f4c11d4f..fb9aaff7 100644 --- a/frontend/src/components/Modals/Settings.vue +++ b/frontend/src/components/Modals/Settings.vue @@ -40,6 +40,12 @@ :description="activeTab.description" v-model:show="show" /> + { description: 'Manage the members of your learning system', icon: 'UserRoundPlus', }, + { + label: 'Evaluators', + description: 'Manage the evaluators of your learning system', + icon: 'UserCheck', + }, { label: 'Categories', description: 'Manage the members of your learning system', diff --git a/frontend/src/pages/CourseDetail.vue b/frontend/src/pages/CourseDetail.vue index 56c9fc6b..2d47f37c 100644 --- a/frontend/src/pages/CourseDetail.vue +++ b/frontend/src/pages/CourseDetail.vue @@ -56,7 +56,7 @@ -
+
-
+
-