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(); 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 {