feat(registry-edit): implement API sortOrderByDate
This commit is contained in:
parent
019b43b450
commit
10c047ffe2
2 changed files with 22 additions and 10 deletions
|
|
@ -194,6 +194,7 @@ export default {
|
||||||
`${orgProfile}${type}/profileid/position`,
|
`${orgProfile}${type}/profileid/position`,
|
||||||
uploadProfile: (type: string, id: string) =>
|
uploadProfile: (type: string, id: string) =>
|
||||||
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
|
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
|
||||||
|
sortOrderByDate: `${orgProfile}/salaryTemp/sort-order`,
|
||||||
|
|
||||||
workflowCommanderOperate: `${workflow}/commander/operate`,
|
workflowCommanderOperate: `${workflow}/commander/operate`,
|
||||||
workflowCommanderSign: `${workflow}/commander/sign`,
|
workflowCommanderSign: `${workflow}/commander/sign`,
|
||||||
|
|
|
||||||
|
|
@ -871,16 +871,27 @@ function onCancelUpload() {
|
||||||
excelPreviewModal.value = false;
|
excelPreviewModal.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleSortByDate() {
|
/** ฟังก์ชันจัดเรียงข้อมูลตามวันที่*/
|
||||||
try {
|
function handleSortByDate() {
|
||||||
showLoader();
|
dialogConfirm(
|
||||||
// http.get(config.API.SortByDate)
|
$q,
|
||||||
await fetchData()
|
async () => {
|
||||||
} catch (error) {
|
try {
|
||||||
messageError($q, error);
|
showLoader();
|
||||||
} finally {
|
await http.put(config.API.sortOrderByDate, {
|
||||||
hideLoader();
|
type: empType.value.toLocaleUpperCase(),
|
||||||
}
|
profileId: profileId.value,
|
||||||
|
});
|
||||||
|
await fetchData();
|
||||||
|
} catch (error) {
|
||||||
|
messageError($q, error);
|
||||||
|
} finally {
|
||||||
|
hideLoader();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ยืนยันการเรียงลำดับข้อมูล",
|
||||||
|
"ต้องการยืนยันการเรียงลำดับข้อมูลนี้ใช่หรือไม่?"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue