diff --git a/CHANGELOG b/CHANGELOG index cbeb5a5c..5b72fad8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ All notable changes to this project will be documented in this file. +### + + - models initialization refactored, better dev xperience as backend hmr is working + ### 1.6.1 - 15 dec '22 - allow edit tags in admin panel, fix #170 - fix header / fallback image upload, fix #222 diff --git a/assets/helper.js b/assets/helper.js index 44692a33..78b2b3d2 100644 --- a/assets/helper.js +++ b/assets/helper.js @@ -8,7 +8,7 @@ export function attributesFromEvents(_events) { const key = dayjs.unix(e.start_datetime).tz().format('MMDD') // Math.floor(e.start_datetime/(3600*24)) // dayjs.unix(e.start_datetime).tz().format('YYYYMMDD') const c = (e.end_datetime || e.start_datetime) < now ? 'vc-past' : '' - if (e.multidate) { + if (e.multidate === true) { attributes.push({ dates: { start: new Date(e.start_datetime * 1000), end: new Date(e.end_datetime * 1000) }, highlight: { diff --git a/components/Appbar.vue b/components/Appbar.vue index 2d3da1e3..c0167544 100644 --- a/components/Appbar.vue +++ b/components/Appbar.vue @@ -1,22 +1,20 @@ \ No newline at end of file + diff --git a/components/Calendar.vue b/components/Calendar.vue index 1bdca9f8..397fb635 100644 --- a/components/Calendar.vue +++ b/components/Calendar.vue @@ -15,13 +15,14 @@ aria-label='Calendar' is-expanded is-inline) - template(v-slot="{ inputValue, inputEvents }") + //- template(v-slot="{ inputValue, inputEvents }") v-btn#calendarButton(v-on='inputEvents' text tile :color='selectedDate ? "primary" : "" ') {{inputValue || $t('common.calendar')}} v-icon(v-if='selectedDate' v-text='mdiClose' right small icon @click.prevent.stop='selectedDate = null') v-icon(v-else v-text='mdiChevronDown' right small icon) - template(v-slot:placeholder) - v-btn#calendarButton(text tile) {{$t('common.calendar')}} - v-icon(v-text='mdiChevronDown' right small icon) + .calh.d-flex.justify-center.align-center(slot='placeholder') + v-progress-circular(indeterminate) + //- v-btn#calendarButton(text tile) {{$t('common.calendar')}} + //- v-icon(v-text='mdiChevronDown' right small icon) diff --git a/components/Confirm.vue b/components/Confirm.vue index 0c8f2919..05ddc28f 100644 --- a/components/Confirm.vue +++ b/components/Confirm.vue @@ -9,7 +9,7 @@ v-dialog(v-model='show' @keydown.esc='cancel') v-card v-card-title {{ title }} - v-card-text(v-show='!!message') {{ message }} + v-card-text(v-show='!!message' v-html='message') v-card-actions v-spacer v-btn(outlined color='error' @click='cancel') {{$t('common.cancel')}} diff --git a/components/DateInput.vue b/components/DateInput.vue index 9166e2c7..2b45b374 100644 --- a/components/DateInput.vue +++ b/components/DateInput.vue @@ -24,8 +24,9 @@ v-col(cols=12) is-inline is-expanded :min-date='type !== "recurrent" && new Date()') - template(#placeholder) - span.calc Loading + //- template(#placeholder) + .d-flex.calh.justify-center(slot='placeholder') + v-progress-circular(indeterminate) div.text-center.mb-2(v-if='type === "recurrent"') span(v-if='value.recurrent.frequency !== "1m" && value.recurrent.frequency !== "2m"') {{ whenPatterns }} @@ -94,7 +95,7 @@ v-col(cols=12) \ No newline at end of file + diff --git a/components/WhereInput.vue b/components/WhereInput.vue index 0caa47c4..75eb3615 100644 --- a/components/WhereInput.vue +++ b/components/WhereInput.vue @@ -125,9 +125,14 @@ export default { return matches } }, + mounted () { + this.$nextTick( () => { + this.search() + }) + }, methods: { search: debounce(async function(ev) { - const search = ev.target.value.trim().toLowerCase() + const search = ev ? ev.target.value.trim().toLowerCase() : '' 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()) @@ -256,7 +261,7 @@ export default { this.addressList = [] } } else if (this.geocoding_provider_type == "Photon") { - let photon_properties = ['housenumber', 'street', 'district', 'city', 'county', 'state', 'postcode', 'country'] + let photon_properties = ['housenumber', 'street', 'locality', 'district', 'city', 'county', 'state', 'postcode', 'country'] if (ret) { this.addressList = ret.features.map(v => { diff --git a/components/admin/Collections.vue b/components/admin/Collections.vue index 5dd87531..2f9da6a5 100644 --- a/components/admin/Collections.vue +++ b/components/admin/Collections.vue @@ -69,7 +69,7 @@ v-container //- v-list-item-subtitle(v-text='item.address') v-col(cols=2) - v-btn(color='primary' text @click='addFilter' :disabled='!collection.id || !filterPlaces.length && !filterTags.length') add + v-btn(color='primary' :loading='loading' text @click='addFilter' :disabled='loading || !collection.id || !filterPlaces.length && !filterTags.length') add v-data-table( :headers='filterHeaders' @@ -110,6 +110,9 @@ v-container