Commit 85937ab8 authored by rdoerge's avatar rdoerge Committed by Hermann
Browse files

Bugfix 58 "List of event email addresses not complete", changed the

Resourcehandler to Datalistcontroller.
parent 8f36bd6e
......@@ -7,7 +7,7 @@ import {
TextField,
} from 'polythene-mithril';
import { styler } from 'polythene-core-css';
import { DropdownCard } from 'amiv-web-ui-components';
import { DropdownCard, DatalistController } from 'amiv-web-ui-components';
// eslint-disable-next-line import/extensions
import { apiUrl } from 'networkConfig';
import ItemView from '../views/itemView';
......@@ -123,6 +123,9 @@ export default class viewEvent extends ItemView {
constructor(vnode) {
super(vnode);
this.signupHandler = new ResourceHandler('eventsignups');
this.signupCtrl = new DatalistController((query, search) => this.signupHandler.get({
search, ...query,
}));
this.description = false;
this.advertisement = false;
this.registration = false;
......@@ -142,8 +145,9 @@ export default class viewEvent extends ItemView {
// only show accepted
where.accepted = true;
}
this.signupHandler.get({ where }).then((data) => {
this.emaillist = (data._items.map(item => item.email));
this.signupCtrl.getFullList().then((list) => {
console.log(list);
this.emaillist = (list.map(item => item.email));
m.redraw();
});
}
......
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