feat: enable certification from course form

This commit is contained in:
Jannat Patel
2024-07-12 19:46:45 +05:30
parent 23b2e8d682
commit 57f43b256a
2 changed files with 12 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
</div>
<div
v-if="sidebarSettings.data?.web_pages?.length || isModerator"
class="pt-1"
class="mt-4"
>
<div
class="flex items-center justify-between pr-2 cursor-pointer"
@@ -36,7 +36,7 @@
/>
</span>
<span class="ml-2">
{{ __('Web Pages') }}
{{ __('More') }}
</span>
</div>
<Button v-if="isModerator" variant="ghost" @click="openPageModal()">

View File

@@ -119,7 +119,7 @@
<div class="text-lg font-semibold mt-5 mb-4">
{{ __('Settings') }}
</div>
<div class="grid grid-cols-2 gap-10 mb-4">
<div class="grid grid-cols-3 gap-10 mb-4">
<div
v-if="user.data?.is_moderator"
class="flex flex-col space-y-3"
@@ -147,11 +147,18 @@
v-model="course.featured"
:label="__('Featured')"
/>
</div>
<div class="flex flex-col space-y-3">
<FormControl
type="checkbox"
v-model="course.disable_self_learning"
:label="__('Disable Self Enrollment')"
/>
<FormControl
type="checkbox"
v-model="course.enable_certification"
:label="__('Completion Certificate')"
/>
</div>
</div>
</div>
@@ -244,6 +251,7 @@ const course = reactive({
featured: false,
upcoming: false,
disable_self_learning: false,
enable_certification: false,
paid_course: false,
course_price: '',
currency: '',
@@ -337,6 +345,7 @@ const courseResource = createResource({
'disable_self_learning',
'paid_course',
'featured',
'enable_certification',
]
for (let idx in checkboxes) {
let key = checkboxes[idx]