feat: Add course detail page and comprehensive English and Thai internationalization.
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 33s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 3s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 33s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 3s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s
This commit is contained in:
parent
883e08c6ed
commit
d787412036
3 changed files with 11 additions and 6 deletions
|
|
@ -15,6 +15,7 @@ const route = useRoute()
|
|||
const courseId = computed(() => parseInt(route.params.id as string))
|
||||
const { currentUser } = useAuth()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const { fetchCourseById, enrollCourse, getLocalizedText } = useCourse()
|
||||
|
||||
// ใช้ useAsyncData ดึงข้อมูลคอร์ส Server-side rendering (SSR)
|
||||
|
|
@ -35,10 +36,10 @@ const handleEnroll = async () => {
|
|||
// กรณีเคยกดลงทะเบียนไปแล้ว (Check จากสถานะคอร์ส)
|
||||
if (course.value.enrolled) {
|
||||
$q.dialog({
|
||||
message: `<div class="text-slate-800 text-base leading-relaxed">ท่านเคยลงทะเบียนคอร์ส <b class="text-blue-600">"${getLocalizedText(course.value.title)}"</b> นี้ไปเรียบร้อยแล้ว</div>`,
|
||||
message: `<div class="text-slate-800 text-base leading-relaxed">${t('enrollment.alreadyEnrolledHint', { course: `<b class="text-blue-600">"${getLocalizedText(course.value.title)}"</b>` })}</div>`,
|
||||
html: true,
|
||||
ok: {
|
||||
label: 'ตกลง',
|
||||
label: t('common.ok'),
|
||||
color: 'primary',
|
||||
rounded: true,
|
||||
unelevated: true,
|
||||
|
|
@ -67,10 +68,10 @@ const handleEnroll = async () => {
|
|||
// กรณี API แจ้งว่าเคยลงทะเบียนไปแล้ว (Code 409)
|
||||
if (res.code === 409) {
|
||||
$q.dialog({
|
||||
message: `<div class="text-slate-800 text-base leading-relaxed">ท่านเคยลงทะเบียนคอร์ส <b class="text-blue-600">"${getLocalizedText(course.value.title)}"</b> นี้ไปเรียบร้อยแล้ว</div>`,
|
||||
message: `<div class="text-slate-800 text-base leading-relaxed">${t('enrollment.alreadyEnrolledHint', { course: `<b class="text-blue-600">"${getLocalizedText(course.value.title)}"</b>` })}</div>`,
|
||||
html: true,
|
||||
ok: {
|
||||
label: 'ตกลง',
|
||||
label: t('common.ok'),
|
||||
color: 'primary',
|
||||
rounded: true,
|
||||
unelevated: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue