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`,
|
||||
uploadProfile: (type: string, id: string) =>
|
||||
`${organization}/upload/${type}-profileSalaryTemp/${id}`,
|
||||
sortOrderByDate: `${orgProfile}/salaryTemp/sort-order`,
|
||||
|
||||
workflowCommanderOperate: `${workflow}/commander/operate`,
|
||||
workflowCommanderSign: `${workflow}/commander/sign`,
|
||||
|
|
|
|||
|
|
@ -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 () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue