Merge branch 'develop' into devTee
This commit is contained in:
commit
ab4db32ac2
2 changed files with 8 additions and 7 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue