This commit is contained in:
lesion
2022-11-19 13:20:37 +01:00
parent 313b8c2afb
commit 41a1805e65
4 changed files with 699 additions and 958 deletions

View File

@@ -8,7 +8,6 @@ v-col(cols=12)
p {{ $t(`event.${type}_description`) }}
p {{value}}
v-btn-toggle.v-col-6.flex-column.flex-sm-row(v-if='type === "recurrent"' color='primary' :value='value.recurrent.frequency' @change='fq => change("frequency", fq)')
v-btn(v-for='f in frequencies' :key='f.value' :value='f.value') {{ f.text }}

View File

@@ -11,8 +11,8 @@ v-row.mb-4
@input.native='search'
persistent-hint
:value='value.name'
item-text='name'
:items="places"
@focus='search'
@change='selectPlace')
template(v-slot:item="{ item, attrs, on }")
v-list-item(v-bind='attrs' v-on='on')
@@ -38,6 +38,7 @@ v-row.mb-4
:label="$t('common.address')"
:rules="[ v => disableAddress ? true : $validators.required('common.address')(v)]"
:value='value.address'
item-text='address'
persistent-hint hide-no-data clearable no-filter
:loading='loading'
@change='selectAddress'
@@ -130,11 +131,13 @@ export default {
},
selectPlace (p) {
if (!p) { return }
console.error('dentro select place ', p)
if (typeof p === 'object' && !p.create) {
if (p.id === this.value.id) return
console.error('quindi sono qui dentro !')
this.place.name = p.name
this.place.address = p.address
if (this.settings.allow_geolocation) {
this.place.details = p.details
this.place.latitude = p.latitude
this.place.longitude = p.longitude
}