fix: onboarding step improvements

This commit is contained in:
Jannat Patel
2025-03-26 22:13:08 +05:30
parent aa979b96f2
commit a41338c3a2
22 changed files with 358 additions and 108 deletions

View File

@@ -88,7 +88,7 @@ const addCourse = (close) => {
const openSettings = (close) => {
close()
settingsStore.activeTab = 'Categories'
settingsStore.activeTab = 'Evaluators'
settingsStore.isSettingsOpen = true
}
</script>

View File

@@ -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()

View File

@@ -40,6 +40,12 @@
:description="activeTab.description"
v-model:show="show"
/>
<Evaluators
v-else-if="activeTab.label === 'Evaluators'"
:label="activeTab.label"
:description="activeTab.description"
v-model:show="show"
/>
<Categories
v-else-if="activeTab.label === 'Categories'"
:label="activeTab.label"
@@ -78,6 +84,7 @@ import { useSettings } from '@/stores/settings'
import SettingDetails from '../SettingDetails.vue'
import SidebarLink from '@/components/SidebarLink.vue'
import Members from '@/components/Members.vue'
import Evaluators from '@/components/Evaluators.vue'
import Categories from '@/components/Categories.vue'
import BrandSettings from '@/components/BrandSettings.vue'
import PaymentSettings from '@/components/PaymentSettings.vue'
@@ -193,6 +200,11 @@ const tabsStructure = computed(() => {
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',