From 34d39c7215ecb6ae998d058d9d2a5a94c9386553 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 13 Jul 2026 17:57:13 +0700 Subject: [PATCH 1/2] refactor(probation): replace Math.round with Math.trunc --- .../components/probation/FormEvaluation/FormEvaluateScore.vue | 2 +- .../probation/FormEvaluation/FormEvaluateScoreAdd.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index 16a32d20b..07e8a2409 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -228,7 +228,7 @@ const score5 = computed(() => { Number(other_training_percent.value)) / (isSelectionPartfour.value ? 4 : 3); - const total = Math.round(rawTotal); + const total = Math.trunc(rawTotal); develop_result.value = total > 60 ? 1 : 0; diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue index 79c0be03c..16df6dfc5 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue @@ -255,7 +255,7 @@ const score5 = computed(() => { Number(other_training_percent.value)) / (isSelectionPartfour.value ? 4 : 3); - const total = Math.round(rawTotal); + const total = Math.trunc(rawTotal); develop_result.value = total > 60 ? 1 : 0; From f054dd54a4578414f6d56886eabacf1ab7d8426a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 20 Jul 2026 10:15:32 +0700 Subject: [PATCH 2/2] refactor: redirect to landing page on 404 permission error in messageError --- src/stores/mixin.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts index 40ea41b3c..8ef179cf0 100644 --- a/src/stores/mixin.ts +++ b/src/stores/mixin.ts @@ -362,13 +362,21 @@ export const useCounterMixin = defineStore("mixin", () => { const messageError = (q: any, e: any = "", msg: string = "") => { if (e.response !== undefined) { if (e.response.data.status !== undefined) { - if (e.response.data.status == 401) { + if ( + e.response.data.status == 401 || + (e.response.data.status == 404 && + e.response.data.message == "ไม่พบข้อมูลสิทธิ์") + ) { //invalid_token + const msg = + e.response.data.status == 401 + ? "ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง" + : e.response.data.message; q.dialog({ component: CustomComponent, componentProps: { title: `พบข้อผิดพลาด`, - message: `ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง`, + message: msg, icon: "warning", color: "red", onlycancel: true,