feat(registry-edit): implement API sortOrderByDate

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-05-22 14:03:41 +07:00
parent 019b43b450
commit 10c047ffe2
2 changed files with 22 additions and 10 deletions

View file

@ -194,6 +194,7 @@ export default {
`${orgProfile}${type}/profileid/position`,
uploadProfile: (type: string, id: string) =>
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
sortOrderByDate: `${orgProfile}/salaryTemp/sort-order`,
workflowCommanderOperate: `${workflow}/commander/operate`,
workflowCommanderSign: `${workflow}/commander/sign`,

View file

@ -871,16 +871,27 @@ function onCancelUpload() {
excelPreviewModal.value = false;
}
async function handleSortByDate() {
try {
showLoader();
// http.get(config.API.SortByDate)
await fetchData()
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
/** ฟังก์ชันจัดเรียงข้อมูลตามวันที่*/
function handleSortByDate() {
dialogConfirm(
$q,
async () => {
try {
showLoader();
await http.put(config.API.sortOrderByDate, {
type: empType.value.toLocaleUpperCase(),
profileId: profileId.value,
});
await fetchData();
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
},
"ยืนยันการเรียงลำดับข้อมูล",
"ต้องการยืนยันการเรียงลำดับข้อมูลนี้ใช่หรือไม่?"
);
}
onMounted(async () => {