forked from MapComplete/MapComplete
		
	Themes(toilets): add questions about the changing tables
This commit is contained in:
		
							parent
							
								
									848c2ba2c8
								
							
						
					
					
						commit
						95bc3a078d
					
				
					 2 changed files with 194 additions and 20 deletions
				
			
		|  | @ -1121,7 +1121,7 @@ | ||||||
|         "special": { |         "special": { | ||||||
|           "type": "group", |           "type": "group", | ||||||
|           "header": "wheelchair-title", |           "header": "wheelchair-title", | ||||||
|           "labels": "wheelchair" |           "labels": "wheelchair;adult-changing-table" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  | @ -1292,7 +1292,6 @@ | ||||||
|       "condition": { |       "condition": { | ||||||
|         "and": [ |         "and": [ | ||||||
|           { |           { | ||||||
|             "#": "NOT on designated", |  | ||||||
|             "or": [ |             "or": [ | ||||||
|               "wheelchair=yes", |               "wheelchair=yes", | ||||||
|               "toilets:wheelchair=yes" |               "toilets:wheelchair=yes" | ||||||
|  | @ -1302,7 +1301,8 @@ | ||||||
|             "or": [ |             "or": [ | ||||||
|               "access=yes", |               "access=yes", | ||||||
|               "access=public", |               "access=public", | ||||||
|               "access=customers" |               "access=customers", | ||||||
|  |               "access=" | ||||||
|             ] |             ] | ||||||
|           } |           } | ||||||
|         ] |         ] | ||||||
|  | @ -1352,7 +1352,7 @@ | ||||||
|         { |         { | ||||||
|           "if": "centralkey=nks", |           "if": "centralkey=nks", | ||||||
|           "alsoShowIf": "centralkey~i~nks", |           "alsoShowIf": "centralkey~i~nks", | ||||||
|           "hideInAnswer": "_country!=uk", |           "hideInAnswer": "_country!=gb", | ||||||
|           "addExtraTags": [ |           "addExtraTags": [ | ||||||
|             "toilets:wheelchair:access=centralkey" |             "toilets:wheelchair:access=centralkey" | ||||||
|           ], |           ], | ||||||
|  | @ -1364,8 +1364,11 @@ | ||||||
|         { |         { | ||||||
|           "if": "centralkey=eurokey", |           "if": "centralkey=eurokey", | ||||||
|           "alsoShowIf": "centralkey~i~eurokey", |           "alsoShowIf": "centralkey~i~eurokey", | ||||||
|           "icon": "./assets/layers/toilet/eurokey.svg", |           "icon": { | ||||||
|           "hideInAnswer": "_country!=uk", |             "class": "medium", | ||||||
|  |             "path": "./assets/layers/toilet/eurokey.svg" | ||||||
|  |           }, | ||||||
|  |           "hideInAnswer": "_country!~(be)|(bg)|(cy)|(dk)|(de)|(ee)|(fi)|(fr)|(gr)|(hu)|(ie)|(it)|(hr)|(lv)|(lt)|(lu)|(mt)|(nl)|(at)|(pl)|(pt)|(ro)|(si)|(sk)|(es)|(cz)|(se)|(ch)|(tr)", | ||||||
|           "addExtraTags": [ |           "addExtraTags": [ | ||||||
|             "toilets:wheelchair:access=centralkey" |             "toilets:wheelchair:access=centralkey" | ||||||
|           ], |           ], | ||||||
|  | @ -1421,12 +1424,26 @@ | ||||||
|         "type": "pfloat" |         "type": "pfloat" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     { | ||||||
|  |       "id": "questions-wheelchair", | ||||||
|  |       "labels": [ | ||||||
|  |         "wheelchair", | ||||||
|  |         "hidden", | ||||||
|  |         "relevant-questions" | ||||||
|  |       ], | ||||||
|  |       "render": { | ||||||
|  |         "special": { | ||||||
|  |           "type": "questions", | ||||||
|  |           "labels": "wheelchair" | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|       "id": "adult-changing-table-title", |       "id": "adult-changing-table-title", | ||||||
|       "labels": [ |       "labels": [ | ||||||
|         "hidden", |         "hidden", | ||||||
|         "prefixed", |         "prefixed", | ||||||
|         "wheelchair" |         "adult-changing-table" | ||||||
|       ], |       ], | ||||||
|       "render": { |       "render": { | ||||||
|         "en": "<h3>Adult changing table</h3>", |         "en": "<h3>Adult changing table</h3>", | ||||||
|  | @ -1437,10 +1454,10 @@ | ||||||
|     { |     { | ||||||
|       "id": "adult-changing-table", |       "id": "adult-changing-table", | ||||||
|       "labels": [ |       "labels": [ | ||||||
|         "wheelchair", |  | ||||||
|         "prefixed", |         "prefixed", | ||||||
|         "hidden", |         "hidden", | ||||||
|         "relevant-questions" |         "relevant-questions", | ||||||
|  |         "adult-changing-table" | ||||||
|       ], |       ], | ||||||
|       "question": { |       "question": { | ||||||
|         "en": "Does this toilet have an adult changing table?", |         "en": "Does this toilet have an adult changing table?", | ||||||
|  | @ -1469,7 +1486,7 @@ | ||||||
|       "labels": [ |       "labels": [ | ||||||
|         "hidden", |         "hidden", | ||||||
|         "prefixed", |         "prefixed", | ||||||
|         "wheelchair" |         "adult-changing-table" | ||||||
|       ], |       ], | ||||||
|       "question": { |       "question": { | ||||||
|         "en": "What is the height of the adult changing table?", |         "en": "What is the height of the adult changing table?", | ||||||
|  | @ -1490,29 +1507,160 @@ | ||||||
|       ], |       ], | ||||||
|       "freeform": { |       "freeform": { | ||||||
|         "key": "changing_table:adult:height", |         "key": "changing_table:adult:height", | ||||||
|         "type": "distance" |         "type": "pfloat" | ||||||
|       }, |       }, | ||||||
|       "render": { |       "render": { | ||||||
|         "en": "The changing table is {canonical(changing_table:adult:height)} high", |         "en": "The changing table is {canonical(changing_table:adult:height)} high", | ||||||
|         "nl": "De verzorgingstafel is {canonical(changing_table:adult:height)} hoog" |         "nl": "De verzorgingstafel is {canonical(changing_table:adult:height)} hoog" | ||||||
|       }, |       }, | ||||||
|       "condition": "changing_table:adult=yes" |       "condition": { | ||||||
|  |         "and": [ | ||||||
|  |           "changing_table:adult=yes" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "id": "questions-wheelchair", |       "id": "adult-changing-table-min_height", | ||||||
|       "labels": [ |       "labels": [ | ||||||
|         "wheelchair", |  | ||||||
|         "hidden", |         "hidden", | ||||||
|         "relevant-questions" |         "prefixed", | ||||||
|  |         "adult-changing-table" | ||||||
|  |       ], | ||||||
|  |       "question": { | ||||||
|  |         "en": "What is the lowest height the adult changing table can be moved to?", | ||||||
|  |         "nl": "Wat is de laagste stand waarop de verzorgingstafel voor volwassenen gezet kan worden?" | ||||||
|  |       }, | ||||||
|  |       "questionHint": { | ||||||
|  |         "en": "This is measured between the floor and the top of the changing table", | ||||||
|  |         "nl": "Dit wordt gemeten van de vloer tot de bovenkant van de verzorgingstafel" | ||||||
|  |       }, | ||||||
|  |       "freeform": { | ||||||
|  |         "key": "changing_table:adult:min_height", | ||||||
|  |         "type": "pfloat" | ||||||
|  |       }, | ||||||
|  |       "render": { | ||||||
|  |         "en": "The lowest height of the adult changing table is {canonical(changing_table:adult:min_height)}", | ||||||
|  |         "nl": "De laagste stand van de verzorgingstafel is {canonical(changing_table:adult:min_height)} hoog" | ||||||
|  |       }, | ||||||
|  |       "condition": { | ||||||
|  |         "and": [ | ||||||
|  |           "changing_table:adult:height=adjustable" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "id": "adult-changing-table-max_height", | ||||||
|  |       "labels": [ | ||||||
|  |         "hidden", | ||||||
|  |         "prefixed", | ||||||
|  |         "adult-changing-table" | ||||||
|  |       ], | ||||||
|  |       "question": { | ||||||
|  |         "en": "What is the highest height the adult changing table can be moved to?", | ||||||
|  |         "nl": "Wat is de hoogste stand waarop de verzorgingstafel voor volwassenen gezet kan worden?" | ||||||
|  |       }, | ||||||
|  |       "questionHint": { | ||||||
|  |         "en": "This is measured between the floor and the top of the changing table", | ||||||
|  |         "nl": "Dit wordt gemeten van de vloer tot de bovenkant van de verzorgingstafel" | ||||||
|  |       }, | ||||||
|  |       "freeform": { | ||||||
|  |         "key": "changing_table:adult:max_height", | ||||||
|  |         "type": "pfloat" | ||||||
|  |       }, | ||||||
|  |       "render": { | ||||||
|  |         "en": "The highest height of the adult changing table is {canonical(changing_table:adult:max_height)}", | ||||||
|  |         "nl": "De hoogste stand van de verzorgingstafel is {canonical(changing_table:adult:max_height)} hoog" | ||||||
|  |       }, | ||||||
|  |       "condition": { | ||||||
|  |         "and": [ | ||||||
|  |           "changing_table:adult:height=adjustable" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "id": "adult-changing-table-mechanism", | ||||||
|  |       "labels": [ | ||||||
|  |         "hidden", | ||||||
|  |         "relevant-questions", | ||||||
|  |         "adult-changing-table" | ||||||
|  |       ], | ||||||
|  |       "question": { | ||||||
|  |         "en": "How is the height of the changing table adjusted?", | ||||||
|  |         "nl": "Hoe wordt de hoogte van de verzorgingstafel aangepast?" | ||||||
|  |       }, | ||||||
|  |       "mappings": [ | ||||||
|  |         { | ||||||
|  |           "if": "changing_table:adult:height:mechanism=manual", | ||||||
|  |           "then": { | ||||||
|  |             "nl": "De hoogte van de verzorgingstafel wordt <b>met de hand</b> aangepast", | ||||||
|  |             "en": "The height of the adult changing table is adjusted <b>manually</b>" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "if": "changing_table:adult:height:mechanism=electric", | ||||||
|  |           "then": { | ||||||
|  |             "nl": "De verzorgingstafel wordt <b>door een electrische motor</b> in hoogte versteld", | ||||||
|  |             "en": "The height of the adult changing table is adjusted <b>electrically</b>" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ], | ||||||
|  |       "condition": { | ||||||
|  |         "and": [ | ||||||
|  |           "changing_table:adult:height=adjustable" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "id": "adult-changing-table-support", | ||||||
|  |       "labels": [ | ||||||
|  |         "hidden", | ||||||
|  |         "prefixed", | ||||||
|  |         "adult-changing-table" | ||||||
|  |       ], | ||||||
|  |       "question": { | ||||||
|  |         "en": "How is the adult changing table supported?", | ||||||
|  |         "nl": "Hoe is de verschoningstafel in de ruimte geplaatst?" | ||||||
|  |       }, | ||||||
|  |       "mappings": [ | ||||||
|  |         { | ||||||
|  |           "if": "changing_table:adult:support=wall_mounted", | ||||||
|  |           "then": { | ||||||
|  |             "en": "The changing table is mounted to the wall", | ||||||
|  |             "nl": "De verschoningstafel voor volwassenen hangt vast aan de muur" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "if": "changing_table:adult:support=legs", | ||||||
|  |           "then": { | ||||||
|  |             "en": "The changing table stands on table legs", | ||||||
|  |             "nl": "De verschoningstafel voor volwassenen staat op tafelpoten" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "if": "changing_table:adult:support=wheels", | ||||||
|  |           "then": { | ||||||
|  |             "en": "The changing table stands on table legs <b>with wheels</b> and can be moved", | ||||||
|  |             "nl": "De verschoningstafel voor volwassenen staat op tafelpoten <b>met wielen</b> en kan verplaatst worden" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "id": "questions-adult-changing-table", | ||||||
|  |       "labels": [ | ||||||
|  |         "hidden", | ||||||
|  |         "relevant-questions", | ||||||
|  |         "adult-changing-table" | ||||||
|       ], |       ], | ||||||
|       "render": { |       "render": { | ||||||
|         "special": { |         "special": { | ||||||
|           "type": "questions", |           "type": "questions", | ||||||
|           "show_all": "yes", |           "show_all": "yes", | ||||||
|           "labels": "wheelchair" |           "labels": "adult-changing-table" | ||||||
|         } |  | ||||||
|         } |         } | ||||||
|       }, |       }, | ||||||
|  |       "classes": "pt-6 mt-6 border-dashed border-t-2 border-gray-500" | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|       "builtin": "phone", |       "builtin": "phone", | ||||||
|       "override": { |       "override": { | ||||||
|  | @ -1605,6 +1753,33 @@ | ||||||
|           "cm" |           "cm" | ||||||
|         ] |         ] | ||||||
|       } |       } | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "changing_table:adult:height": { | ||||||
|  |         "quantity": "distance", | ||||||
|  |         "denominations": [ | ||||||
|  |           "m", | ||||||
|  |           "cm" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "changing_table:adult:min_height": { | ||||||
|  |         "quantity": "distance", | ||||||
|  |         "denominations": [ | ||||||
|  |           "m", | ||||||
|  |           "cm" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "changing_table:adult:max_height": { | ||||||
|  |         "quantity": "distance", | ||||||
|  |         "denominations": [ | ||||||
|  |           "m", | ||||||
|  |           "cm" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|   ] |   ] | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ | ||||||
|   const _onlyForLabels = new Set(onlyForLabels) |   const _onlyForLabels = new Set(onlyForLabels) | ||||||
|   /** |   /** | ||||||
|    * If set, only questions _not_ having these labels will be shown. |    * If set, only questions _not_ having these labels will be shown. | ||||||
|    * This is used for a partial questionbox |    * This is used for a partial questionbox. If both 'onlyFor' and 'notFor' are set, questions must accept both | ||||||
|    */ |    */ | ||||||
|   export let notForLabels: string[] | undefined = undefined |   export let notForLabels: string[] | undefined = undefined | ||||||
|   const _notForLabels = new Set(notForLabels) |   const _notForLabels = new Set(notForLabels) | ||||||
|  | @ -44,7 +44,7 @@ | ||||||
|     return true |     return true | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   const baseQuestions = (layer?.tagRenderings ?? [])?.filter( |   let baseQuestions = (layer?.tagRenderings ?? [])?.filter( | ||||||
|     (tr) => allowed(tr.labels) && tr.question !== undefined |     (tr) => allowed(tr.labels) && tr.question !== undefined | ||||||
|   ) |   ) | ||||||
| 
 | 
 | ||||||
|  | @ -119,7 +119,6 @@ | ||||||
|     }, 50) |     }, 50) | ||||||
|   } |   } | ||||||
| </script> | </script> | ||||||
| 
 |  | ||||||
| {#if $loginEnabled} | {#if $loginEnabled} | ||||||
|   <div |   <div | ||||||
|     bind:this={questionboxElem} |     bind:this={questionboxElem} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue