fix: misc issues

This commit is contained in:
Jannat Patel
2024-11-27 15:45:26 +05:30
parent 6c06f7d19b
commit a64b0f734a
5 changed files with 25 additions and 8 deletions

View File

@@ -25,7 +25,7 @@
@click="openHelpDialog('upload')" @click="openHelpDialog('upload')"
> >
<span class="leading-5"> <span class="leading-5">
{{ __('How to upload content from your system?') }} {{ __(contentMap['upload']) }}
</span> </span>
<Info class="w-3 h-3 text-gray-700" /> <Info class="w-3 h-3 text-gray-700" />
</div> </div>
@@ -44,7 +44,7 @@
@click="openHelpDialog('youtube')" @click="openHelpDialog('youtube')"
> >
<span> <span>
{{ __('How to add a YouTube Video?') }} {{ __(contentMap['youtube']) }}
</span> </span>
<Info class="w-3 h-3 text-gray-700" /> <Info class="w-3 h-3 text-gray-700" />
</div> </div>
@@ -72,7 +72,7 @@
</div> </div>
</div> </div>
</div> </div>
<ExplanationVideos v-model="showExplanation" :type="type" /> <ExplanationVideos v-model="showExplanation" :title="title" :type="type" />
</template> </template>
<script setup> <script setup>
import { Info } from 'lucide-vue-next' import { Info } from 'lucide-vue-next'
@@ -81,9 +81,16 @@ import ExplanationVideos from '@/components/Modals/ExplanationVideos.vue'
const showExplanation = ref(false) const showExplanation = ref(false)
const type = ref(null) const type = ref(null)
const title = ref(null)
const contentMap = {
quiz: 'How to add a Quiz?',
upload: 'How to upload content from your system?',
youtube: 'How to add a YouTube Video?',
}
const openHelpDialog = (contentType) => { const openHelpDialog = (contentType) => {
type.value = contentType type.value = contentType
title.value = contentMap[contentType]
showExplanation.value = true showExplanation.value = true
} }
</script> </script>

View File

@@ -3,10 +3,11 @@
v-model="show" v-model="show"
:options="{ :options="{
size: '4xl', size: '4xl',
title: title,
}" }"
> >
<template #body> <template #body-content>
<div class="p-4"> <div>
<VideoBlock :file="file" /> <VideoBlock :file="file" />
</div> </div>
</template> </template>
@@ -24,8 +25,14 @@ const props = defineProps({
type: [String, null], type: [String, null],
required: true, required: true,
}, },
title: {
type: String,
required: true,
},
}) })
console.log(props.title)
const file = computed(() => { const file = computed(() => {
if (props.type == 'youtube') return '/assets/lms/frontend/Youtube.mp4' if (props.type == 'youtube') return '/assets/lms/frontend/Youtube.mp4'
if (props.type == 'quiz') return '/assets/lms/frontend/Quiz.mp4' if (props.type == 'quiz') return '/assets/lms/frontend/Quiz.mp4'

View File

@@ -332,10 +332,10 @@ const memberColumns = computed(() => {
align: 'left', align: 'left',
}, },
{ {
label: 'Progress', label: 'Progress (%)',
key: 'progress', key: 'progress',
width: 3, width: 3,
align: 'left', align: 'right',
}, },
] ]
}) })

View File

@@ -15,7 +15,7 @@
</Button> </Button>
</header> </header>
<div v-if="programs.data?.length" class="pt-5 px-5"> <div v-if="programs.data?.length" class="pt-5 px-5">
<div v-for="program in programs.data" class="mb-20"> <div v-for="program in programs.data" class="mb-10">
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div class="text-xl font-semibold"> <div class="text-xl font-semibold">
{{ program.name }} {{ program.name }}

View File

@@ -60,6 +60,9 @@ export class Quiz {
} }
renderQuizModal() { renderQuizModal() {
if (this.readOnly) {
return
}
const app = createApp(QuizPlugin, { const app = createApp(QuizPlugin, {
onQuizAddition: (quiz) => { onQuizAddition: (quiz) => {
this.data.quiz = quiz this.data.quiz = quiz