From 7c87ee803d4fbced1bffb9a6e88d85098867674c Mon Sep 17 00:00:00 2001 From: ISMAIL MASSERAN Date: Tue, 6 Oct 2026 11:54:26 +0800 Subject: [PATCH] DONE: reset password function, update header and footer design by adding logo --- .../authentication/TheResetPassword.vue | 547 ++++++++++++++++++ src/components/profile/TheProfile.vue | 22 +- src/interceptors/axios.js | 3 +- src/router/index.js | 7 + 4 files changed, 564 insertions(+), 15 deletions(-) create mode 100644 src/components/authentication/TheResetPassword.vue diff --git a/src/components/authentication/TheResetPassword.vue b/src/components/authentication/TheResetPassword.vue new file mode 100644 index 0000000..393968e --- /dev/null +++ b/src/components/authentication/TheResetPassword.vue @@ -0,0 +1,547 @@ + + + + + diff --git a/src/components/profile/TheProfile.vue b/src/components/profile/TheProfile.vue index dbc6432..080936b 100644 --- a/src/components/profile/TheProfile.vue +++ b/src/components/profile/TheProfile.vue @@ -9,7 +9,7 @@ -
+
{ if (response.data.success == true) { this.status = true; - this.data = response.data.message[0]; - this.data_2 = response.data.message[1]; - this.loading = false; + this.data = response.data.message[0] || {}; } else { this.status = false; - this.loading = false; } }) .catch((error) => { alert(error); + this.status = false; + }) + .finally(() => { this.loading = false; }); }, diff --git a/src/interceptors/axios.js b/src/interceptors/axios.js index 5baba6e..9ec9f3e 100644 --- a/src/interceptors/axios.js +++ b/src/interceptors/axios.js @@ -25,7 +25,8 @@ axios.interceptors.response.use( if ( currentName !== "login" && currentName !== "register" && - currentName !== "forgot-password" + currentName !== "forgot-password" && + currentName !== "reset-password" ) { router.push({ name: "login" }); } diff --git a/src/router/index.js b/src/router/index.js index 112f0ea..6f539aa 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -134,6 +134,7 @@ import ThePay from "../components/pay/ThePay.vue"; import ThePayCdm from "../components/pay/ThePayCdm.vue"; import ThePolicy from "../components/policy/ThePolicy.vue"; import TheForgotPassword from "../components/authentication/TheForgotPassword.vue"; +import TheResetPassword from "../components/authentication/TheResetPassword.vue"; import { createRouter, @@ -169,6 +170,12 @@ const routes = [ component: TheForgotPassword, meta: { guest: true }, }, + { + path: "/reset-password/:token", + name: "reset-password", + component: TheResetPassword, + meta: { guest: true }, + }, { path: "/policy", name: "policy",