fix: open course and batch from evaluation event modal
This commit is contained in:
@@ -22,7 +22,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip :text="__('Course')">
|
<Tooltip :text="__('Course')">
|
||||||
<div class="flex items-center space-x-2 w-fit">
|
<div
|
||||||
|
class="flex space-x-2 w-fit cursor-pointer"
|
||||||
|
@click="openLink('course', event.course)"
|
||||||
|
>
|
||||||
<BookOpen class="h-4 w-4 stroke-1.5" />
|
<BookOpen class="h-4 w-4 stroke-1.5" />
|
||||||
<span>
|
<span>
|
||||||
{{ event.course_title }}
|
{{ event.course_title }}
|
||||||
@@ -30,7 +33,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip v-if="event.batch_title" :text="__('Batch')">
|
<Tooltip v-if="event.batch_title" :text="__('Batch')">
|
||||||
<div class="flex items-center space-x-2 w-fit">
|
<div
|
||||||
|
class="flex space-x-2 w-fit cursor-pointer"
|
||||||
|
@click="openLink('batch', event.batch_name)"
|
||||||
|
>
|
||||||
<Users class="h-4 w-4 stroke-1.5" />
|
<Users class="h-4 w-4 stroke-1.5" />
|
||||||
<span>
|
<span>
|
||||||
{{ event.batch_title }}
|
{{ event.batch_title }}
|
||||||
@@ -334,7 +340,7 @@ const certificateDetails = createResource({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onError(err) {
|
onError(err) {
|
||||||
certificate.template = defaultTemplate.data.value
|
certificate.template = defaultTemplate.data?.value
|
||||||
},
|
},
|
||||||
auto: false,
|
auto: false,
|
||||||
})
|
})
|
||||||
@@ -377,6 +383,16 @@ const openCertificate = (certificate) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openLink = (type, name) => {
|
||||||
|
let url = ''
|
||||||
|
if (type === 'course') {
|
||||||
|
url = `/lms/courses/${name}`
|
||||||
|
} else if (type === 'batch') {
|
||||||
|
url = `/lms/batches/${name}#students`
|
||||||
|
}
|
||||||
|
window.open(url, '_blank')
|
||||||
|
}
|
||||||
|
|
||||||
const statusOptions = computed(() => {
|
const statusOptions = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user