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(':')
|
||||
|
||||
@@ -36,6 +36,22 @@ v-container#event.pa-0.pa-sm-2
|
||||
v-chip.p-category.ml-1.mt-1(v-for='tag in event.tags' small label color='primary'
|
||||
outlined :key='tag' :to='`/tag/${encodeURIComponent(tag)}`') {{tag}}
|
||||
|
||||
//- online events
|
||||
v-divider(v-if='event.locations && event.locations.length')
|
||||
v-card(v-if='event.locations && event.locations.length')
|
||||
v-card-text.text-caption.pb-0(v-text="event.place.name === 'online' && $t('event.online_event_only') || $t('event.online_event_too') ")
|
||||
v-list-item(target='_blank' :href='`${event.locations[0]}`')
|
||||
v-list-item-icon
|
||||
v-icon.my-auto(v-text='mdiMonitorAccount')
|
||||
v-list-item-content.py-0
|
||||
v-text(small label v-text='`${event.locations[0]}`' outlined color='primary')
|
||||
v-card.pb-2(v-if='event.locations.length > 1')
|
||||
v-card-text.text-caption.pt-0.pb-0(v-text="$t('event.online_event_fallback_urls')")
|
||||
v-list-item
|
||||
v-list-item-content
|
||||
v-chip(v-for='(item, index) in event.locations' v-if="index > 0" target='_blank' :href="`${item}`"
|
||||
v-bind:key="index" small label v-text="`${item}`" outlined )
|
||||
|
||||
v-divider
|
||||
//- info & actions
|
||||
v-list(dense nav)
|
||||
@@ -172,7 +188,7 @@ const { htmlToText } = require('html-to-text')
|
||||
|
||||
import { mdiArrowLeft, mdiArrowRight, mdiDotsVertical, mdiCodeTags, mdiClose, mdiMap,
|
||||
mdiEye, mdiEyeOff, mdiDelete, mdiRepeat, mdiLock, mdiFileDownloadOutline,
|
||||
mdiCalendarExport, mdiCalendar, mdiContentCopy, mdiMapMarker, mdiChevronUp } from '@mdi/js'
|
||||
mdiCalendarExport, mdiCalendar, mdiContentCopy, mdiMapMarker, mdiChevronUp, mdiMonitorAccount } from '@mdi/js'
|
||||
|
||||
export default {
|
||||
name: 'Event',
|
||||
@@ -194,7 +210,7 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
mdiArrowLeft, mdiArrowRight, mdiDotsVertical, mdiCodeTags, mdiCalendarExport, mdiCalendar, mdiFileDownloadOutline,
|
||||
mdiMapMarker, mdiContentCopy, mdiClose, mdiDelete, mdiEye, mdiEyeOff, mdiRepeat, mdiLock, mdiMap, mdiChevronUp,
|
||||
mdiMapMarker, mdiContentCopy, mdiClose, mdiDelete, mdiEye, mdiEyeOff, mdiRepeat, mdiLock, mdiMap, mdiChevronUp, mdiMonitorAccount,
|
||||
currentAttachment: 0,
|
||||
event: {},
|
||||
diocane: '',
|
||||
|
||||
Reference in New Issue
Block a user