To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 4fb7ed22 authored by Hermann's avatar Hermann
Browse files

add filters for event and user table

parent 28b2773c
......@@ -25,6 +25,7 @@ export default class EventTable {
}
view() {
const now = new Date();
return m(TableView, {
controller: this.ctrl,
keys: config.tableKeys,
......@@ -34,6 +35,13 @@ export default class EventTable {
{ text: 'Start', width: '9em' },
{ text: 'End', width: '9em' },
],
filters: [[{
name: 'upcoming',
query: { time_start: { $gte: `${now.toISOString().slice(0, -5)}Z` } },
}, {
name: 'past',
query: { time_start: { $lt: `${now.toISOString().slice(0, -5)}Z` } },
}]],
onAdd: () => { m.route.set('/newevent'); },
});
}
......
......@@ -28,6 +28,15 @@ export class UserTable {
controller: this.ctrl,
keys: config.tableKeys,
titles: config.tableKeys.map(key => config.keyDescriptors[key] || key),
filters: [[
{ name: 'not members', query: { membership: 'none' } },
{ name: 'regular members', query: { membership: 'regular' } },
{ name: 'extraordinary members', query: { membership: 'extraordinary' } },
{ name: 'honorary member', query: { membership: 'honorary' } },
], [
{ name: 'ITET', query: { department: 'itet' } },
{ name: 'MAVT', query: { department: 'mavt' } },
]],
onAdd: () => { m.route.set('/newuser'); },
});
}
......
Markdown is supported
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