fix: change employee status with drawer alert

This commit is contained in:
puriphatt 2025-09-17 14:27:05 +07:00 committed by Methapon2001
parent 0ad017309f
commit fcafaeebc0

View file

@ -224,9 +224,11 @@ async function toggleStatusEmployee(
status: !status ? 'ACTIVE' : 'INACTIVE', status: !status ? 'ACTIVE' : 'INACTIVE',
firstNameEN: employeeName, firstNameEN: employeeName,
}); });
if (res && employeeFormState.value.drawerModal) if (res && employeeFormState.value.drawerModal) {
currentFromDataEmployee.value.status = res.status; currentFromDataEmployee.value.status = res.status;
}
await employeeFormStore.assignFormDataEmployee(id);
await fetchListEmployee({ mobileFetch: $q.screen.xs }); await fetchListEmployee({ mobileFetch: $q.screen.xs });
flowStore.rotate(); flowStore.rotate();
} }
@ -2095,6 +2097,14 @@ onMounted(async () => {
<DrawerEmployee <DrawerEmployee
:fetch-list-employee="fetchListEmployee" :fetch-list-employee="fetchListEmployee"
:current-tab="currentTab" :current-tab="currentTab"
@change-status="
(s) =>
triggerChangeStatus(
currentFromDataEmployee.id,
s,
currentFromDataEmployee.firstNameEN,
)
"
/> />
<DialogForm <DialogForm