forked from MapComplete/MapComplete
Huge refactoring (WIP)
This commit is contained in:
parent
62c4f0a928
commit
895aa132ec
55 changed files with 1177 additions and 2190 deletions
20
Customizations/SharedTagRenderings.ts
Normal file
20
Customizations/SharedTagRenderings.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import * as questions from "../assets/questions/questions.json";
|
||||
import TagRenderingConfig from "./JSON/TagRenderingConfig";
|
||||
|
||||
export default class SharedTagRenderings {
|
||||
|
||||
public static SharedTagRendering = SharedTagRenderings.generatedSharedFields();
|
||||
|
||||
private static generatedSharedFields() {
|
||||
const dict = {}
|
||||
for (const key in questions) {
|
||||
try {
|
||||
dict[key] = new TagRenderingConfig(questions[key])
|
||||
} catch (e) {
|
||||
console.error("COULD NOT PARSE", key, " FROM QUESTIONS:", e)
|
||||
}
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue