add advanced charge questions

This commit is contained in:
Osmwithspace 2025-03-17 12:43:54 +01:00
parent 214e419e50
commit 765ee2b040

View file

@ -134,58 +134,6 @@
"id": "name"
},
"contact",
{
"id": "fee",
"question": {
"en": "Is a fee charged here?",
"de": "Wird hier eine Gebühr erhoben?",
"ca": "Aquí es cobra alguna tarifa?",
"cs": "Platí se tu poplatek?"
},
"render": {
"en": "A fee of {charge} should be paid for here",
"de": "Hier wird eine Gebühr von {charge} erhoben",
"ca": "S'ha de pagar una tarifa de {charge} aquí",
"cs": "Platí se tu poplatek {charge}"
},
"freeform": {
"key": "charge",
"type": "currency",
"addExtraTags": [
"fee=yes"
],
"inline": true
},
"mappings": [
{
"if": "fee=no",
"addExtraTags": [
"charge="
],
"then": {
"en": "The campsite is free of charge",
"de": "Der Zeltplatz ist kostenlos",
"ca": "El càmping és gratuït",
"cs": "Kempování je zdarma"
}
},
{
"if": {
"and": [
"fee=yes",
"charge="
]
},
"then": {
"en": "A fee is charged here.",
"de": "Hier wird eine Gebühr erhoben.",
"ca": "Aquí es cobra una tarifa.",
"cs": "Platí se tu poplatek."
},
"hideInAnswer": "charge~*"
}
]
},
{
"question": {
"de": "Wie viele Personen können hier übernachten?",
@ -205,6 +153,94 @@
},
"id": "capacity_persons"
},
{
"icon": "./assets/layers/questions/cash.svg",
"condition": {
"and": [
"charge="
]
},
"id": "fee",
"question": {
"en": "Is there a fee?",
"de": "Gibt es hier eine Gebühr?"
},
"mappings": [
{
"if": "fee=no",
"addExtraTags": [
"charge="
],
"then": {
"en": "The campsite is free of charge",
"de": "Der Zeltplatz ist kostenlos"
},
"icon": "./assets/layers/questions/cash.svg"
},
{
"if": "fee=yes",
"then": {
"en": "There is a fee.",
"de": "Es gibt eine Gebühr."
},
"icon": "./assets/layers/questions/cash.svg"
}
]
},
{
"icon": "./assets/layers/questions/cash.svg",
"condition": {
"and": [
"charge!~^(.*;|)[^;\/]*\/day(|[^\/].*)$",
"fee!=no"
]
},
"id": "charge_person_day",
"question": {
"en": "What is the charge per person per day?",
"de": "Was ist die Gebühr pro Person pro Tag?"
},
"render": {
"en": "Charge per person per day: {charge}",
"de": "Gebühr pro Person pro Tag: {charge}"
},
"freeform": {
"key": "charge",
"type": "currency",
"inline": true,
"postfixDistinguished": "person/day",
"addExtraTags": [
"fee=yes"
]
}
},
{
"icon": "./assets/layers/questions/cash.svg",
"condition": {
"and": [
"charge!~.*\/person\/day.*",
"fee!=no"
]
},
"id": "charge_day",
"question": {
"en": "What is the charge per day?",
"de": "Was ist die Gebühr pro Tag?"
},
"render": {
"en": "Charge per day: {charge}",
"de": "Gebühr pro Tag: {charge}"
},
"freeform": {
"key": "charge",
"type": "currency",
"inline": true,
"postfixDistinguished": "day",
"addExtraTags": [
"fee=yes"
]
}
},
"caravansites.caravansites-toilets",
"toilet_at_amenity.toilets-wheelchair",
"questions",