fix: change employee status with drawer alert
This commit is contained in:
parent
0ad017309f
commit
fcafaeebc0
1 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue