keep going with recurrent event

This commit is contained in:
lesion
2019-07-13 01:02:11 +02:00
parent c929c314a9
commit 03b563971b
15 changed files with 109 additions and 72 deletions

View File

@@ -9,7 +9,13 @@ export const state = () => ({
events: [],
tags: [],
places: [],
settings: {},
settings: {
allow_registration: true,
allow_anon_event: true,
allow_recurrent_event: true,
recurrent_event_visible: false,
allow_comments: false,
},
filters: {
tags: [],
places: [],
@@ -83,7 +89,7 @@ export const mutations = {
// set`past` and `newDay` flags to event
let lastDay = null
state.events = events.map((e) => {
const currentDay = moment(e.start_datetime*1000).date()
const currentDay = moment(e.start_datetime).date()
e.newDay = (!lastDay || lastDay !== currentDay) && currentDay
lastDay = currentDay
const end_datetime = e.end_datetime || e.start_datetime+3600*2