feat: add new pages for course discovery, course details, classroom activities, user dashboard, password reset, and internationalization support.
This commit is contained in:
parent
7ac1a5af0a
commit
4c9b6b0f3f
10 changed files with 570 additions and 175 deletions
|
|
@ -120,6 +120,12 @@ const downloadCertificate = async (course: any) => {
|
|||
downloadingCourseId.value = null
|
||||
}
|
||||
}
|
||||
|
||||
const validCourseId = computed(() => {
|
||||
const cid = route.query.course_id
|
||||
if (!cid || cid === 'undefined' || cid === 'null' || cid === 'NaN') return null
|
||||
return cid
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -195,14 +201,25 @@ const downloadCertificate = async (course: any) => {
|
|||
<p class="text-slate-500 dark:text-slate-400 mb-8">{{ $t('enrollment.successDesc') }}</p>
|
||||
<div class="flex flex-col gap-3">
|
||||
<q-btn
|
||||
:to="`/classroom/learning?course_id=${route.query.course_id}`"
|
||||
v-if="validCourseId"
|
||||
:to="`/classroom/learning?course_id=${validCourseId}`"
|
||||
unelevated
|
||||
rounded
|
||||
color="primary"
|
||||
class="w-full py-3 text-lg font-bold shadow-lg"
|
||||
:label="$t('enrollment.startNow')"
|
||||
/>
|
||||
<q-btn
|
||||
v-else
|
||||
unelevated
|
||||
rounded
|
||||
color="primary"
|
||||
class="w-full py-3 text-lg font-bold shadow-lg"
|
||||
:label="$t('common.close')"
|
||||
@click="showEnrollModal = false"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="validCourseId"
|
||||
flat
|
||||
rounded
|
||||
color="grey-7"
|
||||
|
|
|
|||
|
|
@ -380,16 +380,7 @@ onMounted(() => {
|
|||
<div>
|
||||
<div class="flex justify-between items-end mb-1">
|
||||
<label class="text-xs font-bold text-slate-500 dark:text-slate-400 ml-1 uppercase">{{ $t('profile.email') }}</label>
|
||||
<q-btn
|
||||
flat dense
|
||||
color="primary"
|
||||
size="sm"
|
||||
no-caps
|
||||
icon="mark_email_read"
|
||||
:label="$t('profile.verifyEmail') || 'ยืนยันอีเมล'"
|
||||
@click="handleSendVerifyEmail"
|
||||
:loading="isSendingVerify"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<q-input
|
||||
v-model="userData.email"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue