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);
|
await employeeStore.deleteById(id);
|
||||||
const resultList = await employeeStore.fetchList();
|
const resultList = await employeeStore.fetchList();
|
||||||
if (resultList) listEmployee.value = resultList.result;
|
if (resultList) listEmployee.value = resultList.result;
|
||||||
|
clearFormEmployee();
|
||||||
},
|
},
|
||||||
cancel: () => {},
|
cancel: () => {},
|
||||||
});
|
});
|
||||||
|
|
@ -2256,6 +2257,11 @@ watch(fieldSelectedCustomer, async () => {
|
||||||
:editData="() => (infoDrawerEmployeeEdit = true)"
|
:editData="() => (infoDrawerEmployeeEdit = true)"
|
||||||
:undo="() => (infoDrawerEmployeeEdit = false)"
|
:undo="() => (infoDrawerEmployeeEdit = false)"
|
||||||
:close="() => clearFormEmployee()"
|
:close="() => clearFormEmployee()"
|
||||||
|
:deleteData="
|
||||||
|
() => {
|
||||||
|
currentEmployee && onDelete(currentEmployee.id);
|
||||||
|
}
|
||||||
|
"
|
||||||
:submit="
|
:submit="
|
||||||
() => {
|
() => {
|
||||||
currentEmployee && onSubmitEdit(currentEmployee.id);
|
currentEmployee && onSubmitEdit(currentEmployee.id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue