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')]"
>
diff --git a/Frontend-Learner/pages/reset-password.vue b/Frontend-Learner/pages/reset-password.vue
index ae8bc4f5..79ebdfef 100644
--- a/Frontend-Learner/pages/reset-password.vue
+++ b/Frontend-Learner/pages/reset-password.vue
@@ -25,6 +25,9 @@ const resetForm = reactive({
confirmPassword: ''
})
+const showPassword = ref(false)
+const showConfirmPassword = ref(false)
+
const resetRules = {
password: {
rules: {
@@ -126,11 +129,18 @@ const resetPassword = async () => {
handlePasswordInput('password', (e.target as HTMLInputElement).value)"
- type="password"
- class="w-full h-12 pl-12 pr-4 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 placeholder-slate-400 text-base focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all font-medium"
+ :type="showPassword ? 'text' : 'password'"
+ class="w-full h-12 pl-12 pr-12 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 placeholder-slate-400 text-base focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all font-medium"
placeholder="อย่างน้อย 8 ตัวอักษร"
:class="{'border-red-500 focus:ring-red-500/20 focus:border-red-500': errors.password}"
/>
+
{{ errors.password }}
@@ -145,11 +155,18 @@ const resetPassword = async () => {
+
{{ errors.confirmPassword }}