fix: change employee status with drawer alert
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
puriphatt 2025-09-17 14:27:05 +07:00
parent f4ac6859e3
commit 166211ac25

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