minor
This commit is contained in:
parent
7516fd3d36
commit
1c181cba65
2 changed files with 5 additions and 3 deletions
|
@ -45,6 +45,7 @@ v-col(cols=12)
|
||||||
:label="$t('event.from')"
|
:label="$t('event.from')"
|
||||||
:value="fromHour"
|
:value="fromHour"
|
||||||
:disabled='!value.from'
|
:disabled='!value.from'
|
||||||
|
readonly
|
||||||
:prepend-icon="mdiClockTimeFourOutline"
|
:prepend-icon="mdiClockTimeFourOutline"
|
||||||
:rules="[$validators.required('event.from')]"
|
:rules="[$validators.required('event.from')]"
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
|
@ -70,6 +71,7 @@ v-col(cols=12)
|
||||||
:label="$t('event.due')"
|
:label="$t('event.due')"
|
||||||
:value="dueHour"
|
:value="dueHour"
|
||||||
:disabled='!fromHour'
|
:disabled='!fromHour'
|
||||||
|
readonly
|
||||||
:prepend-icon="mdiClockTimeEightOutline"
|
:prepend-icon="mdiClockTimeEightOutline"
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
v-on="on")
|
v-on="on")
|
||||||
|
|
|
@ -16,8 +16,8 @@ v-row
|
||||||
@change='selectPlace')
|
@change='selectPlace')
|
||||||
template(v-slot:item="{ item, attrs, on }")
|
template(v-slot:item="{ item, attrs, on }")
|
||||||
v-list-item(v-bind='attrs' v-on='on')
|
v-list-item(v-bind='attrs' v-on='on')
|
||||||
v-list-item-content(two-line v-if='item.create && search')
|
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> {{item.name}}
|
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-content(two-line v-else)
|
||||||
v-list-item-title(v-text='item.name')
|
v-list-item-title(v-text='item.name')
|
||||||
v-list-item-subtitle(v-text='item.address')
|
v-list-item-subtitle(v-text='item.address')
|
||||||
|
@ -76,7 +76,7 @@ export default {
|
||||||
this.places = await this.$axios.$get(`place?search=${search}`)
|
this.places = await this.$axios.$get(`place?search=${search}`)
|
||||||
if (!search && this.places.length) { return this.places }
|
if (!search && this.places.length) { return this.places }
|
||||||
const matches = this.places.find(p => search === p.name.toLocaleLowerCase())
|
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() })
|
this.places.unshift({ create: true, name: ev.target.value.trim() })
|
||||||
}
|
}
|
||||||
}, 100),
|
}, 100),
|
||||||
|
|
Loading…
Reference in a new issue