feat: employee drawer info undo
This commit is contained in:
parent
60431904ce
commit
c69283e1b1
1 changed files with 9 additions and 3 deletions
|
|
@ -714,7 +714,13 @@ async function submitBranch() {
|
|||
}
|
||||
|
||||
function undo() {
|
||||
infoDrawerEdit.value = false;
|
||||
if (selectorLabel.value === 'EMPLOYER') infoDrawerEdit.value = false;
|
||||
|
||||
if (selectorLabel.value === 'EMPLOYEE') {
|
||||
if (!currentEmployee.value) return;
|
||||
infoDrawerEmployeeEdit.value = false;
|
||||
assignFormDataEmployee(currentEmployee.value.id);
|
||||
}
|
||||
}
|
||||
|
||||
async function employeeFilterOwnerBranch(
|
||||
|
|
@ -2256,8 +2262,8 @@ watch(fieldSelectedCustomer, async () => {
|
|||
v-model:drawer-open="infoDrawerEmployee"
|
||||
:is-edit="infoDrawerEmployeeEdit"
|
||||
:editData="() => (infoDrawerEmployeeEdit = true)"
|
||||
:undo="() => (infoDrawerEmployeeEdit = false)"
|
||||
:close="() => clearFormEmployee()"
|
||||
:undo="undo"
|
||||
:close="clearFormEmployee"
|
||||
:deleteData="
|
||||
() => {
|
||||
currentEmployee && onDelete(currentEmployee.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue