0
0
Fork 0

fix: CustomerBillingData

This commit is contained in:
Javier Segarra 2024-09-12 21:26:28 +02:00
parent fa408dc226
commit aca13d9119
1 changed files with 6 additions and 14 deletions

View File

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