feat: delete employee from drawer info

This commit is contained in:
puriphatt 2024-06-12 08:54:16 +00:00
parent f5a746e84c
commit 70664067e5

View file

@ -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);