feat: delete employee from drawer info
This commit is contained in:
parent
f5a746e84c
commit
70664067e5
1 changed files with 6 additions and 0 deletions
|
|
@ -687,6 +687,7 @@ async function onDelete(id: string) {
|
|||
await employeeStore.deleteById(id);
|
||||
const resultList = await employeeStore.fetchList();
|
||||
if (resultList) listEmployee.value = resultList.result;
|
||||
clearFormEmployee();
|
||||
},
|
||||
cancel: () => {},
|
||||
});
|
||||
|
|
@ -2256,6 +2257,11 @@ watch(fieldSelectedCustomer, async () => {
|
|||
:editData="() => (infoDrawerEmployeeEdit = true)"
|
||||
:undo="() => (infoDrawerEmployeeEdit = false)"
|
||||
:close="() => clearFormEmployee()"
|
||||
:deleteData="
|
||||
() => {
|
||||
currentEmployee && onDelete(currentEmployee.id);
|
||||
}
|
||||
"
|
||||
:submit="
|
||||
() => {
|
||||
currentEmployee && onSubmitEdit(currentEmployee.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue