feat: implement course discovery and catalog page with browsing, filtering, searching, sorting, and detailed course views.

This commit is contained in:
supalerk-ar66 2026-01-27 09:45:31 +07:00
parent c5c9f481e8
commit fb1e7671cc

View file

@ -71,12 +71,7 @@ const loadCourses = async () => {
isLoading.value = true;
const res = await fetchCourses();
if (res.success) {
courses.value = (res.data || []).map((c: any) => ({
...c,
rating: "0.0",
lessons: "0",
levelType: c.levelType || "neutral"
}));
courses.value = res.data || [];
}
isLoading.value = false;
};
@ -361,13 +356,13 @@ onMounted(() => {
<span>{{ $t('course.certificate') }}</span>
<span class="font-bold text-slate-900 dark:text-white">{{ selectedCourse.have_certificate ? 'มีใบประกาศฯ' : 'ไม่มี' }}</span>
</div>
<div class="flex justify-between text-slate-600 dark:text-slate-400">
<div v-if="selectedCourse.instructor_name" class="flex justify-between text-slate-600 dark:text-slate-400">
<span>สอน</span>
<span class="font-bold text-slate-900 dark:text-white">Professional Instructor</span>
<span class="font-bold text-slate-900 dark:text-white">{{ selectedCourse.instructor_name }}</span>
</div>
<div class="flex justify-between text-slate-600 dark:text-slate-400">
<div v-if="selectedCourse.level" class="flex justify-between text-slate-600 dark:text-slate-400">
<span>ระด</span>
<span class="font-bold text-slate-900 dark:text-white">กระด</span>
<span class="font-bold text-slate-900 dark:text-white">{{ selectedCourse.level }}</span>
</div>
</div>
</div>