(provincesOptions = data)"
auto-load
url="Provinces"
@@ -74,20 +89,25 @@ const closeForm = () => {
/>
-
+ :roles-allowed-to-create="['deliveryAssistant']"
+ >
+
+
+
+
- {
option-value="id"
v-model="data.provinceFk"
:rules="validate('postcode.provinceFk')"
- />
+ :roles-allowed-to-create="['deliveryAssistant']"
+ >
+
+
+
+
+import { reactive, ref } from 'vue';
+import { useI18n } from 'vue-i18n';
+
+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';
+
+const emit = defineEmits(['onDataSaved']);
+
+const { t } = useI18n();
+
+const provinceFormData = reactive({
+ name: null,
+ 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();
+};
+
+
+
+ (autonomiesOptions = data)"
+ auto-load
+ url="Autonomies"
+ />
+
+
+
+
+
+ {{ t('New province') }}
+ {{ t('Please, ensure you put the correct data!') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ New postcode: Nuevo código postal
+ Please, ensure you put the correct data!: ¡Por favor, asegúrese de poner los datos correctos!
+ Name: Nombre
+ Autonomy: Autonomía
+