refactor: header can't edit customer is INACTIVE

This commit is contained in:
Net 2024-09-05 13:48:45 +07:00
parent 7bf30ab0a4
commit 850289f23d
3 changed files with 37 additions and 18 deletions

View file

@ -2800,6 +2800,7 @@ const emptyCreateDialog = ref(false);
customerFormState.readonly === true) ||
customerFormState.dialogType === 'info'
"
:hide-action="customerFormData.status === 'INACTIVE'"
:action-disabled="customerFormState.branchIndex !== -1"
id="form-basic-info-customer"
:create="customerFormState.dialogType === 'create'"
@ -2862,7 +2863,8 @@ const emptyCreateDialog = ref(false);
@click="customerFormStore.addCurrentCustomerBranch()"
v-if="
customerFormState.branchIndex === -1 &&
!!customerFormState.editCustomerId
!!customerFormState.editCustomerId &&
customerFormData.status !== 'INACTIVE'
"
:disabled="!customerFormState.readonly"
/>
@ -2959,6 +2961,7 @@ const emptyCreateDialog = ref(false);
<EmployerFormBranch
v-if="!!customerFormState.editCustomerId"
:index="idx"
:hide-action="customerFormData.status === 'INACTIVE'"
v-model:customer="customerFormData"
v-model:customer-branch="
customerFormData.customerBranch[idx]