mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix toggle show recurrent
This commit is contained in:
parent
f6ced324b6
commit
2f295571de
1 changed files with 15 additions and 12 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue