Verified Commit 2f295571 authored by les's avatar les
Browse files

fix toggle show recurrent

parent f6ced324
......@@ -2,12 +2,10 @@
v-container.pt-0.pt-md-2
v-switch.mt-0(
v-if='recurrentFilter && settings.allow_recurrent_event'
:value='filters.show_recurrent'
v-model='showRecurrent'
inset color='primary'
hide-details
:label="$t('event.show_recurrent')"
@change="toggleShowRecurrent")
:label="$t('event.show_recurrent')")
v-autocomplete.mt-0(
:label='$t("common.search")'
:items='keywords'
......@@ -51,6 +49,19 @@ export default {
},
computed: {
...mapState(['tags', 'places', 'settings']),
showRecurrent: {
get () {
return this.filters.show_recurrent
},
set (v) {
const filters = {
tags: this.filters.tags,
places: this.filters.places,
show_recurrent: v
}
this.$emit('update', filters)
}
},
selectedFilters () {
const tags = this.tags.filter(t => this.filters.tags.includes(t.tag)).map(t => ({ type: 'tag', label: t.tag, weigth: t.weigth, id: t.tag }))
const places = this.places.filter(p => this.filters.places.includes(p.id))
......@@ -74,14 +85,6 @@ export default {
}
this.$emit('update', filters)
},
toggleShowRecurrent (v) {
const filters = {
tags: this.filters.tags,
places: this.filters.places,
show_recurrent: v
}
this.$emit('update', filters)
},
change (filters) {
filters = {
tags: filters.filter(t => t.type === 'tag').map(t => t.id),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment