From 9d9cd92d6b27494710c9a06ed476742cd92758cd Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 16 Apr 2026 16:14:33 +0700 Subject: [PATCH 1/7] refactor(retire-old): standardize API response by renaming data to result --- src/modules/06_retirement/views/09_retirementOld.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/06_retirement/views/09_retirementOld.vue b/src/modules/06_retirement/views/09_retirementOld.vue index 0520a3c35..64c05c218 100644 --- a/src/modules/06_retirement/views/09_retirementOld.vue +++ b/src/modules/06_retirement/views/09_retirementOld.vue @@ -151,7 +151,7 @@ async function fetchDataRetirement() { firstNameTH: filter.value.firstNameTH.trim(), lastNameTH: filter.value.lastNameTH.trim(), }); - const data: RetirementOld = response.data.data; + const data: RetirementOld = response.data.result; pagination.value.rowsNumber = data.totalRecords; rows.value = data.dataRecords; } catch (error) { From 73335d7dd50dffc69d289e468c96ff926231b384 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 16 Apr 2026 20:55:51 +0700 Subject: [PATCH 2/7] add permission owner --- src/modules/05_placement/components/PersonalList/Table.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index bdf4ae494..557139d8b 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -1056,7 +1056,7 @@ onMounted(async () => { checkPermission($route)?.attrIsUpdate && props.row.isDraft && props.row.statusId === 'PREPARE-CONTAIN' && - DataStore.isOfficer + (DataStore.isOfficer || checkPermission($route)?.attrOwnership == 'OWNER') " clickable v-close-popup From 8a0a6ea873b56f01f50d0945c47547fd29d5456b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 17 Apr 2026 14:59:22 +0700 Subject: [PATCH 3/7] fix(command): validate if isIdofficer isBangkok fields to show warnings --- .../18_command/components/Step/1_Detail.vue | 20 ++++--------------- .../18_command/components/Step/View0_Live.vue | 13 +++++++----- src/modules/18_command/store/DetailStore.ts | 6 ++++-- src/modules/18_command/views/detail.vue | 13 ++++++++++++ 4 files changed, 29 insertions(+), 23 deletions(-) diff --git a/src/modules/18_command/components/Step/1_Detail.vue b/src/modules/18_command/components/Step/1_Detail.vue index ff3f564a6..2a3f3b60f 100644 --- a/src/modules/18_command/components/Step/1_Detail.vue +++ b/src/modules/18_command/components/Step/1_Detail.vue @@ -61,7 +61,6 @@ let formData = reactive({ }); const commandVolume = ref(""); //เล่มที่ const commandChapter = ref(""); //ตอนที่ -const isIdofficer = ref(false); //เช็ค สกจ. const rows = ref>([]); const columns = ref([ @@ -114,17 +113,7 @@ const visibleColumns = ref>([ const modalAddOperator = ref(false); // แสดงเพิ่มรายชื่อลงนามในแนบท้ายคำสั่ง -/** ฟังก์ชันเช็ค สกจ.*/ -async function fetchCheckIdofficer() { - await http - .get(config.API.checkIdofficer) - .then((res) => { - isIdofficer.value = res.data.result; - }) - .catch((err) => { - messageError($q, err); - }); -} + /** * ฟังก์ชันบันทึกข้อมูลรายละเอียดคำสั่ง @@ -133,7 +122,7 @@ async function fetchCheckIdofficer() { async function onSubmit() { //ถ้าเป็น สกจ. ต้องเลือกประเภทคำสั่งด้วย if ( - isIdofficer.value && + store.isIdofficer && formData.isBangkok !== "BANGKOK" && formData.isBangkok !== "OFFICE" ) { @@ -225,7 +214,6 @@ function onDeleteData(id: string) { onMounted(async () => { try { showLoader(); - await fetchCheckIdofficer(); await fetchDataOperatorList(); formData.commandNo = props.formCommandList.commandNo; formData.commandYear = props.formCommandList.commandYear; @@ -235,7 +223,7 @@ onMounted(async () => { formData.issue = props.formCommandList.issue; formData.commandAffectDate = props.formCommandList.commandAffectDate; formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate; - formData.isBangkok = !isIdofficer.value + formData.isBangkok = !store.isIdofficer ? null : props.formCommandList.isBangkok; commandCode.value = props.formCommandList.commandCode; @@ -500,7 +488,7 @@ onMounted(async () => {
{ const readonly = ref(false); const dataCommand = ref(); const status = ref(""); - const isSalary = ref(false) + const isSalary = ref(false); + const isIdofficer = ref(false); function checkStep(val: string) { status.value = val; switch (val) { @@ -39,6 +40,7 @@ export const useCommandDetail = defineStore("commandDetailStore", () => { readonly, status, dataCommand, - isSalary + isSalary, + isIdofficer, }; }); diff --git a/src/modules/18_command/views/detail.vue b/src/modules/18_command/views/detail.vue index 37ab3326f..5e41124dc 100644 --- a/src/modules/18_command/views/detail.vue +++ b/src/modules/18_command/views/detail.vue @@ -92,12 +92,25 @@ async function fetchDataCommandList() { }); } +/** ฟังก์ชันเช็ค สกจ.*/ +async function fetchCheckIdofficer() { + await http + .get(config.API.checkIdofficer) + .then((res) => { + store.isIdofficer = res.data.result; + }) + .catch((err) => { + messageError($q, err); + }); +} + /** * ทำงานเมื่อ Components ถูกเรียกใช้งาน * กำหนดค่า `store.readonly` เมื่อ route.name เป็น "commandViewDetailPage" จะอ่านข้อมูลได้อย่างเดียว */ onMounted(async () => { await fetchDataCommandList(); + await fetchCheckIdofficer(); store.readonly = route.name === "commandViewDetailPage" || formCommandList.status === "REPORTED" || From d6e75d6966a4d376d4978256d70a7004c16b81a0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 17 Apr 2026 15:29:11 +0700 Subject: [PATCH 4/7] refactor(command): dialogMessageNotify messageWarning --- src/modules/18_command/components/Step/View0_Live.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/18_command/components/Step/View0_Live.vue b/src/modules/18_command/components/Step/View0_Live.vue index a66025639..263445a25 100644 --- a/src/modules/18_command/components/Step/View0_Live.vue +++ b/src/modules/18_command/components/Step/View0_Live.vue @@ -321,7 +321,7 @@ function onConfirmOrder() { } else { const messageWarning = !store.isIdofficer ? "ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม และวันที่คำสั่งมีผลให้ครบ" - : "ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม วันที่คำสั่งมีผล และเลือกประเภทคำสั่งให้ครบ"; + : "ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม วันที่คำสั่งมีผล และเลือกคำสั่งให้ครบ"; dialogMessageNotify($q, messageWarning); } } From cba8f4b70308c2e538e63e68041f4b5f2b3d4d13 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 20 Apr 2026 09:40:16 +0700 Subject: [PATCH 5/7] =?UTF-8?q?fixed#2435=20=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=9A=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=97?= =?UTF-8?q?=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=95?= =?UTF-8?q?=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87/?= =?UTF-8?q?=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80=E0=B8=94=E0=B8=B7?= =?UTF-8?q?=E0=B8=AD=E0=B8=99=20>>=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88?= =?UTF-8?q?=E0=B8=87/=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80?= =?UTF-8?q?=E0=B8=94=E0=B8=B7=E0=B8=AD=E0=B8=99=20(=E0=B8=8A=E0=B8=B7?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=8A=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=81?= =?UTF-8?q?=E0=B8=A3=E0=B8=AD=E0=B8=81=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B8=AB=E0=B8=B2=E0=B8=A2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../04_registryPerson/views/edit/components/FormPosition.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/04_registryPerson/views/edit/components/FormPosition.vue b/src/modules/04_registryPerson/views/edit/components/FormPosition.vue index c30fec131..b6ef8c829 100644 --- a/src/modules/04_registryPerson/views/edit/components/FormPosition.vue +++ b/src/modules/04_registryPerson/views/edit/components/FormPosition.vue @@ -706,6 +706,7 @@ function classInput(val: boolean) { hide-bottom-space autocomplete="on" name="organization" + :label="`${'หน่วยงาน'}`" />
From 0ccda33b37954ce32256cf0a31db12165852e04b Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 20 Apr 2026 09:47:20 +0700 Subject: [PATCH 6/7] =?UTF-8?q?fixed#1565=20=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=9A=E0=B9=81=E0=B8=88=E0=B9=89=E0=B8=87=E0=B8=9B=E0=B8=B1?= =?UTF-8?q?=E0=B8=8D=E0=B8=AB=E0=B8=B2=E0=B8=9A=E0=B8=B1=E0=B8=87=E0=B8=84?= =?UTF-8?q?=E0=B8=B1=E0=B8=9A=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=81=E0=B8=A3?= =?UTF-8?q?=E0=B8=AD=E0=B8=81=E0=B8=AD=E0=B8=B5=E0=B9=80=E0=B8=A1=E0=B8=A5?= =?UTF-8?q?=20=E0=B9=81=E0=B8=A5=E0=B8=B0=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=B8=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=84=E0=B8=A7=E0=B8=B2?= =?UTF-8?q?=E0=B8=A1=E0=B8=A7=E0=B9=88=E0=B8=B2=20admin=20=E0=B8=88?= =?UTF-8?q?=E0=B8=B0=E0=B8=95=E0=B8=B4=E0=B8=94=E0=B8=95=E0=B9=88=E0=B8=AD?= =?UTF-8?q?=E0=B8=81=E0=B8=A5=E0=B8=B1=E0=B8=9A=E0=B8=97=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=E0=B8=AD=E0=B8=B5=E0=B9=80=E0=B8=A1=E0=B8=A5=E0=B9=80=E0=B8=9B?= =?UTF-8?q?=E0=B9=87=E0=B8=99=E0=B8=A5=E0=B8=B3=E0=B8=94=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B9=81=E0=B8=A3=E0=B8=81=E0=B8=81=E0=B8=A3=E0=B8=B8=E0=B8=93?= =?UTF-8?q?=E0=B8=B2=E0=B8=95=E0=B8=A3=E0=B8=A7=E0=B8=88=E0=B8=AA=E0=B8=AD?= =?UTF-8?q?=E0=B8=9A=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=AD=E0=B8=B5=E0=B9=80?= =?UTF-8?q?=E0=B8=A1=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/DialogDebug.vue | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index e84ef99da..6443dff90 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -354,6 +354,11 @@ function onClose() {
+
+
+ ผู้ดูแลระบบจะติดต่อกลับผ่านทางอีเมลที่ท่านระบุ กรุณาตรวจสอบอีเมลของท่านเป็นระยะ +
+
@@ -378,12 +380,6 @@ function onClose() { v-model="formData.phone" class="inputgreen" hide-bottom-space - :rules="[ - () => - !!formData.email || - !!formData.phone || - 'กรุณากรอกอีเมลหรือเบอร์โทรติดต่อกลับ', - ]" />
From 519372056780d3c5a67983f47cc367ee51c7de0a Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 20 Apr 2026 09:55:27 +0700 Subject: [PATCH 7/7] fixed format email --- src/components/Dialogs/DialogDebug.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index 6443dff90..42230b6f4 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -368,7 +368,11 @@ function onClose() { class="inputgreen" hide-bottom-space :rules="[ - (val: string) => !!val || 'กรุณากรอกอีเมลติดต่อกลับ', + (val: string) => !!val || 'กรุณากรอกที่อยู่อีเมล', + (val: string) => { + const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + return emailPattern.test(val) || 'กรุณากรอกที่อยู่อีเมลในรูปแบบที่ถูกต้อง'; + } ]" />