forked from MapComplete/MapComplete
Add filters, payment options and halal to the food theme
This commit is contained in:
parent
d7b0987960
commit
90aaf780c8
2 changed files with 128 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue