From 5806848dc8e7cf2d8d65a733e13da90a2ddf2f9b Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 19 Oct 2021 02:44:54 +0200 Subject: [PATCH] Remove all roaming tagRenderings --- Models/ThemeConfig/TagRenderingConfig.ts | 3 ++ .../layers/bike_cleaning/bike_cleaning.json | 11 ++--- .../bike_repair_station.json | 3 +- assets/layers/bike_shop/bike_shop.json | 41 +++++++++++++++++++ 4 files changed, 48 insertions(+), 10 deletions(-) diff --git a/Models/ThemeConfig/TagRenderingConfig.ts b/Models/ThemeConfig/TagRenderingConfig.ts index 4edd0da1d2..40b7bdfe14 100644 --- a/Models/ThemeConfig/TagRenderingConfig.ts +++ b/Models/ThemeConfig/TagRenderingConfig.ts @@ -62,6 +62,9 @@ export default class TagRenderingConfig { this.render = Translations.T(json.render, context + ".render"); this.question = Translations.T(json.question, context + ".question"); this.roaming = json.roaming ?? false; + if(this.roaming){ + console.warn("Deprecation notice: roaming renderings will be scrapped.", this.id, context) + } const condition = TagUtils.Tag(json.condition ?? {"and": []}, `${context}.condition`); if (this.roaming && conditionIfRoaming !== undefined) { this.condition = new And([condition, conditionIfRoaming]); diff --git a/assets/layers/bike_cleaning/bike_cleaning.json b/assets/layers/bike_cleaning/bike_cleaning.json index 9d56e19a5c..9e39755c77 100644 --- a/assets/layers/bike_cleaning/bike_cleaning.json +++ b/assets/layers/bike_cleaning/bike_cleaning.json @@ -79,16 +79,13 @@ ] }, "then": { - "render": "./assets/layers/bike_cleaning/bike_cleaning_icon.svg", - "roaming": true - }, - "badge": true + "render": "./assets/layers/bike_cleaning/bike_cleaning_icon.svg" + } } ], "titleIcons": [ { - "render": "", - "roaming": true + "render": "" } ], "tagRenderings": [ @@ -118,7 +115,6 @@ "then": "The cleaning service has a fee" } ], - "roaming": true, "id": "bike_cleaning-service:bicycle:cleaning:charge" }, { @@ -146,7 +142,6 @@ "then": "The cleaning service has a fee" } ], - "roaming": false, "id": "bike_cleaning-charge" } ], diff --git a/assets/layers/bike_repair_station/bike_repair_station.json b/assets/layers/bike_repair_station/bike_repair_station.json index 8b78c689d7..891f8a599c 100644 --- a/assets/layers/bike_repair_station/bike_repair_station.json +++ b/assets/layers/bike_repair_station/bike_repair_station.json @@ -129,8 +129,7 @@ "titleIcons": [ { "render": "", - "condition": "operator=De Fietsambassade Gent", - "roaming": true + "condition": "operator=De Fietsambassade Gent" }, "defaults" ], diff --git a/assets/layers/bike_shop/bike_shop.json b/assets/layers/bike_shop/bike_shop.json index 0615750377..8b80b5b043 100644 --- a/assets/layers/bike_shop/bike_shop.json +++ b/assets/layers/bike_shop/bike_shop.json @@ -174,6 +174,10 @@ "condition": "service:bicycle:diy=yes", "render": "" }, + { "condition": "service:bicycle:cleaning=yes", + + "render": "" + }, "defaults" ], "description": { @@ -659,6 +663,32 @@ } } ] + }, + { + "question": "How much does it cost to use the cleaning service?", + "render": "Using the cleaning service costs {charge}", + "freeform": { + "key": "service:bicycle:cleaning:charge", + "addExtraTags": [ + "service:bicycle:cleaning:fee=yes" + ] + }, + "mappings": [ + { + "if": "service:bicycle:cleaning:fee=no&service:bicycle:cleaning:charge=", + "then": "The cleaning service is free to use" + }, + { + "if": "service:bicycle:cleaning:fee=no&", + "then": "Free to use", + "hideInAnswer": true + }, + { + "if": "service:bicycle:cleaning:fee=yes", + "then": "The cleaning service has a fee" + } + ], + "id": "bike_cleaning-service:bicycle:cleaning:charge" } ], "presets": [ @@ -700,6 +730,17 @@ "if": "service:bicycle:pump=yes", "then": "circle:#e2783d;./assets/layers/bike_repair_station/pump.svg", "badge": true + }, + { + "if": { + "and": [ + "service:bicycle:cleaning~*" + ] + }, + "then": { + "render": "./assets/layers/bike_cleaning/bike_cleaning_icon.svg" + }, + "badge": true } ], "width": {