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() {
|
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(
|
async function employeeFilterOwnerBranch(
|
||||||
|
|
@ -2256,8 +2262,8 @@ watch(fieldSelectedCustomer, async () => {
|
||||||
v-model:drawer-open="infoDrawerEmployee"
|
v-model:drawer-open="infoDrawerEmployee"
|
||||||
:is-edit="infoDrawerEmployeeEdit"
|
:is-edit="infoDrawerEmployeeEdit"
|
||||||
:editData="() => (infoDrawerEmployeeEdit = true)"
|
:editData="() => (infoDrawerEmployeeEdit = true)"
|
||||||
:undo="() => (infoDrawerEmployeeEdit = false)"
|
:undo="undo"
|
||||||
:close="() => clearFormEmployee()"
|
:close="clearFormEmployee"
|
||||||
:deleteData="
|
:deleteData="
|
||||||
() => {
|
() => {
|
||||||
currentEmployee && onDelete(currentEmployee.id);
|
currentEmployee && onDelete(currentEmployee.id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue