reinit whereinputadvanced in /add , and init only/also online mechanism, various fixes: admin edit place; bug in nominatim display_name when place in certain nominatim_class, init refactor geocoding related code in services/geocoding/provider; init MapEdit component
This commit is contained in:
@@ -30,7 +30,7 @@ v-container.container.pa-0.pa-md-3
|
||||
|
||||
//- Where
|
||||
v-col(cols=12)
|
||||
WhereInput(ref='where' v-model='event.place')
|
||||
WhereInput(ref='where' v-model='event.place' :event='event')
|
||||
|
||||
//- When
|
||||
DateInput(ref='when' v-model='date' :event='event')
|
||||
@@ -125,6 +125,9 @@ export default {
|
||||
|
||||
data.event.place.name = event.place.name
|
||||
data.event.place.address = event.place.address || ''
|
||||
data.event.place.latitude = event.place.latitude || ''
|
||||
data.event.place.longitude = event.place.longitude || ''
|
||||
data.event.locations = event.locations || []
|
||||
const from = dayjs.unix(event.start_datetime)
|
||||
const due = event.end_datetime && dayjs.unix(event.end_datetime)
|
||||
data.date = {
|
||||
@@ -154,6 +157,7 @@ export default {
|
||||
openImportDialog: false,
|
||||
event: {
|
||||
place: { name: '', address: '', latitude: null, longitude: null },
|
||||
locations: [],
|
||||
title: '',
|
||||
description: '',
|
||||
tags: [],
|
||||
@@ -237,6 +241,15 @@ export default {
|
||||
formData.append('place_address', this.event.place.address)
|
||||
formData.append('place_latitude', this.event.place.latitude)
|
||||
formData.append('place_longitude', this.event.place.longitude)
|
||||
|
||||
if (this.event.locations.length) {
|
||||
this.event.locations.forEach(location => formData.append('locations[]', location.url))
|
||||
} else {
|
||||
// delete
|
||||
this.event.locations = []
|
||||
formData.append('locations', this.event.locations )
|
||||
}
|
||||
|
||||
formData.append('description', this.event.description)
|
||||
formData.append('multidate', !!this.date.multidate)
|
||||
let [hour, minute] = this.date.fromHour.split(':')
|
||||
|
||||
Reference in New Issue
Block a user