fix merge request conflict for improve address

This commit is contained in:
nobohan
2021-10-20 15:52:22 +02:00
4 changed files with 21 additions and 42 deletions

View File

@@ -68,7 +68,9 @@ export default {
return this.$data.value !== null && typeof this.$data.value.text !== 'undefined';
},
cities() {
return this.entity.loaded.cities;
return this.entity.loaded.cities.sort(
(a, b) => Number(a.code) - Number(b.code) || a.name > b.name
)
},
name: {
set(value) {
@@ -92,7 +94,7 @@ export default {
},
methods: {
transName(value) {
return (value.code && value.name) ? `${value.code}-${value.name}` : '';
return (value.code && value.name) ? `${value.name} (${value.code})` : '';
},
selectCity(value) {
console.log(value)
@@ -103,7 +105,9 @@ export default {
console.log('writeNew.postcode false, in selectCity');
this.$emit('getReferenceAddresses', value);
this.focusOnAddress();
this.updateMapCenter(value.center);
if (value.center) {
this.updateMapCenter(value.center);
}
},
listenInputSearch(query) {
//console.log('listenInputSearch', query, this.isCitySelectorOpen);