forked from verdnatura/salix-front
supplier account changes
This commit is contained in:
parent
b0d43edbce
commit
ff94d7e43d
|
@ -32,8 +32,8 @@ const countriesFilter = {
|
||||||
|
|
||||||
const countriesOptions = ref([]);
|
const countriesOptions = ref([]);
|
||||||
|
|
||||||
const onDataSaved = (data) => {
|
const onDataSaved = (formData, requestResponse) => {
|
||||||
emit('onDataSaved', data);
|
emit('onDataSaved', formData, requestResponse);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ const onDataSaved = (data) => {
|
||||||
:title="t('title')"
|
:title="t('title')"
|
||||||
:subtitle="t('subtitle')"
|
:subtitle="t('subtitle')"
|
||||||
:form-initial-data="bankEntityFormData"
|
:form-initial-data="bankEntityFormData"
|
||||||
@on-data-saved="onDataSaved($event)"
|
@on-data-saved="onDataSaved"
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data, validate }">
|
<template #form-inputs="{ data, validate }">
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
|
|
@ -42,8 +42,8 @@ const { t } = useI18n();
|
||||||
const closeButton = ref(null);
|
const closeButton = ref(null);
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
|
|
||||||
const onDataSaved = (dataSaved) => {
|
const onDataSaved = (formData, requestResponse) => {
|
||||||
emit('onDataSaved', dataSaved);
|
emit('onDataSaved', formData, requestResponse);
|
||||||
closeForm();
|
closeForm();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ const closeForm = () => {
|
||||||
:default-actions="false"
|
:default-actions="false"
|
||||||
:url-create="urlCreate"
|
:url-create="urlCreate"
|
||||||
:model="model"
|
:model="model"
|
||||||
@on-data-saved="onDataSaved($event)"
|
@on-data-saved="onDataSaved"
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<span ref="closeButton" class="close-icon" v-close-popup>
|
<span ref="closeButton" class="close-icon" v-close-popup>
|
||||||
|
|
|
@ -18,13 +18,16 @@ const quasar = useQuasar();
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const bankEntitiesRef = ref(null);
|
||||||
const supplier = ref(null);
|
const supplier = ref(null);
|
||||||
const supplierAccountRef = ref(null);
|
const supplierAccountRef = ref(null);
|
||||||
const wireTransferFk = ref(null);
|
const wireTransferFk = ref(null);
|
||||||
const bankEntitiesOptions = ref([]);
|
const bankEntitiesOptions = ref([]);
|
||||||
|
|
||||||
const onBankEntityCreated = (data) => {
|
const onBankEntityCreated = async (dataSaved, rowData) => {
|
||||||
bankEntitiesOptions.value.push(data);
|
await bankEntitiesRef.value.fetch();
|
||||||
|
rowData.bankEntityFk = dataSaved.id;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onChangesSaved = () => {
|
const onChangesSaved = () => {
|
||||||
|
@ -63,6 +66,7 @@ onMounted(() => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
ref="bankEntitiesRef"
|
||||||
url="BankEntities"
|
url="BankEntities"
|
||||||
@on-fetch="(data) => (bankEntitiesOptions = data)"
|
@on-fetch="(data) => (bankEntitiesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
|
@ -120,7 +124,10 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CreateBankEntityForm
|
<CreateBankEntityForm
|
||||||
@on-data-saved="onBankEntityCreated($event)"
|
@on-data-saved="
|
||||||
|
(_, requestResponse) =>
|
||||||
|
onBankEntityCreated(requestResponse, row)
|
||||||
|
"
|
||||||
:show-entity-field="false"
|
:show-entity-field="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue