Skip to content

Commit 12d05ae

Browse files
committed
Fix add address to contact
Signed-off-by: Arne Hamann <git@arne.email>
1 parent 642705f commit 12d05ae

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/components/map/PoiMarker.vue

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<span class="icon-favorite" />
1717
{{ t('maps', 'Add to favorites') }}
1818
</button>
19-
<button class="search-place-contact" @click="$emit('place-contact', poi)">
19+
<button class="search-place-contact" @click="onAddContact">
2020
<span class="icon-user" />
2121
{{ t('maps', 'Add contact address') }}
2222
</button>
@@ -242,9 +242,21 @@ export default {
242242
...this.poi,
243243
latLng: {
244244
lat: this.poi.lat,
245-
lng: this.poi.lon
245+
lng: this.poi.lon,
246246
},
247-
name: this.poi.name,
247+
name: this.header,
248+
formattedAddress: formatAddress(this.poi.address)
249+
})
250+
},
251+
onAddContact() {
252+
this.$emit('place-contact',
253+
{
254+
...this.poi,
255+
latLng: {
256+
lat: this.poi.lat,
257+
lng: this.poi.lon,
258+
},
259+
name: this.header,
248260
formattedAddress: formatAddress(this.poi.address)
249261
})
250262
},

0 commit comments

Comments
 (0)