From 0ce3e85df7857c8d275ca55f930a9bf2986de943 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Wed, 7 Dec 2022 17:49:40 +0100 Subject: [PATCH] Add more payment methods + coin denominations --- assets/layers/ticket_machine/10cent.svg | 59 +++++++ assets/layers/ticket_machine/1cent.svg | 57 +++++++ assets/layers/ticket_machine/1euro.svg | 46 ++++++ assets/layers/ticket_machine/20cent.svg | 59 +++++++ assets/layers/ticket_machine/2cent.svg | 55 +++++++ assets/layers/ticket_machine/2euro.svg | 46 ++++++ assets/layers/ticket_machine/50cent.svg | 59 +++++++ assets/layers/ticket_machine/5cent.svg | 55 +++++++ assets/layers/ticket_machine/coins.svg | 7 + .../layers/ticket_machine/license_info.json | 110 +++++++++++++ assets/layers/ticket_machine/notes.svg | 7 + .../layers/ticket_machine/ticket_machine.json | 153 +++++++++++++++++- 12 files changed, 711 insertions(+), 2 deletions(-) create mode 100644 assets/layers/ticket_machine/10cent.svg create mode 100644 assets/layers/ticket_machine/1cent.svg create mode 100644 assets/layers/ticket_machine/1euro.svg create mode 100644 assets/layers/ticket_machine/20cent.svg create mode 100644 assets/layers/ticket_machine/2cent.svg create mode 100644 assets/layers/ticket_machine/2euro.svg create mode 100644 assets/layers/ticket_machine/50cent.svg create mode 100644 assets/layers/ticket_machine/5cent.svg create mode 100644 assets/layers/ticket_machine/coins.svg create mode 100644 assets/layers/ticket_machine/license_info.json create mode 100644 assets/layers/ticket_machine/notes.svg diff --git a/assets/layers/ticket_machine/10cent.svg b/assets/layers/ticket_machine/10cent.svg new file mode 100644 index 000000000..539395abd --- /dev/null +++ b/assets/layers/ticket_machine/10cent.svg @@ -0,0 +1,59 @@ + + + + simple 10 euro cent + + + + + + image/svg+xml + + simple 10 euro cent + + 2018-10-11 + + + Frank Tremmel + + + + + cent + money + teaching + school + education + simple + counting + + + simple money for worksheets + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/1cent.svg b/assets/layers/ticket_machine/1cent.svg new file mode 100644 index 000000000..cbbe3f0cc --- /dev/null +++ b/assets/layers/ticket_machine/1cent.svg @@ -0,0 +1,57 @@ + + + + simple 1 euro cent + + + + + + image/svg+xml + + simple 1 euro cent + + 2018-10-11 + + + Frank Tremmel + + + + + cent + money + teaching + school + education + simple + counting + + + simple money for worksheets + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/1euro.svg b/assets/layers/ticket_machine/1euro.svg new file mode 100644 index 000000000..565cb8f18 --- /dev/null +++ b/assets/layers/ticket_machine/1euro.svg @@ -0,0 +1,46 @@ + + + + simple 1 euro + + + + + + image/svg+xml + + simple 1 euro + + 2018-10-11 + + + Frank Tremmel + + + + + cent + money + teaching + school + education + simple + counting + + + simple money for worksheets + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/20cent.svg b/assets/layers/ticket_machine/20cent.svg new file mode 100644 index 000000000..6b92dfbd5 --- /dev/null +++ b/assets/layers/ticket_machine/20cent.svg @@ -0,0 +1,59 @@ + + + + simple 20 euro cent + + + + + + image/svg+xml + + simple 20 euro cent + + 2018-10-11 + + + Frank Tremmel + + + + + cent + money + teaching + school + education + simple + counting + + + simple money for worksheets + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/2cent.svg b/assets/layers/ticket_machine/2cent.svg new file mode 100644 index 000000000..f1cea0ccf --- /dev/null +++ b/assets/layers/ticket_machine/2cent.svg @@ -0,0 +1,55 @@ + + + + simple 2 euro cent + + + + + + image/svg+xml + + simple 2 euro cent + + 2018-10-11 + + + Frank Tremmel + + + + + cent + money + teaching + school + education + simple + counting + + + simple money for worksheets + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/2euro.svg b/assets/layers/ticket_machine/2euro.svg new file mode 100644 index 000000000..a9ed9de64 --- /dev/null +++ b/assets/layers/ticket_machine/2euro.svg @@ -0,0 +1,46 @@ + + + + simple 2 euro + + + + + + image/svg+xml + + simple 2 euro + + 2018-10-11 + + + Frank Tremmel + + + + + cent + money + teaching + school + education + simple + counting + + + simple money for worksheets + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/50cent.svg b/assets/layers/ticket_machine/50cent.svg new file mode 100644 index 000000000..e31630c2a --- /dev/null +++ b/assets/layers/ticket_machine/50cent.svg @@ -0,0 +1,59 @@ + + + + simple 50 euro cent + + + + + + image/svg+xml + + simple 50 euro cent + + 2018-10-11 + + + Frank Tremmel + + + + + cent + money + teaching + school + education + simple + counting + + + simple money for worksheets + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/5cent.svg b/assets/layers/ticket_machine/5cent.svg new file mode 100644 index 000000000..28894a029 --- /dev/null +++ b/assets/layers/ticket_machine/5cent.svg @@ -0,0 +1,55 @@ + + + + simple 5 euro cent + + + + + + image/svg+xml + + simple 5 euro cent + + 2018-10-11 + + + Frank Tremmel + + + + + cent + money + teaching + school + education + simple + counting + + + simple money for worksheets + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/coins.svg b/assets/layers/ticket_machine/coins.svg new file mode 100644 index 000000000..4fe4c15a7 --- /dev/null +++ b/assets/layers/ticket_machine/coins.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/license_info.json b/assets/layers/ticket_machine/license_info.json new file mode 100644 index 000000000..2f2d2a429 --- /dev/null +++ b/assets/layers/ticket_machine/license_info.json @@ -0,0 +1,110 @@ +[ + { + "path": "10cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311337/worksheet-10-cent-coloured" + ] + }, + { + "path": "1cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311334/worksheet-1-cent-coloured" + ] + }, + { + "path": "1euro.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311340/worksheet-1-euro-coloured" + ] + }, + { + "path": "20cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311338/worksheet-20-cent-coloured" + ] + }, + { + "path": "2cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311335/worksheet-2-cent-coloured" + ] + }, + { + "path": "2euro.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311341/worksheet-2-euro-coloured" + ] + }, + { + "path": "50cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311339/worksheet-50-cent-coloured" + ] + }, + { + "path": "5cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311336/worksheet-5-cent-coloured" + ] + }, + { + "path": "coins.svg", + "license": "CC-BY 3.0", + "authors": [ + "Online Web Fonts" + ], + "sources": [ + "https://www.onlinewebfonts.com/icon/464488" + ] + }, + { + "path": "notes.svg", + "license": "CC-BY 3.0", + "authors": [ + "Online Web Fonts" + ], + "sources": [ + "https://www.onlinewebfonts.com/icon/464507" + ] + } +] \ No newline at end of file diff --git a/assets/layers/ticket_machine/notes.svg b/assets/layers/ticket_machine/notes.svg new file mode 100644 index 000000000..79d25a433 --- /dev/null +++ b/assets/layers/ticket_machine/notes.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/assets/layers/ticket_machine/ticket_machine.json b/assets/layers/ticket_machine/ticket_machine.json index e455f181d..b60787e9f 100644 --- a/assets/layers/ticket_machine/ticket_machine.json +++ b/assets/layers/ticket_machine/ticket_machine.json @@ -37,9 +37,158 @@ "placeholder": { "en": "Name of the operator" } - } + }, + "mappings": [ + { + "if": "operator=Nederlandse Spoorwegen", + "then": { + "en": "Dutch Railways (NS)", + "nl": "Nederlandse Spoorwegen (NS)" + }, + "hideInAnswer": "_country!=nl" + } + ] }, - "payment-options" + { + "id": "payment-options", + "question": { + "en": "How can you pay for tickets at this ticket machine?" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "payment:coins=yes", + "ifnot": "payment:coins=no", + "icon": "./assets/layers/ticket_machine/coins.svg", + "then": { + "en": "You can pay using coins" + } + }, + { + "if": "payment:notes=yes", + "ifnot": "payment:notes=no", + "icon": "./assets/layers/ticket_machine/notes.svg", + "then": { + "en": "You can pay using bank notes" + } + }, + { + "if": "payment:cash=yes", + "ifnot": "payment:cash=", + "icon": "./assets/tagRenderings/cash.svg", + "then": { + "en": "You can pay here using coins and bank notes" + }, + "hideInAnswer": true + }, + { + "if": "payment:debit_cards=yes", + "ifnot": "payment_debit_cards=no", + "icon": "./assets/tagRenderings/payment_card.svg", + "then": { + "en": "You can pay here using debit cards" + } + }, + { + "if": "payment:credit_cards=yes", + "ifnot": "payment:credit_cards=no", + "icon": "./assets/tagRenderings/payment_card.svg", + "then": { + "en": "You can pay here using credit cards" + } + }, + { + "if": "payment:cards=yes", + "ifnot": "payment:cards=", + "icon": "./assets/tagRenderings/payment_card.svg", + "then": { + "en": "You can pay here using cards" + }, + "hideInAnswer": true + } + ] + }, + { + "id": "denominations-coins", + "condition": { + "and": [ + { + "or": [ + "payment:coins=yes", + "payment:cash=yes" + ] + }, + { + "or": [ + "_country=nl", + "_country=be" + ] + } + ] + }, + "question": { + "en": "Whith what coins can you pay here?" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "payment:coins:denomination=0.01 EUR", + "icon": "./assets/layers/ticket_machine/1cent.svg", + "then": { + "en": "1 cent coins are accepted" + } + }, + { + "if": "payment:coins:denomination=0.02 EUR", + "icon": "./assets/layers/ticket_machine/2cent.svg", + "then": { + "en": "2 cent coins are accepted" + } + }, + { + "if": "payment:coins:denomination=0.05 EUR", + "icon": "./assets/layers/ticket_machine/5cent.svg", + "then": { + "en": "5 cent coins are accepted" + } + }, + { + "if": "payment:coins:denomination=0.10 EUR", + "icon": "./assets/layers/ticket_machine/10cent.svg", + "then": { + "en": "10 cent coins are accepted" + } + }, + { + "if": "payment:coins:denomination=0.20 EUR", + "icon": "./assets/layers/ticket_machine/20cent.svg", + "then": { + "en": "20 cent coins are accepted" + } + }, + { + "if": "payment:coins:denomination=0.50 EUR", + "icon": "./assets/layers/ticket_machine/50cent.svg", + "then": { + "en": "50 cent coins are accepted" + } + }, + { + "if": "payment:coins:denomination=1.00 EUR", + "icon": "./assets/layers/ticket_machine/1euro.svg", + "then": { + "en": "1 euro coins are accepted" + } + }, + { + "if": "payment:coins:denomination=2.00 EUR", + "icon": "./assets/layers/ticket_machine/2euro.svg", + "then": { + "en": "2 euro coins are accepted" + } + } + ] + } ], "presets": [ {