fix show_recurrent filter in widget

This commit is contained in:
lesion 2022-02-01 12:45:19 +01:00
parent a00b0e2f2d
commit f4a0ef5d35
No known key found for this signature in database
GPG key ID: 352918250B012177
2 changed files with 6 additions and 4 deletions

View file

@ -49,7 +49,7 @@
p(v-html='$t(`export.list_description`)')
v-row
v-col.mr-2(:span='11')
v-col.col-12.col-lg-4
v-text-field(v-model='list.title' :label='$t("common.title")')
v-text-field(v-model='list.maxEvents' type='number' min='1' :label='$t("common.max_events")')
v-switch(v-model='list.theme' inset true-value='dark' false-value='light' :label="$t('admin.is_dark')")
@ -59,7 +59,8 @@
:title='list.title'
:theme='list.theme'
:places='filters.places.join(",")'
:tags='filters.tags.join(",")')
:tags='filters.tags.join(",")'
:show_recurrent='filters.show_recurrent')
v-alert.pa-5.my-4.blue-grey.darken-4.text-body-1.lime--text.text--lighten-3 <pre>{{code}}</pre>
v-btn.float-end(text color='primary' @click='clipboard(code)') {{$t("common.copy")}}
v-icon.ml-1 mdi-content-copy
@ -128,7 +129,7 @@ export default {
}
if (this.filters.show_recurrent) {
params.push('show_recurrent')
params.push(`show_recurrent="${this.filters.show_recurrent}"`)
}
if (this.list.maxEvents) {

View file

@ -558,8 +558,9 @@ const eventController = {
const tags = req.query.tags
const places = req.query.places
const max = req.query.max
const show_recurrent = settingsController.settings.allow_recurrent_event &&
(typeof req.query.show_recurrent !== 'undefined' ? req.query.show_recurrent === 'true' : settingsController.settings.recurrent_event_visible)
typeof req.query.show_recurrent !== 'undefined' ? req.query.show_recurrent === 'true' : settingsController.settings.recurrent_event_visible
res.json(await eventController._select({
start, end, places, tags, show_recurrent, max