From a06f9a279ef7906487526985e45cc55057d30d0e Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Wed, 17 Jan 2024 11:52:11 -0500 Subject: [PATCH] Se hacen correcciones solicitadas --- .../components/CustomerConsigneeCreate.vue | 19 +++++++++++++------ .../components/CustomerConsigneeEdit.vue | 11 ++++++++++- .../components/CustomerNewCustomsAgent.vue | 2 ++ .../components/CustomerNoteCreate.vue | 14 +++++++++++++- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/pages/Customer/components/CustomerConsigneeCreate.vue b/src/pages/Customer/components/CustomerConsigneeCreate.vue index f35ee8ea4..aadf554b3 100644 --- a/src/pages/Customer/components/CustomerConsigneeCreate.vue +++ b/src/pages/Customer/components/CustomerConsigneeCreate.vue @@ -3,6 +3,8 @@ import { onBeforeMount, reactive, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; +import axios from 'axios'; + import FetchData from 'components/FetchData.vue'; import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; @@ -42,6 +44,7 @@ const customsAgents = ref([]); onBeforeMount(() => { urlCreate.value = `Clients/${route.params.id}/createAddress`; + getCustomsAgents(); }); const onPostcodeCreated = async ({ code, provinceFk, townFk }, formData) => { @@ -51,6 +54,15 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk }, formData) => { formData.provinceFk = provinceFk; formData.city = citiesLocationOptions.value.find((town) => town.id === townFk).name; }; + +const getCustomsAgents = async () => { + const { data } = await axios.get('CustomsAgents'); + customsAgents.value = data; +}; + +const refreshData = () => { + getCustomsAgents(); +};