forked from verdnatura/salix-front
fix: CustomerBillingData
This commit is contained in:
parent
fa408dc226
commit
aca13d9119
|
@ -3,7 +3,6 @@ import { ref } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
@ -14,8 +13,6 @@ import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
|||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const payMethods = ref([]);
|
||||
const bankEntitiesOptions = ref([]);
|
||||
const bankEntitiesRef = ref(null);
|
||||
|
||||
const filter = {
|
||||
|
@ -31,15 +28,6 @@ const getBankEntities = (data, formData) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData @on-fetch="(data) => (payMethods = data)" auto-load url="PayMethods" />
|
||||
<FetchData
|
||||
ref="bankEntitiesRef"
|
||||
@on-fetch="(data) => (bankEntitiesOptions = data)"
|
||||
:filter="filter"
|
||||
auto-load
|
||||
url="BankEntities"
|
||||
/>
|
||||
|
||||
<FormModel
|
||||
:url-update="`Clients/${route.params.id}`"
|
||||
:url="`Clients/${route.params.id}/getCard`"
|
||||
|
@ -49,8 +37,9 @@ const getBankEntities = (data, formData) => {
|
|||
<template #form="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
auto-load
|
||||
url="PayMethods"
|
||||
:label="t('Billing data')"
|
||||
:options="payMethods"
|
||||
hide-selected
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
|
@ -69,7 +58,10 @@ const getBankEntities = (data, formData) => {
|
|||
</VnInput>
|
||||
<VnSelectDialog
|
||||
:label="t('Swift / BIC')"
|
||||
:options="bankEntitiesOptions"
|
||||
ref="bankEntitiesRef"
|
||||
:filter="filter"
|
||||
auto-load
|
||||
url="BankEntities"
|
||||
:acls="[{ model: 'BankEntity', props: '*', accessType: 'WRITE' }]"
|
||||
:rules="validate('Worker.bankEntity')"
|
||||
hide-selected
|
||||
|
|
Loading…
Reference in New Issue