fix error when creating a group without a valid address

- make address input required in the group create- and group settings-view

#27
This commit is contained in:
summersamara 2023-11-28 10:48:19 +01:00
parent c0d530be92
commit e4607567ce
3 changed files with 5 additions and 0 deletions

View file

@ -21,6 +21,7 @@
/> />
<o-autocomplete <o-autocomplete
:data="addressData" :data="addressData"
:required="isRequired"
v-model="queryTextWithDefault" v-model="queryTextWithDefault"
:placeholder="placeholderWithDefault" :placeholder="placeholderWithDefault"
:customFormatter="(elem: IAddress) => addressFullName(elem)" :customFormatter="(elem: IAddress) => addressFullName(elem)"
@ -216,6 +217,7 @@ const props = withDefaults(
resultType?: AddressSearchType; resultType?: AddressSearchType;
defaultCoords?: string; defaultCoords?: string;
allowManualDetails?: boolean; allowManualDetails?: boolean;
isRequired?: boolean;
}>(), }>(),
{ {
defaultCoords: "0;0", defaultCoords: "0;0",
@ -224,6 +226,7 @@ const props = withDefaults(
hideMap: false, hideMap: false,
hideSelected: false, hideSelected: false,
allowManualDetails: false, allowManualDetails: false,
isRequired: false,
} }
); );

View file

@ -84,6 +84,7 @@
<full-address-auto-complete <full-address-auto-complete
:label="$t('Group address')" :label="$t('Group address')"
v-model="group.physicalAddress" v-model="group.physicalAddress"
:is-required="true"
/> />
<div class="field"> <div class="field">

View file

@ -160,6 +160,7 @@
v-model="currentAddress" v-model="currentAddress"
:allowManualDetails="true" :allowManualDetails="true"
:hideMap="true" :hideMap="true"
:is-required="true"
/> />
<div class="flex flex-wrap gap-2 my-2"> <div class="flex flex-wrap gap-2 my-2">