feat: implement course discovery and catalog page with browsing, filtering, searching, sorting, and detailed course views.
This commit is contained in:
parent
c5c9f481e8
commit
fb1e7671cc
1 changed files with 5 additions and 10 deletions
|
|
@ -71,12 +71,7 @@ const loadCourses = async () => {
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
const res = await fetchCourses();
|
const res = await fetchCourses();
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
courses.value = (res.data || []).map((c: any) => ({
|
courses.value = res.data || [];
|
||||||
...c,
|
|
||||||
rating: "0.0",
|
|
||||||
lessons: "0",
|
|
||||||
levelType: c.levelType || "neutral"
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
};
|
};
|
||||||
|
|
@ -361,13 +356,13 @@ onMounted(() => {
|
||||||
<span>{{ $t('course.certificate') }}</span>
|
<span>{{ $t('course.certificate') }}</span>
|
||||||
<span class="font-bold text-slate-900 dark:text-white">{{ selectedCourse.have_certificate ? 'มีใบประกาศฯ' : 'ไม่มี' }}</span>
|
<span class="font-bold text-slate-900 dark:text-white">{{ selectedCourse.have_certificate ? 'มีใบประกาศฯ' : 'ไม่มี' }}</span>
|
||||||
</div>
|
</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>ผู้สอน</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>
|
||||||
<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>ระดับ</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue