From 6392659c23bc6e7ba924f43ff72c1bc4f005353a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 2 Jul 2026 10:52:22 +0700 Subject: [PATCH 1/5] refactor(recruiting): add filter to compete and disable Page import --- src/modules/03_recruiting/components/Table.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/03_recruiting/components/Table.vue b/src/modules/03_recruiting/components/Table.vue index b5f2877f6..6ff82cda4 100644 --- a/src/modules/03_recruiting/components/Table.vue +++ b/src/modules/03_recruiting/components/Table.vue @@ -56,6 +56,7 @@ const optionsStatus = ref([ { label: "ขาดสอบ", value: "missed_exam" }, { label: "ผ่าน", value: "pass" }, { label: "ไม่ผ่าน", value: "notpass" }, + { label: "อื่น ๆ", value: "other" }, ]); const emit = defineEmits([ From 8272a2b29129cac27ae189706fcfb00c04c3d4d9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 13 Jul 2026 10:25:08 +0700 Subject: [PATCH 2/5] refactror(probation): add Check Box other_training --- .../FormEvaluation/FormEvaluateScore.vue | 17 +++++++++++++++-- .../FormEvaluation/FormEvaluateScoreAdd.vue | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index 6017dcaa3..7cd5fdf42 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -97,6 +97,8 @@ const develop_result_option = ref([ const isCheckFile = ref(false); +const isSelectionPartfour = ref(false); + // score const score1 = computed(() => { if ( @@ -216,7 +218,7 @@ const score4 = computed(() => { Number(self_learning.value) + Number(training_seminar.value) + Number(other_training.value)) / - 4 + (isSelectionPartfour.value ? 4 : 3) ); }); const score5 = computed(() => { @@ -225,7 +227,7 @@ const score5 = computed(() => { Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / - 4; + (isSelectionPartfour.value ? 4 : 3); develop_result.value = total > 60 ? 1 : 0; @@ -1133,10 +1135,20 @@ onMounted(async () => {
+ 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
{
([ // footer const dateAutherise = ref(null); +const isSelectionPartfour = ref(false); + onMounted(() => { fecthAssign(assignId.value); }); @@ -243,7 +245,7 @@ const score4 = computed(() => { Number(self_learning.value) + Number(training_seminar.value) + Number(other_training.value)) / - 4 + (isSelectionPartfour.value ? 4 : 3) ); }); const score5 = computed(() => { @@ -252,7 +254,7 @@ const score5 = computed(() => { Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / - 4; + (isSelectionPartfour.value ? 4 : 3); develop_result.value = total > 60 ? 1 : 0; @@ -1214,10 +1216,20 @@ watch(lengthdiscipline_level, (newLength) => {
+ 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
{ outlined dense type="number" + :disable="!isSelectionPartfour" v-model="other_training_percent" :rules="[(val:number) => val <= 100 || 'ร้อยละต้องไม่เกิน 100']" hide-bottom-space From 4dfc9bf4d6d4d9dadf87475bbcb076b5796040ab Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 13 Jul 2026 15:01:41 +0700 Subject: [PATCH 3/5] refactor(probation): calculate score4 score5 --- .../probation/FormEvaluation/FormEvaluateScore.vue | 13 +++++++------ .../FormEvaluation/FormEvaluateScoreAdd.vue | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index 7cd5fdf42..16a32d20b 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -214,21 +214,22 @@ const percent_sum: any = computed(() => { }); const score4 = computed(() => { return ( - (Number(orientation.value) + - Number(self_learning.value) + - Number(training_seminar.value) + - Number(other_training.value)) / - (isSelectionPartfour.value ? 4 : 3) + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + (isSelectionPartfour.value ? Number(other_training.value) : 0) ); }); const score5 = computed(() => { - const total = + const rawTotal = (Number(orientation_percent.value) + Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / (isSelectionPartfour.value ? 4 : 3); + const total = Math.round(rawTotal); + develop_result.value = total > 60 ? 1 : 0; return total; diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue index 047b3db6e..79c0be03c 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue @@ -241,21 +241,22 @@ const percent_sum: any = computed(() => { }); const score4 = computed(() => { return ( - (Number(orientation.value) + - Number(self_learning.value) + - Number(training_seminar.value) + - Number(other_training.value)) / - (isSelectionPartfour.value ? 4 : 3) + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + (isSelectionPartfour.value ? Number(other_training.value) : 0) ); }); const score5 = computed(() => { - const total = + const rawTotal = (Number(orientation_percent.value) + Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / (isSelectionPartfour.value ? 4 : 3); + const total = Math.round(rawTotal); + develop_result.value = total > 60 ? 1 : 0; return total; 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 4/5] 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 5/5] 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,