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": {
|
||||
"type": "group",
|
||||
"header": "wheelchair-title",
|
||||
"labels": "wheelchair"
|
||||
"labels": "wheelchair;adult-changing-table"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1292,7 +1292,6 @@
|
|||
"condition": {
|
||||
"and": [
|
||||
{
|
||||
"#": "NOT on designated",
|
||||
"or": [
|
||||
"wheelchair=yes",
|
||||
"toilets:wheelchair=yes"
|
||||
|
@ -1302,7 +1301,8 @@
|
|||
"or": [
|
||||
"access=yes",
|
||||
"access=public",
|
||||
"access=customers"
|
||||
"access=customers",
|
||||
"access="
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -1352,7 +1352,7 @@
|
|||
{
|
||||
"if": "centralkey=nks",
|
||||
"alsoShowIf": "centralkey~i~nks",
|
||||
"hideInAnswer": "_country!=uk",
|
||||
"hideInAnswer": "_country!=gb",
|
||||
"addExtraTags": [
|
||||
"toilets:wheelchair:access=centralkey"
|
||||
],
|
||||
|
@ -1364,8 +1364,11 @@
|
|||
{
|
||||
"if": "centralkey=eurokey",
|
||||
"alsoShowIf": "centralkey~i~eurokey",
|
||||
"icon": "./assets/layers/toilet/eurokey.svg",
|
||||
"hideInAnswer": "_country!=uk",
|
||||
"icon": {
|
||||
"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": [
|
||||
"toilets:wheelchair:access=centralkey"
|
||||
],
|
||||
|
@ -1421,12 +1424,26 @@
|
|||
"type": "pfloat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "questions-wheelchair",
|
||||
"labels": [
|
||||
"wheelchair",
|
||||
"hidden",
|
||||
"relevant-questions"
|
||||
],
|
||||
"render": {
|
||||
"special": {
|
||||
"type": "questions",
|
||||
"labels": "wheelchair"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "adult-changing-table-title",
|
||||
"labels": [
|
||||
"hidden",
|
||||
"prefixed",
|
||||
"wheelchair"
|
||||
"adult-changing-table"
|
||||
],
|
||||
"render": {
|
||||
"en": "<h3>Adult changing table</h3>",
|
||||
|
@ -1437,10 +1454,10 @@
|
|||
{
|
||||
"id": "adult-changing-table",
|
||||
"labels": [
|
||||
"wheelchair",
|
||||
"prefixed",
|
||||
"hidden",
|
||||
"relevant-questions"
|
||||
"relevant-questions",
|
||||
"adult-changing-table"
|
||||
],
|
||||
"question": {
|
||||
"en": "Does this toilet have an adult changing table?",
|
||||
|
@ -1469,7 +1486,7 @@
|
|||
"labels": [
|
||||
"hidden",
|
||||
"prefixed",
|
||||
"wheelchair"
|
||||
"adult-changing-table"
|
||||
],
|
||||
"question": {
|
||||
"en": "What is the height of the adult changing table?",
|
||||
|
@ -1490,28 +1507,159 @@
|
|||
],
|
||||
"freeform": {
|
||||
"key": "changing_table:adult:height",
|
||||
"type": "distance"
|
||||
"type": "pfloat"
|
||||
},
|
||||
"render": {
|
||||
"en": "The changing table is {canonical(changing_table:adult:height)} high",
|
||||
"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": [
|
||||
"wheelchair",
|
||||
"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": {
|
||||
"special": {
|
||||
"type": "questions",
|
||||
"show_all": "yes",
|
||||
"labels": "wheelchair"
|
||||
"labels": "adult-changing-table"
|
||||
}
|
||||
}
|
||||
},
|
||||
"classes": "pt-6 mt-6 border-dashed border-t-2 border-gray-500"
|
||||
},
|
||||
{
|
||||
"builtin": "phone",
|
||||
|
@ -1605,6 +1753,33 @@
|
|||
"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)
|
||||
/**
|
||||
* 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
|
||||
const _notForLabels = new Set(notForLabels)
|
||||
|
@ -44,7 +44,7 @@
|
|||
return true
|
||||
}
|
||||
|
||||
const baseQuestions = (layer?.tagRenderings ?? [])?.filter(
|
||||
let baseQuestions = (layer?.tagRenderings ?? [])?.filter(
|
||||
(tr) => allowed(tr.labels) && tr.question !== undefined
|
||||
)
|
||||
|
||||
|
@ -119,7 +119,6 @@
|
|||
}, 50)
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if $loginEnabled}
|
||||
<div
|
||||
bind:this={questionboxElem}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue