forked from MapComplete/MapComplete
		
	Merge branch 'master' into develop
This commit is contained in:
		
						commit
						7a2b99a566
					
				
					 5 changed files with 51 additions and 6 deletions
				
			
		|  | @ -94,6 +94,10 @@ export default class TagRenderingConfig { | ||||||
|             throw `A question is defined, but no mappings nor freeform (key) are. The question is ${this.question.txt} at ${context}` |             throw `A question is defined, but no mappings nor freeform (key) are. The question is ${this.question.txt} at ${context}` | ||||||
|         } |         } | ||||||
|          |          | ||||||
|  |         if(this.freeform && this.render === undefined){ | ||||||
|  |             throw `Detected a freeform key without rendering... Key: ${this.freeform.key} in ${context}` | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         if (json.multiAnswer) { |         if (json.multiAnswer) { | ||||||
|             if ((this.mappings?.length ?? 0) === 0) { |             if ((this.mappings?.length ?? 0) === 0) { | ||||||
|                 throw "MultiAnswer is set, but no mappings are defined" |                 throw "MultiAnswer is set, but no mappings are defined" | ||||||
|  |  | ||||||
|  | @ -7,11 +7,20 @@ | ||||||
|     "render": { |     "render": { | ||||||
|       "en": "Bicycle tube vending machine" |       "en": "Bicycle tube vending machine" | ||||||
|     }, |     }, | ||||||
|     "mappings": [{ |     "mappings": [ | ||||||
|       "if": "name~*", |       { | ||||||
|       "then": "Bicycle tube vending machine {name}" |         "if": "name~*", | ||||||
|     }] |         "then": "Bicycle tube vending machine {name}" | ||||||
|  |       } | ||||||
|  |     ] | ||||||
|   }, |   }, | ||||||
|  |   "titleIcons": [ | ||||||
|  |     { | ||||||
|  |       "render": "<a href='https://fietsambassade.gent.be/' target='_blank'><img src='./assets/themes/cyclofix/fietsambassade_gent_logo_small.svg'/></a>", | ||||||
|  |       "condition": "operator=De Fietsambassade Gent" | ||||||
|  |     }, | ||||||
|  |     "defaults" | ||||||
|  |   ], | ||||||
|   "icon": { |   "icon": { | ||||||
|     "render": "pin:#ffffff;./assets/layers/bicycle_tube_vending_machine/pinIcon.svg" |     "render": "pin:#ffffff;./assets/layers/bicycle_tube_vending_machine/pinIcon.svg" | ||||||
|   }, |   }, | ||||||
|  | @ -113,6 +122,7 @@ | ||||||
|       "freeform": { |       "freeform": { | ||||||
|         "key": "brand" |         "key": "brand" | ||||||
|       }, |       }, | ||||||
|  |       "render": "{brand} tubes are sold here", | ||||||
|       "mappings": [ |       "mappings": [ | ||||||
|         { |         { | ||||||
|           "if": "brand=Continental", |           "if": "brand=Continental", | ||||||
|  | @ -123,7 +133,25 @@ | ||||||
|           "then": "Schwalbe tubes are sold here" |           "then": "Schwalbe tubes are sold here" | ||||||
|         } |         } | ||||||
|       ], |       ], | ||||||
|       "multiAnswer": true |       "multiAnswer": true, | ||||||
|  |       "condition": "operator!=Schwalbe" | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "question": "Who maintains this vending machine?", | ||||||
|  |       "render": "This vending machine is maintained by {operator}", | ||||||
|  |       "mappings": [ | ||||||
|  |         { | ||||||
|  |           "if": "operator=Schwalbe", | ||||||
|  |           "then": "Maintained by Schwalbe" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "if": "operator=Continental", | ||||||
|  |           "then": "Maintained by Continental" | ||||||
|  |         } | ||||||
|  |       ], | ||||||
|  |       "freeform": { | ||||||
|  |         "key": "operator" | ||||||
|  |       } | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "question": "Are other bicycle bicycle accessories sold here?", |       "question": "Are other bicycle bicycle accessories sold here?", | ||||||
|  | @ -143,6 +171,10 @@ | ||||||
|         { |         { | ||||||
|           "if": "vending:bicycle_pump=yes", |           "if": "vending:bicycle_pump=yes", | ||||||
|           "then": "Bicycle pumps are sold here" |           "then": "Bicycle pumps are sold here" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "if": "vending:bicycle_lock=yes", | ||||||
|  |           "then": "Bicycle locks are sold here" | ||||||
|         } |         } | ||||||
|       ], |       ], | ||||||
|       "multiAnswer": true |       "multiAnswer": true | ||||||
|  |  | ||||||
|  | @ -163,7 +163,7 @@ | ||||||
|           "then": { |           "then": { | ||||||
|             "en": "There are both tools and a pump present", |             "en": "There are both tools and a pump present", | ||||||
|             "nl": "Er is zowel een pomp als gereedschap aanwezig", |             "nl": "Er is zowel een pomp als gereedschap aanwezig", | ||||||
|             "fr": "IL y a des outils et une pompe", |             "fr": "Il y a des outils et une pompe", | ||||||
|             "gl": "Hai ferramentas e unha bomba de ar presentes", |             "gl": "Hai ferramentas e unha bomba de ar presentes", | ||||||
|             "de": "Es sind sowohl Werkzeuge als auch eine Pumpe vorhanden" |             "de": "Es sind sowohl Werkzeuge als auch eine Pumpe vorhanden" | ||||||
|           } |           } | ||||||
|  |  | ||||||
|  | @ -188,6 +188,10 @@ | ||||||
|         "en": "On which level is this camera located?", |         "en": "On which level is this camera located?", | ||||||
|         "nl": "Op welke verdieping bevindt deze camera zich?" |         "nl": "Op welke verdieping bevindt deze camera zich?" | ||||||
|       }, |       }, | ||||||
|  |       "render": { | ||||||
|  |         "en": "Located on level {level}", | ||||||
|  |         "nl": "Bevindt zich op verdieping {level}" | ||||||
|  |       }, | ||||||
|       "freeform": { |       "freeform": { | ||||||
|         "key": "level", |         "key": "level", | ||||||
|         "type": "nat" |         "type": "nat" | ||||||
|  | @ -287,6 +291,10 @@ | ||||||
|         "en": "How is this camera placed?", |         "en": "How is this camera placed?", | ||||||
|         "nl": "Hoe is deze camera geplaatst?" |         "nl": "Hoe is deze camera geplaatst?" | ||||||
|       }, |       }, | ||||||
|  |       "render": { | ||||||
|  |         "en": "Mounting method: {mount}", | ||||||
|  |         "nl": "Montage: {mount}" | ||||||
|  |       }, | ||||||
|       "freeform": { |       "freeform": { | ||||||
|         "key": "camera:mount" |         "key": "camera:mount" | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|  | @ -97,6 +97,7 @@ | ||||||
|             "key": "opening_hours", |             "key": "opening_hours", | ||||||
|             "type": "opening_hours" |             "type": "opening_hours" | ||||||
|           }, |           }, | ||||||
|  |           "render": "{opening_hours_table(opening_hours)}", | ||||||
|           "question": { |           "question": { | ||||||
|             "nl": "Op welke uren is deze speeltuin toegankelijk?" |             "nl": "Op welke uren is deze speeltuin toegankelijk?" | ||||||
|           }, |           }, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue