From 6f286e45b42ec0d6104a6a540571971d6bde414b Mon Sep 17 00:00:00 2001 From: Jumpy Squirrel Date: Fri, 13 Dec 2024 14:33:30 +0100 Subject: [PATCH] add max_count and allowed_counts package configs --- .../Chart.yaml | 2 +- .../values-example.yaml | 42 +++++++++++++++++++ .../values.schema.json | 12 ++++++ 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/charts/eurofurence-registration-system/Chart.yaml b/charts/eurofurence-registration-system/Chart.yaml index 21e400b..f44da7a 100644 --- a/charts/eurofurence-registration-system/Chart.yaml +++ b/charts/eurofurence-registration-system/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: eurofurence-registration-system -version: 0.0.31 +version: 0.0.32 description: A helm chart that can deploy the Eurofurence Registration System. type: application home: https://github.com/eurofurence/reg-helm-chart diff --git a/charts/eurofurence-registration-system/values-example.yaml b/charts/eurofurence-registration-system/values-example.yaml index 665c83f..e26c160 100644 --- a/charts/eurofurence-registration-system/values-example.yaml +++ b/charts/eurofurence-registration-system/values-example.yaml @@ -270,6 +270,31 @@ choices: visible_for: - regdesk - sponsordesk + benefactor: + allowed_counts: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 8 + - 10 + - 15 + - 20 + - 30 + - 40 + - 50 + - 100 + constraint: 'sponsor2' + constraint_msg: Only available for supersponsors. + description: Benefactor + max_count: 100 + price: 5000 + vat_percent: 19 + visible_for: + - regdesk + - sponsordesk tshirt: description: 'Paid T-Shirt (non-sponsor)' price: 2000 @@ -278,6 +303,23 @@ choices: constraint_msg: 'Sponsors and supersponsors get their T-Shirt for free.' visible_for: - sponsordesk + fursuit: + description: First Fursuit Badge + price: 0 + vat_percent: 19 + visible_for: + - regdesk + - sponsordesk + fursuitadd: + constraint: 'fursuit' + constraint_msg: Please select the free fursuit badge first, otherwise you'll pay too much. + description: Additional Fursuit Badge + price: 200 + vat_percent: 19 + max_count: 10 + visible_for: + - regdesk + - sponsordesk day-wed: description: 'Day Guest (Wednesday)' price: 7000 diff --git a/charts/eurofurence-registration-system/values.schema.json b/charts/eurofurence-registration-system/values.schema.json index 285fcf8..75a1bee 100644 --- a/charts/eurofurence-registration-system/values.schema.json +++ b/charts/eurofurence-registration-system/values.schema.json @@ -1317,6 +1317,18 @@ "type": "string", "pattern": "^[a-z][a-z0-9_-]*$" } + }, + "max_count": { + "type": "integer", + "description": "Maximal number of times this package can be selected. 0 or omitted means 1 so can be left out.", + "default": 1 + }, + "allowed_counts": { + "type": "array", + "description": "optional specific list of selections for the number of times a package can be selected. Ignored unless you also set max_count. If unset, all values from 1 to max_count are accepted.", + "items": { + "type": "integer" + } } } }