diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index 9fb12e95c..f4f5fef7d 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -4,8 +4,8 @@ import { useI18n } from 'vue-i18n'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; import FetchData from 'components/FetchData.vue'; -import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; +import FormModelPopup from './FormModelPopup.vue'; const emit = defineEmits(['onDataSaved']); @@ -22,17 +22,10 @@ const countriesFilter = { fields: ['id', 'country', 'code'], }; -const closeButton = ref(null); const countriesOptions = ref([]); -const loading = ref(false); const onDataSaved = (data) => { emit('onDataSaved', data); - closeForm(); -}; - -const closeForm = () => { - if (closeButton.value) closeButton.value.click(); }; @@ -43,20 +36,15 @@ const closeForm = () => { auto-load @on-fetch="(data) => (countriesOptions = data)" /> - - diff --git a/src/components/CreateNewCityForm.vue b/src/components/CreateNewCityForm.vue index 7ff2ee4f0..ee842e86f 100644 --- a/src/components/CreateNewCityForm.vue +++ b/src/components/CreateNewCityForm.vue @@ -6,7 +6,7 @@ import FetchData from 'components/FetchData.vue'; 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 FormModelPopup from './FormModelPopup.vue'; const emit = defineEmits(['onDataSaved']); @@ -17,17 +17,10 @@ const cityFormData = reactive({ provinceFk: null, }); -const closeButton = ref(null); -const isLoading = ref(false); const provincesOptions = ref([]); const onDataSaved = () => { emit('onDataSaved'); - closeForm(); -}; - -const closeForm = () => { - if (closeButton.value) closeButton.value.click(); }; @@ -37,20 +30,15 @@ const closeForm = () => { auto-load url="Provinces" /> - - diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 0991e728b..3504445f8 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -6,10 +6,10 @@ import FetchData from 'components/FetchData.vue'; 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'; +import FormModelPopup from './FormModelPopup.vue'; const emit = defineEmits(['onDataSaved']); @@ -24,15 +24,12 @@ const postcodeFormData = reactive({ const townsFetchDataRef = ref(null); const provincesFetchDataRef = ref(null); -const closeButton = ref(null); const countriesOptions = ref([]); -const isLoading = ref(false); const provincesOptions = ref([]); const townsLocationOptions = ref([]); const onDataSaved = () => { emit('onDataSaved'); - closeForm(); }; const onCityCreated = async () => { @@ -42,10 +39,6 @@ const onCityCreated = async () => { const onProvinceCreated = async () => { await provincesFetchDataRef.value.fetch(); }; - -const closeForm = () => { - if (closeButton.value) closeButton.value.click(); -}; diff --git a/src/components/CreateNewProvinceForm.vue b/src/components/CreateNewProvinceForm.vue index c2f78c1f5..0f88952ea 100644 --- a/src/components/CreateNewProvinceForm.vue +++ b/src/components/CreateNewProvinceForm.vue @@ -6,7 +6,7 @@ import FetchData from 'components/FetchData.vue'; 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 FormModelPopup from './FormModelPopup.vue'; const emit = defineEmits(['onDataSaved']); @@ -17,17 +17,10 @@ const provinceFormData = reactive({ autonomyFk: null, }); -const closeButton = ref(null); -const isLoading = ref(false); const autonomiesOptions = ref([]); const onDataSaved = () => { emit('onDataSaved'); - closeForm(); -}; - -const closeForm = () => { - if (closeButton.value) closeButton.value.click(); }; @@ -37,20 +30,15 @@ const closeForm = () => { auto-load url="Autonomies" /> - - es: - New postcode: Nuevo código postal + New province: Nueva provincia Please, ensure you put the correct data!: ¡Por favor, asegúrese de poner los datos correctos! Name: Nombre Autonomy: Autonomía diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue new file mode 100644 index 000000000..9021adc46 --- /dev/null +++ b/src/components/FormModelPopup.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/css/app.scss b/src/css/app.scss index 0f1b4673a..02d4f8946 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -53,16 +53,3 @@ body.body--dark { color: var(--vn-text); border-radius: 8px; } - -.popup-form-title { - font-size: 17px; - font-weight: bold; - line-height: 20px; -} - -.popup-form-close-button { - position: absolute; - top: 20px; - right: 20px; - cursor: pointer; -}