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