show only future unconfirmed events in admin

This commit is contained in:
les
2020-03-24 18:50:32 +01:00
parent ae40062e71
commit 316d1cf45c
3 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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]