refactor: handle btn add one at a time

This commit is contained in:
Thanaphon Frappet 2024-11-13 11:58:52 +07:00
parent 202e8c2e6f
commit e2210e4466

View file

@ -2525,7 +2525,16 @@ const emptyCreateDialog = ref(false);
name: $t('customerEmployee.form.group.visa'),
anchor: 'drawer-visa',
tab: 'visa',
useBtn: true,
useBtn:
currentFromDataEmployee.employeeVisa?.filter((item) => {
if (item.id === undefined) {
return true;
}
return false;
}).length === 0 &&
employeeFormState.currentIndexVisa === -1
? true
: false,
},
...(currentFromDataEmployee.employeeVisa?.map((v, i) => ({
@ -4268,7 +4277,16 @@ const emptyCreateDialog = ref(false);
name: $t('customerEmployee.form.group.visa'),
anchor: 'drawer-visa',
tab: 'visa',
useBtn: true,
useBtn:
currentFromDataEmployee.employeeVisa?.filter((item) => {
if (item.id === undefined) {
return true;
}
return false;
}).length === 0 &&
employeeFormState.currentIndexVisa === -1
? true
: false,
},
...(currentFromDataEmployee.employeeVisa?.map((v, i) => ({