Merge branch 'issue317_add_geom_to_postal_code' into 'master'

Issue317 add geom to postal code

See merge request Chill-Projet/chill-bundles!236
This commit is contained in:
Julien Fastré 2021-11-25 13:16:36 +00:00
commit 69e260f0b1
6 changed files with 19 additions and 3 deletions

View File

@ -11,6 +11,8 @@ and this project adheres to
## Unreleased
<!-- write down unreleased development here -->
* [main] translate multiselect messages when selecting/creating address
* [main] set the coordinates of the city when creating a new address OR choosing "pas d'adresse complète"
* Use the user.label in accompanying course banner, instead of username;
* fix: show validation message when closing accompanying course;
* [thirdparty] link from modal to thirdparty detail page fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/228)

View File

@ -588,6 +588,12 @@ export default {
newAddress = Object.assign(newAddress, {
'point': this.entity.selected.address.point.coordinates
});
} else {
if (this.entity.selected.postcode.coordinates) {
newAddress = Object.assign(newAddress, {
'point': this.entity.selected.postcode.coordinates
});
}
}
// add the address reference, if any

View File

@ -4,6 +4,10 @@
<VueMultiselect
id="addressSelector"
v-model="value"
:placeholder="$t('select_address')"
:tag-placeholder="$t('create_address')"
:select-label="$t('press_enter_to_select')"
:deselect-label="$t('create_address')"
@search-change="listenInputSearch"
ref="addressSelector"
@select="selectAddress"
@ -14,8 +18,6 @@
:taggable="true"
:multiple="false"
@tag="addAddress"
:placeholder="$t('select_address')"
:tagPlaceholder="$t('create_address')"
:options="addresses">
</VueMultiselect>
</div>
@ -141,7 +143,6 @@ export default {
}
},
addAddress() {
console.log('addAddress: pass here ?? never, it seems');
this.entity.selected.writeNew.address = true;
}
}

View File

@ -12,6 +12,8 @@
label="value"
:custom-label="transName"
:placeholder="$t('select_city')"
:select-label="$t('press_enter_to_select')"
:deselect-label="$t('create_postal_code')"
:taggable="true"
:multiple="false"
@tag="addPostcode"
@ -101,6 +103,7 @@ export default {
this.entity.selected.city = value;
this.entity.selected.postcode.name = value.name;
this.entity.selected.postcode.code = value.code;
this.entity.selected.postcode.coordinates = value.center.coordinates;
this.entity.selected.writeNew.postcode = false;
console.log('writeNew.postcode false, in selectCity');
this.$emit('getReferenceAddresses', value);

View File

@ -9,6 +9,8 @@
v-bind:placeholder="$t('select_country')"
v-bind:options="sortedCountries"
v-model="value"
:select-label="$t('press_enter_to_select')"
:deselect-label="$t('press_enter_to_remove')"
@select="selectCountry">
</VueMultiselect>
</div>

View File

@ -1,5 +1,7 @@
const addressMessages = {
fr: {
press_enter_to_select: 'Appuyer sur Entrée pour sélectionner',
press_enter_to_remove: 'Appuyer sur Entrée pour désélectionner',
add_an_address_title: 'Créer une adresse',
edit_an_address_title: 'Modifier une adresse',
create_a_new_address: 'Créer une nouvelle adresse',