From ecc10e16c9030cbe54d478f64beb9dee1eb50830 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 24 Mar 2026 16:50:26 +0700 Subject: [PATCH 1/9] feat:absentlate --- src/api/registry/api.registry.ts | 6 + .../GovernmentInformation/08_AbsentLate.vue | 424 ++++++++++++++++++ .../08_DialogAbsentLate.vue | 242 ++++++++++ .../detail/GovernmentInformation/Main.vue | 5 + .../interface/response/Government.ts | 19 +- .../04_registryPerson/stores/AbsentLate.ts | 19 + 6 files changed, 714 insertions(+), 1 deletion(-) create mode 100644 src/modules/04_registryPerson/components/detail/GovernmentInformation/08_AbsentLate.vue create mode 100644 src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue create mode 100644 src/modules/04_registryPerson/stores/AbsentLate.ts diff --git a/src/api/registry/api.registry.ts b/src/api/registry/api.registry.ts index 0cbfc086e..f3378e539 100644 --- a/src/api/registry/api.registry.ts +++ b/src/api/registry/api.registry.ts @@ -272,4 +272,10 @@ export default { profileAssistanceReturn: `${env.API_URI}/placement/repatriation`, profileAssistanceUpdateDelete: (type: string) => `${registryNew}${type}/assistance/update-delete/`, + + profileAbsentLate: (type: string) => `${registryNew}${type}/absent-late`, + profileAbsentLateUpdateDelete: (type: string) => `${registryNew}${type}/absent-late/update-delete`, + profileAbsentLateHistory: (id: string, type: string) => + `${registryNew}${type}/absent-late/history/${id}`, + }; diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_AbsentLate.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_AbsentLate.vue new file mode 100644 index 000000000..1ae40bde9 --- /dev/null +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_AbsentLate.vue @@ -0,0 +1,424 @@ + + + + + diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue new file mode 100644 index 000000000..3bc7b9c3e --- /dev/null +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue index da7af1456..3f30cf12e 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue @@ -14,6 +14,7 @@ import PerformSpecialWork from "@/modules/04_registryPerson/components/detail/Go import ActingPos from "@/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue"; //รักษาการในตำแหน่ง import HelpGovernmentDetail from "@/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue"; //ช่วยราชการ import Postion from "@/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue"; +import AbsentLate from "@/modules/04_registryPerson/components/detail/GovernmentInformation/08_AbsentLate.vue"; import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store"; const empType = ref(pathRegistryEmp(route.name?.toString() ?? "")); @@ -47,6 +48,7 @@ const storeRegistry = useRegistryNewDataStore(); + @@ -76,6 +78,9 @@ const storeRegistry = useRegistryNewDataStore(); :citizen-id="storeRegistry.citizenId" /> + + + { + const statusOps = ref([ + { name: "ขาดราชการ", id: "ABSENT" }, + { name: "มาสาย", id: "LATE" }, + ]); + + const stampTypeOps = ref([ + { name: "เต็มวัน", id: "FULL_DAY" }, + { name: "ครึ่งเช้า", id: "MORNING" }, + { name: "ครึ่งบ่าย ", id: "AFTERNOON" }, + ]); + + return { statusOps, stampTypeOps }; +}); From 0a5f64c17ca4f228fa7f785f9b663e5e8f51f42e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 25 Mar 2026 09:18:51 +0700 Subject: [PATCH 2/9] fix: payload profileEmployeeId --- .../GovernmentInformation/08_DialogAbsentLate.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue index 3bc7b9c3e..0697b5ad9 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue @@ -57,16 +57,23 @@ function onSubmit() { dialogConfirm($q, async () => { try { showLoader(); - const playload = { + const payload = { ...form, stampDate: convertDateToAPI(form.stampDate), - profileId: isStatusEdit.value ? undefined : profileId.value, + profileId: + !isStatusEdit.value && empType.value === "" + ? profileId.value + : undefined, + profileEmployeeId: + !isStatusEdit.value && empType.value !== "" + ? profileId.value + : undefined, }; const method = isStatusEdit.value ? "patch" : "post"; const url = isStatusEdit.value ? config.API.profileAbsentLate(empType.value) + `/${rowId.value}` : config.API.profileAbsentLate(empType.value); - await http[method](url, playload); + await http[method](url, payload); success($q, "บันทึกข้อมูลสำเร็จ"); props.fetchData(); closeDialog(); From e9c545a18d9010b8ad85a8cf5ab9aa171b802e66 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 25 Mar 2026 10:20:48 +0700 Subject: [PATCH 3/9] feat: add contact banner --- src/components/Dialogs/DialogDebug.vue | 9 ++++++++- src/views/Error404NotFound.vue | 6 ++++++ src/views/ErrorPermission.vue | 6 ++++++ src/views/MainLayout.vue | 8 ++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index 94c5c349f..cd5b3a78d 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -391,7 +391,14 @@ function onClose() { - + +
+ *พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ + 088-264-9800 +
+ + +
+ + พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ + 088-264-9800 +
diff --git a/src/views/ErrorPermission.vue b/src/views/ErrorPermission.vue index ec5e14aad..49429875f 100644 --- a/src/views/ErrorPermission.vue +++ b/src/views/ErrorPermission.vue @@ -18,6 +18,12 @@ label="กลับหน้าหลัก" no-caps /> + +
+ + พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ + 088-264-9800 +
diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 369ddee6d..36b6d7ff7 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -1282,6 +1282,14 @@ function onViewDetailNoti(url: string) { + +
+ + พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ + 088-264-9800 +
+
+ From 5f48063ae79424b67e82d7c5f7fdb2c195f8c566 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 25 Mar 2026 10:27:45 +0700 Subject: [PATCH 4/9] fix layout and select input --- .../08_DialogAbsentLate.vue | 64 +++++++++++-------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue index 0697b5ad9..4d0311de3 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue @@ -90,6 +90,17 @@ function closeDialog() { modal.value = false; } +watch( + () => form.stampType, + (stampType) => { + if (stampType === "FULL_DAY") { + form.stampAmount = "1.0"; + } else if (stampType === "MORNING" || stampType === "AFTERNOON") { + form.stampAmount = "0.5"; + } + } +); + watch( () => modal.value, (newVal) => { @@ -119,29 +130,31 @@ watch(
-
- +
+
+ +
-
+
-
+
-
+
@@ -229,7 +244,6 @@ watch( label="เหตุผล" hide-bottom-space type="textarea" - :rules="[(val:string) => !!val || `${'กรุณากรอกเหตุผล'}`]" />
From 140553666dc8d6da16310e16a0cc44d69cef429f Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 25 Mar 2026 11:05:28 +0700 Subject: [PATCH 5/9] fix --- src/components/Dialogs/DialogDebug.vue | 10 ++++------ src/components/FooterContact.vue | 13 +++++++++++++ src/views/MainLayout.vue | 9 +++------ 3 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 src/components/FooterContact.vue diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index cd5b3a78d..e84ef99da 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -11,6 +11,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; import DialogHeader from "@/components/DialogHeader.vue"; +import FooterContact from "@/components/FooterContact.vue"; const $q = useQuasar(); const store = usePositionKeycloakStore(); @@ -391,12 +392,9 @@ function onClose() { - -
- *พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ - 088-264-9800 + +
+
+
+ + + พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ + 088-264-9800 + +
+ + + + + diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 36b6d7ff7..3812a311d 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -28,6 +28,7 @@ import { tabList, tabListPlacement } from "../interface/request/main/main"; import LoginLinkage from "@/components/LoginLinkage.vue"; import DialogDebug from "@/components/Dialogs/DialogDebug.vue"; +import FooterContact from "@/components/FooterContact.vue"; // landing page config url const configParam = { @@ -1282,12 +1283,8 @@ function onViewDetailNoti(url: string) { - -
- - พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ - 088-264-9800 -
+ + From 2b0d3340ee4c838ff288d3b6d3d5ae56b87a4a92 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 25 Mar 2026 11:54:34 +0700 Subject: [PATCH 6/9] fix:tel --- src/components/FooterContact.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/FooterContact.vue b/src/components/FooterContact.vue index fe2123415..3aa672f3c 100644 --- a/src/components/FooterContact.vue +++ b/src/components/FooterContact.vue @@ -3,7 +3,8 @@ พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ - 088-264-9800 + 088-264-9800 +
From 59c188a3a99ba5bce70631bc40b9fc136d541a89 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 25 Mar 2026 11:59:14 +0700 Subject: [PATCH 7/9] fix:tel --- src/components/FooterContact.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/FooterContact.vue b/src/components/FooterContact.vue index 3aa672f3c..d8d7236c5 100644 --- a/src/components/FooterContact.vue +++ b/src/components/FooterContact.vue @@ -3,8 +3,9 @@ พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ - 088-264-9800 - + 088-264-9800 +
From c066ee577a8ecc706b7dbf2da90c074d9c572efd Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 25 Mar 2026 12:10:53 +0700 Subject: [PATCH 8/9] fix: style --- src/components/FooterContact.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/FooterContact.vue b/src/components/FooterContact.vue index d8d7236c5..45082f566 100644 --- a/src/components/FooterContact.vue +++ b/src/components/FooterContact.vue @@ -4,7 +4,9 @@ พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ 088-264-9800 + >088-264-9800
From 5830d2411867149b8fb0958cb504facd56246444 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 25 Mar 2026 16:55:15 +0700 Subject: [PATCH 9/9] refactor(ui): apply +543 year formatting to columns --- src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue | 2 +- .../components/detail/Achievement/03_Insignia.vue | 2 +- src/modules/07_insignia/components/2_Manage/InfoInsignia.vue | 2 +- src/modules/14_KPI/views/01_kpiRound.vue | 2 +- src/modules/15_development/views/EmployeeHistory.vue | 2 +- src/modules/15_development/views/History.vue | 2 +- src/modules/15_development/views/MainPage.vue | 2 +- src/modules/15_development/views/Scholarship.vue | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue b/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue index 15ecf3039..d23684dea 100644 --- a/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue +++ b/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue @@ -112,7 +112,7 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", format(val, row) { - return `${row.year + 543}`; + return `${row.year ? row.year + 543 : "-"}`; }, sort: (a: number, b: number) => b - a, }, diff --git a/src/modules/04_registryPerson/components/detail/Achievement/03_Insignia.vue b/src/modules/04_registryPerson/components/detail/Achievement/03_Insignia.vue index 5da6c11e0..4c5be3b21 100644 --- a/src/modules/04_registryPerson/components/detail/Achievement/03_Insignia.vue +++ b/src/modules/04_registryPerson/components/detail/Achievement/03_Insignia.vue @@ -92,7 +92,7 @@ const baseColumns = ref([ field: "year", headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (v) => v + 543, + format: (v) => (v ? v + 543 : "-"), sort: (a: string, b: string) => a .toString() diff --git a/src/modules/07_insignia/components/2_Manage/InfoInsignia.vue b/src/modules/07_insignia/components/2_Manage/InfoInsignia.vue index 3330aea56..2cf7b60c3 100644 --- a/src/modules/07_insignia/components/2_Manage/InfoInsignia.vue +++ b/src/modules/07_insignia/components/2_Manage/InfoInsignia.vue @@ -35,7 +35,7 @@ const columns = ref([ field: "year", headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (v) => v + 543, + format: (v) => (v ? v + 543 : "-"), }, { name: "receiveDate", diff --git a/src/modules/14_KPI/views/01_kpiRound.vue b/src/modules/14_KPI/views/01_kpiRound.vue index f6db8904d..46502850b 100644 --- a/src/modules/14_KPI/views/01_kpiRound.vue +++ b/src/modules/14_KPI/views/01_kpiRound.vue @@ -44,7 +44,7 @@ const columns = ref([ field: "year", headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (val) => val + 543, + format: (val) => (val ? val + 543 : "-"), }, { name: "durationKPI", diff --git a/src/modules/15_development/views/EmployeeHistory.vue b/src/modules/15_development/views/EmployeeHistory.vue index 87e7f696e..241666999 100644 --- a/src/modules/15_development/views/EmployeeHistory.vue +++ b/src/modules/15_development/views/EmployeeHistory.vue @@ -67,7 +67,7 @@ const columns = ref([ field: "year", headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (v) => v + 543, + format: (v) => (v ? v + 543 : "-"), }, { name: "citizenId", diff --git a/src/modules/15_development/views/History.vue b/src/modules/15_development/views/History.vue index 76a8079ea..a9806406c 100644 --- a/src/modules/15_development/views/History.vue +++ b/src/modules/15_development/views/History.vue @@ -44,7 +44,7 @@ const columns = ref([ field: "year", headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (v) => v + 543, + format: (v) => (v ? v + 543 : "-"), }, { name: "citizenId", diff --git a/src/modules/15_development/views/MainPage.vue b/src/modules/15_development/views/MainPage.vue index 7db45984f..397fd2b99 100644 --- a/src/modules/15_development/views/MainPage.vue +++ b/src/modules/15_development/views/MainPage.vue @@ -75,7 +75,7 @@ const columns = ref([ field: "year", headerStyle: "font-size: 14px", style: "font-size: 14px ; width:10%", - format: (val) => val + 543, + format: (val) => (val ? val + 543 : "-"), }, { name: "projectName", diff --git a/src/modules/15_development/views/Scholarship.vue b/src/modules/15_development/views/Scholarship.vue index 48d94b36c..12e494ddc 100644 --- a/src/modules/15_development/views/Scholarship.vue +++ b/src/modules/15_development/views/Scholarship.vue @@ -32,7 +32,7 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", format(val) { - return val + 543; + return val ? val + 543 : "-"; }, }, {