From 0ec99b140a67f1c5e15be49775575d1930eebbc7 Mon Sep 17 00:00:00 2001 From: supalerk-ar66 Date: Mon, 2 Feb 2026 16:33:51 +0700 Subject: [PATCH] feat: add user dashboard, profile management, and password reset pages. --- Frontend-Learner/pages/dashboard/index.vue | 68 ++++++++++---------- Frontend-Learner/pages/dashboard/profile.vue | 5 +- Frontend-Learner/pages/reset-password.vue | 25 +++++-- 3 files changed, 59 insertions(+), 39 deletions(-) diff --git a/Frontend-Learner/pages/dashboard/index.vue b/Frontend-Learner/pages/dashboard/index.vue index 3b1cb424..6cebdc46 100644 --- a/Frontend-Learner/pages/dashboard/index.vue +++ b/Frontend-Learner/pages/dashboard/index.vue @@ -78,40 +78,42 @@ onMounted(async () => {
- -
-

- - {{ $t('menu.recommendedCourses') }} -

+ +
+ +
+

+ + {{ $t('menu.recommendedCourses') }} +

+
+ + +
+ +
+ +
+
+
+
{{ course.category }}
+

{{ course.title }}

+
+ + + {{ course.duration }} + + {{ $t('menu.viewDetails') }} +
+
+ +
+ + +
+
Loading recommendations...
+
- - -
- -
- -
-
-
-
{{ course.category }}
-

{{ course.title }}

-
- - - {{ course.duration }} - - {{ $t('menu.viewDetails') }} -
-
- -
- - -
-
Loading recommendations...
-
-
diff --git a/Frontend-Learner/pages/dashboard/profile.vue b/Frontend-Learner/pages/dashboard/profile.vue index 18d2c491..ad8a0e98 100644 --- a/Frontend-Learner/pages/dashboard/profile.vue +++ b/Frontend-Learner/pages/dashboard/profile.vue @@ -61,7 +61,8 @@ const phoneRules = [ ] const passwordRules = [ (val: string) => !!val || t('common.required'), - (val: string) => val.length >= 6 || t('common.passwordTooShort') + (val: string) => val.length >= 6 || t('common.passwordTooShort'), + (val: string) => val !== passwordForm.currentPassword || 'รหัสผ่านใหม่ต้องไม่ซ้ำกับรหัสผ่านปัจจุบัน' ] const confirmPasswordRules = [ (val: string) => !!val || t('common.required'), @@ -442,7 +443,7 @@ onMounted(() => { :type="showCurrentPassword ? 'text' : 'password'" outlined dense rounded class="premium-q-input" - placeholder="••••••••" + placeholder="" :rules="[val => !!val || $t('common.required')]" >