Make bicycle-rental questions conditional in bike_shop layer

This commit is contained in:
Pieter Vander Vennet 2022-12-23 18:24:56 +01:00
parent e836445de6
commit c8971a1cbe
3 changed files with 19 additions and 7 deletions

View file

@ -314,7 +314,10 @@
"cs": "Zde si můžete půjčit cyklistické přilby" "cs": "Zde si můžete půjčit cyklistické přilby"
} }
} }
] ],
"condition": {
"and": []
}
}, },
{ {
"id": "rental_types", "id": "rental_types",
@ -443,7 +446,9 @@
"key": "capacity:bicycle_type", "key": "capacity:bicycle_type",
"type": "pnat" "type": "pnat"
}, },
"condition": "rental~.*bicycle_type.*" "condition": {"and":
["rental~.*bicycle_type.*"]
}
} }
] ]
} }

View file

@ -487,7 +487,14 @@
} }
] ]
}, },
"bicycle_rental.*bicycle_rental", {
"builtin": "bicycle_rental.*bicycle_rental",
"override": {
"condition": {
"and+": ["service:bicycle:rental=yes"]
}
}
},
{ {
"id": "bike_repair_second-hand-bikes", "id": "bike_repair_second-hand-bikes",
"question": { "question": {

View file

@ -39,6 +39,7 @@
"socialImage": "./assets/themes/cyclofix/logo.svg", "socialImage": "./assets/themes/cyclofix/logo.svg",
"layers": [ "layers": [
"bike_cafe", "bike_cafe",
"bike_shop",
{ {
"builtin": [ "builtin": [
"bicycle_rental" "bicycle_rental"
@ -87,7 +88,6 @@
] ]
} }
}, },
"bike_shop",
{ {
"builtin": "bicycle_library", "builtin": "bicycle_library",
"override": { "override": {