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