refactor: edit branchNo -> index
This commit is contained in:
parent
758a4f01f3
commit
bbe7604ab2
1 changed files with 5 additions and 4 deletions
|
|
@ -5,7 +5,6 @@ import { useQuasar } from 'quasar';
|
|||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { getUserId, getRole } from 'src/services/keycloak';
|
||||
|
||||
import { calculateAge, dateFormat } from 'src/utils/datetime';
|
||||
import useCustomerStore from 'stores/customer';
|
||||
import useEmployeeStore from 'stores/employee';
|
||||
import useMyBranchStore from 'stores/my-branch';
|
||||
|
|
@ -1630,11 +1629,11 @@ const emptyCreateDialog = ref(false);
|
|||
name: $t('customer.form.group.branch'),
|
||||
anchor: 'form-branch-customer-branch',
|
||||
},
|
||||
...(customerFormData.customerBranch?.map((v) => ({
|
||||
...(customerFormData.customerBranch?.map((v, i) => ({
|
||||
name: $t('customer.form.branch.title', {
|
||||
name: v.branchNo || 0,
|
||||
name: i,
|
||||
}),
|
||||
anchor: `form-branch-customer-no-${v.branchNo}`,
|
||||
anchor: `form-branch-customer-no-${i}`,
|
||||
sub: true,
|
||||
})) || []),
|
||||
]"
|
||||
|
|
@ -1764,8 +1763,10 @@ const emptyCreateDialog = ref(false);
|
|||
>
|
||||
<EmployerFormBranch
|
||||
v-if="!!customerFormState.editCustomerId"
|
||||
:index="idx"
|
||||
v-model:customer-branch="customerFormData.customerBranch[idx]"
|
||||
:customer-type="customerFormData.customerType"
|
||||
:customer-name="`${customerFormData.firstName} ${customerFormData.lastName}`"
|
||||
:action-disabled="
|
||||
!customerFormState.readonly ||
|
||||
(customerFormState.branchIndex !== -1 &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue