Skip to content
Snippets Groups Projects
Commit 6f1bf873 authored by Lionel Trebuchon's avatar Lionel Trebuchon Committed by Hermann
Browse files

Added event keyDescriptors etc.. to config.json, added NewEvent etc... to eventTools.js.

parent a62e0b97
No related branches found
No related tags found
No related merge requests found
{
"apiUrl": "https://amiv-api.ethz.ch/",
"Events": {
"keyDescriptors": {
"title_de": "Titel in Deutsch",
"title_en": "Title in English",
"location": "Location (Ort) of the event",
"allow_email_signup": "Event open for non-AMIV members",
"show_website": "Event is shown on the website",
"priority": "TODO: What type of priority is meant here? Edit priority? Organization prio?"
},
"tableKeys": [
"title_de",
"location",
"show_website",
"priority"
]
},
"Users": {
"keyDescriptors": {
"legi": "Legi Number",
......
import { ItemView } from './views/itemView';
import { EditView, inputGroup, selectGroup, submitButton } from './views/editView';
import TableView from './views/tableView';
import { Users as config } from './config.json';
import { Events as config } from './config.json';
const m = require('mithril');
class EventView extends ItemView {
constructor() {
super('event');
super('events');
this.memberships = [];
}
......@@ -57,9 +57,6 @@ class EventView extends ItemView {
embedded: { event: 1 },
},
}),
m(TableView, {
resource: '',
}),
]);
}
}
......@@ -130,7 +127,7 @@ export class NewEvent extends EventEdit {
};
this.valid = false;
// if the creation is finished, UI should switch to new User
// if the creation is finished, UI should switch to new Event
this.callback = (response) => { m.route.set(`/events/${response.data._id}`); };
}
......@@ -170,7 +167,7 @@ export class EventModal {
export class EventTable {
view() {
return m(TableView, {
resource: 'users',
resource: 'events',
keys: config.tableKeys,
titles: config.tableKeys.map(key => config.keyDescriptors[key] || key),
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment