Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2025-03-05 18:08:04 +07:00
commit ab4db32ac2
2 changed files with 8 additions and 7 deletions

View file

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

View file

@ -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 {