feat: add new pages for authentication (register, forgot password) and course browsing (discovery, course detail)

This commit is contained in:
supalerk-ar66 2026-02-11 15:11:38 +07:00
parent acff387a9b
commit d4f84667dc
4 changed files with 39 additions and 8 deletions

View file

@ -36,6 +36,7 @@ const itemsPerPage = 12;
const { t, locale } = useI18n();
const { currentUser } = useAuth();
const $q = useQuasar();
const { fetchCategories } = useCategory();
const { fetchCourses, fetchCourseById, enrollCourse, getLocalizedText } = useCourse();
@ -109,7 +110,13 @@ const handleEnroll = async (id: number) => {
if (res.success) {
return navigateTo('/dashboard/my-courses?enrolled=true');
} else {
alert(res.error || 'Failed to enroll');
$q.notify({
type: 'negative',
message: res.error || 'Failed to enroll',
position: 'top',
timeout: 3000,
actions: [{ icon: 'close', color: 'white' }]
})
}
isEnrolling.value = false;
};