Commit 316d1cf4 authored by les's avatar les
Browse files

show only future unconfirmed events in admin

parent ae40062e
......@@ -42,7 +42,7 @@
el-button(type='primary' @click='confirm(data.row.id)' size='mini') {{$t('common.confirm')}}
el-button(type='success' @click='preview(data.row.id)' size='mini') {{$t('common.preview')}}
client-only
el-pagination(:page-size='perPage' :currentPage.sync='eventPage' :total='events.length')
el-pagination(v-if='events.length>perPage' :page-size='perPage' :currentPage.sync='eventPage' :total='events.length')
//- ANNOUNCEMENTS
el-tab-pane.pt-1
......
......@@ -32,8 +32,8 @@ export default ({ app, store }) => {
recurrent = app.i18n.tc(`event.recurrent_${frequency}_${type}`, days.length, { days: d })
}
return recurrent
})
Vue.filter('when', (event) => {
const start = moment.unix(event.start_datetime)
const end = moment.unix(event.end_datetime)
......
......@@ -176,7 +176,8 @@ const eventController = {
const events = await Event.findAll({
where: {
parentId: null,
is_visible: false
is_visible: false,
start_datetime: { [Op.gt]: moment.unix() }
},
order: [['start_datetime', 'ASC']],
include: [Tag, Place]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment