fix load รักษาการตำแหน่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-10-09 11:24:39 +07:00
parent b4f6c41021
commit 23e4b14a26

View file

@ -70,7 +70,6 @@ async function updateSelected(data: PosMaster) {
// function fetch ,fetch
await Promise.all([fetchPosMaster(), fetchListAct()]).finally(() => {
isLaod.value = false;
console.log("test");
});
}
@ -188,6 +187,8 @@ function selectPosition(data: ListPerson) {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
@ -220,11 +221,13 @@ function onSwapPerson(type: string, id: string) {
showLoader();
http
.get(config.API.orgPosAct + `/swap/${type}/${id}`)
.then(() => {
fetchListAct();
.then(async () => {
await fetchListAct();
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
@ -244,6 +247,8 @@ function onDelete(id: string) {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
});