From 9aeba371409b830e6b581cb4ab50be7367e8ce5e Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 10 Jan 2024 12:11:49 -0300 Subject: [PATCH 1/2] Autocomplete postcodes --- src/components/CreateNewPostcodeForm.vue | 4 ++-- src/components/FormModelPopup.vue | 6 +++--- .../Customer/Card/CustomerFiscalData.vue | 20 +++++++++++++------ src/pages/Customer/CustomerCreate.vue | 9 ++++++--- .../Supplier/Card/SupplierFiscalData.vue | 8 ++++++-- src/pages/Worker/WorkerCreate.vue | 8 ++++++-- 6 files changed, 37 insertions(+), 18 deletions(-) diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 3504445f8..a9efcf8f4 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -28,8 +28,8 @@ const countriesOptions = ref([]); const provincesOptions = ref([]); const townsLocationOptions = ref([]); -const onDataSaved = () => { - emit('onDataSaved'); +const onDataSaved = (dataSaved) => { + emit('onDataSaved', dataSaved); }; const onCityCreated = async () => { diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue index c314f6897..04322a3c8 100644 --- a/src/components/FormModelPopup.vue +++ b/src/components/FormModelPopup.vue @@ -42,8 +42,8 @@ const { t } = useI18n(); const closeButton = ref(null); const isLoading = ref(false); -const onDataSaved = () => { - emit('onDataSaved'); +const onDataSaved = (dataSaved) => { + emit('onDataSaved', dataSaved); closeForm(); }; @@ -59,7 +59,7 @@ const closeForm = () => { :default-actions="false" :url-create="urlCreate" :model="model" - @on-data-saved="onDataSaved()" + @on-data-saved="onDataSaved($event)" >