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
|
|
@ -83,7 +83,8 @@
|
|||
"successTitle": "Enrollment Successful!",
|
||||
"successDesc": "You have successfully enrolled in this course.",
|
||||
"startNow": "Start Learning",
|
||||
"later": "Later"
|
||||
"later": "Later",
|
||||
"alreadyEnrolledHint": "You have already enrolled in the course {course}."
|
||||
},
|
||||
"certificate": {
|
||||
"title": "Certificate of Completion",
|
||||
|
|
@ -167,6 +168,7 @@
|
|||
"newBadge": "New",
|
||||
"popularBadge": "Popular",
|
||||
"save": "Save",
|
||||
"ok": "OK",
|
||||
"close": "Close",
|
||||
"cancel": "Cancel",
|
||||
"required": "This field is required",
|
||||
|
|
|
|||
|
|
@ -83,7 +83,8 @@
|
|||
"successTitle": "ลงทะเบียนสำเร็จ!",
|
||||
"successDesc": "คุณได้ลงทะเบียนคอร์สนี้เรียบร้อยแล้ว",
|
||||
"startNow": "เริ่มเรียนทันที",
|
||||
"later": "ไว้ทีหลัง"
|
||||
"later": "ไว้ทีหลัง",
|
||||
"alreadyEnrolledHint": "ท่านเคยลงทะเบียนคอร์ส {course} นี้ไปเรียบร้อยแล้ว"
|
||||
},
|
||||
"certificate": {
|
||||
"title": "ใบประกาศนียบัตรจบหลักสูตร",
|
||||
|
|
@ -167,6 +168,7 @@
|
|||
"newBadge": "ใหม่",
|
||||
"popularBadge": "ยอดนิยม",
|
||||
"save": "บันทึก",
|
||||
"ok": "ตกลง",
|
||||
"close": "ปิด",
|
||||
"cancel": "ยกเลิก",
|
||||
"required": "กรุณากรอกข้อมูล",
|
||||
|
|
|
|||
|
|
@ -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