feat: add new pages for authentication (register, forgot password) and course browsing (discovery, course detail)
This commit is contained in:
parent
acff387a9b
commit
d4f84667dc
4 changed files with 39 additions and 8 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue