salary ==> fix bug

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-27 13:36:41 +07:00
parent 07b50dca80
commit 02f0eac63a

View file

@ -168,17 +168,19 @@ function onEdit(data: EmployeeRateSalary) {
*/
function onDelete(id: string) {
dialogRemove($q, () => {
showLoader();
http
.delete(config.API.salaryEmployeeRateListByid(id))
.then(() => {
fetchSalalyEmployeeRate();
success($q, "ลบข้อมูลสำเร็จ");
.then(async () => {
await fetchSalalyEmployeeRate();
await success($q, "ลบข้อมูลสำเร็จ");
})
.catch((err) => {
messageError($q, err);
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
});
}
@ -225,8 +227,7 @@ watch(
);
onMounted(async () => {
await fetchDataDetail();
await fetchSalalyEmployeeRate();
await Promise.all([fetchDataDetail(), fetchSalalyEmployeeRate()]);
});
</script>
<template>