From 6be24fcab3f2ff50f41246dbe09f8de41e5a602d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 5 Mar 2025 17:15:46 +0700 Subject: [PATCH 1/2] =?UTF-8?q?API=20=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/detail/GovernmentInformation/07_Position.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue index 8a3f85595..7bbc69e65 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue @@ -594,8 +594,8 @@ function onSubmit() { try { const url = isStatusEdit.value - ? config.API.profileListSalaryPositionNew(salaryId.value, empType.value) - : config.API.profileSalaryPositionNew(empType.value); + ? config.API.profileListSalaryNew(salaryId.value, empType.value) + : config.API.profileSalaryNew(empType.value); const method = isStatusEdit.value ? "patch" : "post"; await http[method](url, formData); await fetchListSalary(); From a67c3c1a37b5d1b68c380bc49d165cf3a226abc0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 5 Mar 2025 17:39:58 +0700 Subject: [PATCH 2/2] fix formatDatePosition --- src/stores/mixin.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts index fd4adacb9..40ea4b8d1 100644 --- a/src/stores/mixin.ts +++ b/src/stores/mixin.ts @@ -1154,12 +1154,13 @@ export const useCounterMixin = defineStore("mixin", () => { const m = parseInt(month); const d = parseInt(day); - const parts = []; - if (y > 0) parts.push(`${y} ปี`); - if (m > 0) parts.push(`${m} เดือน`); - if (d > 0) parts.push(`${d} วัน`); + // const parts = []; + // if (y > 0) parts.push(`${y} ปี`); + // if (m > 0) parts.push(`${m} เดือน`); + // if (d > 0) parts.push(`${d} วัน`); - return parts.length > 0 ? parts.join(" ") : ""; // กรณีที่ทั้งหมดเป็น 0 + // return parts.length > 0 ? parts.join(" ") : ""; // กรณีที่ทั้งหมดเป็น 0 + return `${y} ปี ${m} เดือน ${d} วัน`; } return {