diff --git a/src/components/CreateNewCityForm.vue b/src/components/CreateNewCityForm.vue
index e51a18ef8..1cbba42fc 100644
--- a/src/components/CreateNewCityForm.vue
+++ b/src/components/CreateNewCityForm.vue
@@ -47,11 +47,13 @@ const onDataSaved = (...args) => {
:label="t('Name')"
v-model="data.name"
:rules="validate('city.name')"
+ required
/>
diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue
index 907e49499..66b2a30d3 100644
--- a/src/components/CreateNewPostcodeForm.vue
+++ b/src/components/CreateNewPostcodeForm.vue
@@ -174,6 +174,7 @@ async function onProvinceCreated(data) {
v-model="data.code"
:rules="validate('postcode.code')"
clearable
+ required
/>
@@ -220,8 +222,10 @@ async function onProvinceCreated(data) {
v-model="data.provinceFk"
@on-province-fetched="handleProvinces"
@on-province-created="onProvinceCreated"
+ required
/>
[],
- },
});
-const autonomiesOptions = ref([]);
+const autonomiesRef = ref([]);
const onDataSaved = (dataSaved, requestResponse) => {
- requestResponse.autonomy = autonomiesOptions.value.find(
+ requestResponse.autonomy = autonomiesRef.value.opts.find(
(autonomy) => autonomy.id == requestResponse.autonomyFk
);
emit('onDataSaved', dataSaved, requestResponse);
@@ -43,16 +38,6 @@ const where = computed(() => {
- (autonomiesOptions = data)"
- auto-load
- :filter="{
- where,
- }"
- url="Autonomies/location"
- :sort-by="['name ASC']"
- :limit="30"
- />
{
:label="t('Name')"
v-model="data.name"
:rules="validate('province.name')"
+ required
/>