diff --git a/src/components/CreateNewCityForm.vue b/src/components/CreateNewCityForm.vue new file mode 100644 index 000000000..b028509e8 --- /dev/null +++ b/src/components/CreateNewCityForm.vue @@ -0,0 +1,117 @@ + + + + + + + +es: + New city: Nueva ciudad + Please, ensure you put the correct data!: ¡Por favor, asegúrese de poner los datos correctos! + Name: Nombre + Province: Provincia + diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index d4bd74e6d..0905f6bc3 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -7,6 +7,9 @@ import VnRow from 'components/ui/VnRow.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; import VnInput from 'src/components/common/VnInput.vue'; import FormModel from 'components/FormModel.vue'; +import CreateNewCityForm from './CreateNewCityForm.vue'; +import CreateNewProvinceForm from './CreateNewProvinceForm.vue'; +import VnSelectCreate from 'components/common/VnSelectCreate.vue'; const emit = defineEmits(['onDataSaved']); @@ -19,6 +22,8 @@ const postcodeFormData = reactive({ townFk: null, }); +const townsFetchDataRef = ref(null); +const provincesFetchDataRef = ref(null); const closeButton = ref(null); const countriesOptions = ref([]); const isLoading = ref(false); @@ -30,6 +35,14 @@ const onDataSaved = () => { closeForm(); }; +const onCityCreated = async () => { + await townsFetchDataRef.value.fetch(); +}; + +const onProvinceCreated = async () => { + await provincesFetchDataRef.value.fetch(); +}; + const closeForm = () => { if (closeButton.value) closeButton.value.click(); }; @@ -37,11 +50,13 @@ const closeForm = () => {