cleaning recurrent

This commit is contained in:
lesion
2019-07-15 23:35:59 +02:00
parent f43a77d8a7
commit ca1c2f3079
5 changed files with 67 additions and 118 deletions

View File

@@ -46,7 +46,7 @@ export const getters = {
}
if (search_for_tags) {
const common_tags = intersection(map(e.tags, t => t.tag), state.filters.tags);
const common_tags = intersection(e.tags, state.filters.tags);
if (common_tags.length > 0) return true
}
@@ -73,7 +73,7 @@ export const getters = {
}
if (search_for_tags) {
const common_tags = intersection(map(e.tags, t => t.tag), state.filters.tags);
const common_tags = intersection(e.tags, state.filters.tags);
if (common_tags.length > 0) return true
}
@@ -91,9 +91,9 @@ export const mutations = {
state.events = events.map((e) => {
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
const past = (moment().unix() - end_datetime) > 0
lastDay = currentDay
const end_datetime = e.end_datetime || e.start_datetime+3600000*2
const past = ((moment().unix()*1000) - end_datetime) > 0
e.past = !!past
return e
})