Add share icon, reordering of questions and icons, add urinal to toilet

This commit is contained in:
Pieter Vander Vennet 2020-11-21 16:44:48 +01:00
parent a261577ef3
commit 4018e6710b
12 changed files with 416 additions and 395 deletions

View file

@ -1,5 +1,6 @@
import * as questions from "../assets/questions/questions.json";
import TagRenderingConfig from "./JSON/TagRenderingConfig";
import * as questions from "../assets/tagRenderings/questions.json";
import * as icons from "../assets/tagRenderings/icons.json";
export default class SharedTagRenderings {
@ -7,13 +8,24 @@ export default class SharedTagRenderings {
private static generatedSharedFields() {
const dict = {}
for (const key in questions) {
function add(key, store){
try {
dict[key] = new TagRenderingConfig(questions[key])
dict[key] = new TagRenderingConfig(store[key])
} catch (e) {
console.error("COULD NOT PARSE", key, " FROM QUESTIONS:", e)
console.error("BUG: could not parse", key, " from questions.json or icons.json", e)
}
}
for (const key in questions) {
add(key, questions);
}
for (const key in icons) {
add(key, icons);
}
return dict;
}