This commit is contained in:
lesion 2022-06-22 14:07:28 +02:00
parent 7516fd3d36
commit 1c181cba65
No known key found for this signature in database
GPG key ID: 352918250B012177
2 changed files with 5 additions and 3 deletions

View file

@ -45,6 +45,7 @@ v-col(cols=12)
:label="$t('event.from')"
:value="fromHour"
:disabled='!value.from'
readonly
:prepend-icon="mdiClockTimeFourOutline"
:rules="[$validators.required('event.from')]"
v-bind="attrs"
@ -70,6 +71,7 @@ v-col(cols=12)
:label="$t('event.due')"
:value="dueHour"
:disabled='!fromHour'
readonly
:prepend-icon="mdiClockTimeEightOutline"
v-bind="attrs"
v-on="on")

View file

@ -16,8 +16,8 @@ v-row
@change='selectPlace')
template(v-slot:item="{ item, attrs, on }")
v-list-item(v-bind='attrs' v-on='on')
v-list-item-content(two-line v-if='item.create && search')
v-list-item-title <v-icon color='primary' v-text='mdiPlus' :aria-label='$t("common.add")'></v-icon> {{item.name}}
v-list-item-content(two-line v-if='item.create')
v-list-item-title <v-icon color='primary' v-text='mdiPlus' :aria-label='$t("common.add")'></v-icon> {{$t('common.add')}} <strong>{{item.name}}</strong>
v-list-item-content(two-line v-else)
v-list-item-title(v-text='item.name')
v-list-item-subtitle(v-text='item.address')
@ -76,7 +76,7 @@ export default {
this.places = await this.$axios.$get(`place?search=${search}`)
if (!search && this.places.length) { return this.places }
const matches = this.places.find(p => search === p.name.toLocaleLowerCase())
if (!matches) {
if (!matches && search) {
this.places.unshift({ create: true, name: ev.target.value.trim() })
}
}, 100),