Add filters, payment options and halal to the food theme

This commit is contained in:
Pieter Vander Vennet 2021-09-06 22:19:57 +02:00
parent d7b0987960
commit 90aaf780c8
2 changed files with 128 additions and 0 deletions

View file

@ -11,6 +11,13 @@ export default class FilterConfig {
}[];
constructor(json: FilterConfigJson, context: string) {
if(json.options === undefined){
throw `A filter without options was given at ${context}`
}
if(json.options.map === undefined){
throw `A filter was given where the options aren't a list at ${context}`
}
this.options = json.options.map((option, i) => {
const question = Translations.T(
option.question,