This commit is contained in:
les 2021-01-22 23:08:38 +01:00
parent 12c397947a
commit 7bf2aba1d2

View file

@ -61,15 +61,17 @@ export default {
// this.intersecting[eventId] = isIntersecting // this.intersecting[eventId] = isIntersecting
// }, // },
...mapActions(['setFilters']), ...mapActions(['setFilters']),
async updateEvents () { updateEvents () {
this.events = await this.$api.getEvents({ return this.$api.getEvents({
start: this.start, start: this.start,
end: this.end, end: this.end,
places: this.filters.places, places: this.filters.places,
tags: this.filters.tags, tags: this.filters.tags,
show_recurrent: this.filters.show_recurrent show_recurrent: this.filters.show_recurrent
}).then(events => {
this.events = events
this.setFilters(this.filters)
}) })
this.setFilters(this.filters)
}, },
placeClick (place_id) { placeClick (place_id) {
if (this.filters.places.includes(place_id)) { if (this.filters.places.includes(place_id)) {
@ -95,7 +97,7 @@ export default {
this.selectedDay = null this.selectedDay = null
// check if current month is selected // check if current month is selected
if (month - 1 === dayjs().month()) { if (month - 1 === dayjs().month() && year === dayjs().year()) {
this.start = dayjs().unix() this.start = dayjs().unix()
this.date = dayjs().format('YYYY-MM-DD') this.date = dayjs().format('YYYY-MM-DD')
} else { } else {