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 20d2c111 authored by Sandro Lutz's avatar Sandro Lutz Committed by Silvio Geel
Browse files

Load all joboffers at once

parent fc08f763
......@@ -19,7 +19,7 @@ async function getData(state) {
}
}
const jobs = await state.jobOfferController.getPageData(1);
return { ...{ events }, ...{ jobs } };
return { events, jobs };
}
export default class Frontpage {
......@@ -32,7 +32,7 @@ export default class Frontpage {
},
false
);
this.jobOfferController = new JobofferController({ max_results: 3 });
this.jobOfferController = new JobofferController({ max_results: 6 });
this.events = [];
this.jobs = [];
......
......@@ -64,7 +64,7 @@ export default class JobofferList extends FilteredListPage {
},
},
],
onchange: values => {
onchange: async values => {
const query = {};
this.dataStore.filterValues = values;
Object.keys(values).forEach(key => {
......@@ -82,7 +82,8 @@ export default class JobofferList extends FilteredListPage {
];
}
});
return controller.setQuery({ where: query });
await controller.setQuery({ where: query });
return controller.loadAll();
},
};
}
......
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