From b188cd612acac8372271639ebe957352fa95e465 Mon Sep 17 00:00:00 2001 From: Wieland <29458682+wielandb@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:29:24 +0200 Subject: [PATCH] Make units actually cm --- assets/question_catalog/definition.json | 59 ++++++++++++++++++------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/assets/question_catalog/definition.json b/assets/question_catalog/definition.json index ea1c2ad6..d45d363d 100644 --- a/assets/question_catalog/definition.json +++ b/assets/question_catalog/definition.json @@ -4166,13 +4166,19 @@ "type": "Number", "input": { "placeholder": "@elevatorHeightPlaceholder", - "decimals": 1, - "min": 1.5, - "max": 4, + "decimals": 0, + "min": 200, + "max": 400, "unit": "@unitCentimeter" }, "constructor": { - "height": ["$input"] + "width": [ + "REPLACE", "/\\.?0{1,2}$/", "", [ + "INSERT", ".", "-2", [ + "PAD", "0", "3", "$input" + ] + ] + ] } }, "conditions": [ @@ -4193,13 +4199,22 @@ "type": "Number", "input": { "placeholder": "@elevatorDiameterPlaceholder", - "decimals": 1, - "min": 1.5, - "max": 4, + "decimals": 0, + "min": 150, + "max": 1000, "unit": "@unitCentimeter" }, "constructor": { - "diameter": ["CONCAT", "$input", "m"] + "diameter": [ + + "CONCAT", [ + "REPLACE", "/\\.?0{1,2}$/", "", [ + "INSERT", ".", "-2", [ + "PAD", "0", "3", "$input" + ] + ] + ], "m" + ] } }, "conditions": [ @@ -4223,13 +4238,19 @@ "type": "Number", "input": { "placeholder": "@elevatorDoorWidthPlaceholder", - "decimals": 1, - "min": 1, - "max": 4, + "decimals": 0, + "min": 150, + "max": 400, "unit": "@unitCentimeter" }, "constructor": { - "door:width": ["$input"] + "door:width": [ + "REPLACE", "/\\.?0{1,2}$/", "", [ + "INSERT", ".", "-2", [ + "PAD", "0", "3", "$input" + ] + ] + ] } }, "conditions": [ @@ -4262,13 +4283,19 @@ "type": "Number", "input": { "placeholder": "@elevatorDoorHeightPlaceholder", - "decimals": 1, - "min": 2, - "max": 4, + "decimals": 0, + "min": 200, + "max": 400, "unit": "@unitCentimeter" }, "constructor": { - "door:height": ["$input"] + "width": [ + "REPLACE", "/\\.?0{1,2}$/", "", [ + "INSERT", ".", "-2", [ + "PAD", "0", "3", "$input" + ] + ] + ] } }, "conditions": [