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

This commit is contained in:
supalerk-ar66 2026-02-11 17:52:34 +07:00
parent 883e08c6ed
commit d787412036
3 changed files with 11 additions and 6 deletions

View file

@ -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,