@camphoric/camphoric-event-lark 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/LICENSE +21 -0
- package/README.md +106 -2
- package/dist/camperAdminAttributes.d.ts +190 -0
- package/dist/camperAdminAttributes.js +204 -0
- package/dist/camperMeals.d.ts +41 -0
- package/dist/camperMeals.js +81 -0
- package/dist/camperSchema.d.ts +240 -0
- package/dist/camperSchema.js +273 -0
- package/dist/confirmationEmailTemplate.d.ts +2 -0
- package/dist/confirmationEmailTemplate.js +74 -0
- package/dist/confirmationPageTemplate.d.ts +2 -0
- package/dist/confirmationPageTemplate.js +34 -0
- package/dist/countries.d.ts +2 -0
- package/dist/countries.js +248 -0
- package/dist/dates.d.ts +9 -0
- package/dist/dates.js +33 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.js +88 -0
- package/dist/lodgings.d.ts +2168 -0
- package/dist/lodgings.js +435 -0
- package/dist/organization.d.ts +13 -0
- package/dist/organization.js +12 -0
- package/dist/packagePath.d.ts +7 -0
- package/dist/packagePath.js +19 -0
- package/dist/preSubmitTemplate.d.ts +2 -0
- package/dist/preSubmitTemplate.js +4 -0
- package/dist/pricing/camperPricingLogic.d.ts +75 -0
- package/dist/pricing/camperPricingLogic.js +278 -0
- package/dist/pricing/pricing.d.ts +22 -0
- package/dist/pricing/pricing.js +22 -0
- package/dist/pricing/pricingLists.d.ts +6 -0
- package/dist/pricing/pricingLists.js +58 -0
- package/dist/pricing/registrationPricingLogic.d.ts +16 -0
- package/dist/pricing/registrationPricingLogic.js +14 -0
- package/dist/regAdminAttributes.d.ts +2 -0
- package/dist/regAdminAttributes.js +1 -0
- package/dist/regTemplateVars.d.ts +10 -0
- package/dist/regTemplateVars.js +16 -0
- package/dist/registrationDepositSchema.d.ts +23 -0
- package/dist/registrationDepositSchema.js +43 -0
- package/dist/registrationSchema.d.ts +94 -0
- package/dist/registrationSchema.js +114 -0
- package/dist/registrationTypes.d.ts +23 -0
- package/dist/registrationTypes.js +176 -0
- package/dist/registrationUISchema.d.ts +82 -0
- package/dist/registrationUISchema.js +133 -0
- package/dist/reports.d.ts +7 -0
- package/dist/reports.js +225 -0
- package/dist/testRegistrations.d.ts +2 -0
- package/dist/testRegistrations.js +113 -0
- package/package.json +60 -4
- package/reports/All-Campers.j2 +61 -0
- package/reports/Campers--All-Camp-3.j2 +48 -0
- package/reports/Campers--By-Reg-Date.j2 +22 -0
- package/reports/Campers--By-Zip-Code--For-Carpool-.j2 +32 -0
- package/reports/Campers--Confirmation-Email-Info.j2 +103 -0
- package/reports/Campers--Early-Arrivals.j2 +41 -0
- package/reports/Campers--Email-List-for-All-Campers.j2 +3 -0
- package/reports/Campers--Half-Campers.j2 +49 -0
- package/reports/Campers--Lodging-by-Alpha.j2 +4 -0
- package/reports/Campers--Lodging-by-Lodging.j2 +10 -0
- package/reports/Campers--Minors.j2 +24 -0
- package/reports/Campers--NOT-Checked-In.j2 +47 -0
- package/reports/Campers--Name-Badges.j2 +40 -0
- package/reports/Campers--Parking-Exceptions.j2 +15 -0
- package/reports/Campers--Parking-Passes.j2 +54 -0
- package/reports/Campers--Registration-Payments.j2 +11 -0
- package/reports/Campers--Registration-Volunteers.j2 +45 -0
- package/reports/Campers--Tent-Tags.j2 +19 -0
- package/reports/Community-Care--Campers.j2 +64 -0
- package/reports/Crew--Camper-Email-List-by-Crew.j2 +30 -0
- package/reports/Crew--Clean--C1.j2 +63 -0
- package/reports/Crew--Clean--C2-3.j2 +63 -0
- package/reports/Crew--Community-Care.j2 +52 -0
- package/reports/Crew--Kitchen--w--Lodging.j2 +33 -0
- package/reports/Crew--Managers-and-Others.j2 +52 -0
- package/reports/Crew--Office--Camp-1.j2 +52 -0
- package/reports/Crew--Office--Camp-2.j2 +53 -0
- package/reports/Crew--Office--Camp-3.j2 +53 -0
- package/reports/Crew--Setup-and-Teardown.j2 +54 -0
- package/reports/Crew--Special-Invites.j2 +24 -0
- package/reports/Donation-Report---Lark.j2 +7 -0
- package/reports/Kitchen--All-Meal-Tickets.j2 +38 -0
- package/reports/Kitchen--Meal-Location-Exceptions.j2 +38 -0
- package/reports/Kitchen--Meal-Totals.j2 +34 -0
- package/reports/Kitchen--No-Meal-Ticket.j2 +23 -0
- package/reports/MWCA-Final-Report.j2 +42 -0
- package/reports/Registration--All-reg-workers.j2 +67 -0
- package/reports/Registration--Early-Arrivals.j2 +65 -0
- package/reports/Registration--First-Half-Arrivals.j2 +64 -0
- package/reports/Registration--Late-Arrivals.j2 +46 -0
- package/reports/Registration--PayPal-Invoices.j2 +50 -0
- package/reports/Registration--Second-Half-Arrivals.j2 +49 -0
- package/reports/Registration--Values-for-July-Email.j2 +34 -0
- package/reports/Security--Campers.j2 +64 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Will Wheeler
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,107 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @camphoric/camphoric-event-lark
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lark Traditional Arts' **Lark Camp**, as a [Camphoric](https://github.com/camphoric/camphoric)
|
|
4
|
+
event: its import object (the registration form, pricing, lodging, emails and reports), its
|
|
5
|
+
organization, its sample registrations, and a script that adds generated registrations to an
|
|
6
|
+
imported event.
|
|
7
|
+
|
|
8
|
+
It satisfies the contract in
|
|
9
|
+
[`@camphoric/camphoric-event-import-spec`](https://github.com/camphoric/camphoric/tree/main/data/packages/event-import-spec),
|
|
10
|
+
and Camphoric's importer (`data/` in the Camphoric repository) installs it from GitHub Packages
|
|
11
|
+
and imports it.
|
|
12
|
+
|
|
13
|
+
## Installing from GitHub Packages
|
|
14
|
+
|
|
15
|
+
The `@camphoric` packages are on GitHub Packages, which needs a token to install **even public
|
|
16
|
+
packages**. This repository's `.npmrc` points the `@camphoric` scope there; give npm a token with
|
|
17
|
+
the `read:packages` scope, never in a committed file:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
gh auth refresh -s read:packages
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm config set //npm.pkg.github.com/:_authToken "$(gh auth token)"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
In GitHub Actions, the workflows use the job's own `GITHUB_TOKEN` (with `packages: read`).
|
|
28
|
+
|
|
29
|
+
## Developing
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm ci # install (needs the token above)
|
|
33
|
+
npm test # unit tests, including the spec's conformance checks
|
|
34
|
+
npm run typecheck
|
|
35
|
+
npm run lint # type-check, then ESLint
|
|
36
|
+
npm run build # compile index.ts to dist/ (what's published)
|
|
37
|
+
scripts/smoke-test-package.sh # pack it, install it, and load it from its build with plain Node
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The event's source is TypeScript; the published package is its build (`dist/`) and its report
|
|
41
|
+
templates (`reports/`). The spec is a **peer dependency** (`^1.0.0`), so Camphoric's importer loads
|
|
42
|
+
one copy of it for every event; a spec major this event doesn't follow fails to install rather than
|
|
43
|
+
nesting a second copy. Camphoric's `RELEASE.md` ("What a spec version means") describes how a new
|
|
44
|
+
spec major is rolled out.
|
|
45
|
+
|
|
46
|
+
To add generated registrations to an event imported into a running Camphoric:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
CAMPHORIC_URL=http://localhost:8000 DJANGO_SUPERUSER_USERNAME=admin DJANGO_SUPERUSER_PASSWORD=admin COUNT=10 npm run bulk
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
(`addRegistrations.ts` describes its other settings. Each completed registration queues a
|
|
53
|
+
confirmation email, so run it where mail goes to the console, as in local development.)
|
|
54
|
+
|
|
55
|
+
## End-to-end tests
|
|
56
|
+
|
|
57
|
+
`e2e/` holds Playwright tests of the registration form, using the harness in
|
|
58
|
+
`@camphoric/camphoric-event-import-tools/e2e`. Before they run, a throwaway Camphoric starts
|
|
59
|
+
(the release image and Postgres, in Docker, on a free port), this event is imported into it with
|
|
60
|
+
its registration window open, and afterwards the server is removed.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx playwright install chromium # once
|
|
64
|
+
npm run e2e # needs Docker
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Locally the results are listed in the terminal; `npm run e2e -- --reporter=html`, then `npx
|
|
68
|
+
playwright show-report`, gives the HTML report (with traces) that CI uploads.
|
|
69
|
+
|
|
70
|
+
- `CAMPHORIC_IMAGE_TAG` picks the release image's tag (default `latest`, pulled fresh);
|
|
71
|
+
`CAMPHORIC_E2E_IMAGE` names a locally built image instead.
|
|
72
|
+
- `CAMPHORIC_E2E_SERVER_URL`, with `CAMPHORIC_E2E_SERVER_USERNAME` / `_PASSWORD`, imports into
|
|
73
|
+
a running server instead of starting one.
|
|
74
|
+
- Every test, on desktop and mobile Chrome, shares the one imported event, so a registration one
|
|
75
|
+
test completes stays.
|
|
76
|
+
- The `registration` fixture is a page object for the form (fields by label, campers, lodging, the
|
|
77
|
+
price ticker, submitting and paying). The client's markup lives only there, so a change to the
|
|
78
|
+
Camphoric client changes the harness, not these tests.
|
|
79
|
+
|
|
80
|
+
`.github/workflows/e2e.yml` runs them on pull requests, weekly (so a Camphoric release that
|
|
81
|
+
changes the form shows up here), and on demand, where it can pick an image tag.
|
|
82
|
+
|
|
83
|
+
## Releases
|
|
84
|
+
|
|
85
|
+
Commits follow [Conventional Commits](https://www.conventionalcommits.org/) (`feat:` and `fix:`
|
|
86
|
+
release; `feat!:` is a major). On each push to `main`,
|
|
87
|
+
[release-please](https://github.com/googleapis/release-please) keeps a release PR up to date
|
|
88
|
+
with the version bump and `CHANGELOG.md`. Merging it tags `vX.Y.Z`, creates the GitHub Release,
|
|
89
|
+
and publishes the package to GitHub Packages. To publish a released tag again, if that failed:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
gh workflow run release-please.yml -f tag=v1.0.0
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The repository publishes the package, so in the package's settings, under "Manage Actions
|
|
96
|
+
access", this repository must keep the **Write** (or Admin) role.
|
|
97
|
+
|
|
98
|
+
## History
|
|
99
|
+
|
|
100
|
+
This event was developed in the Camphoric repository, under `data/`, until it moved here with its
|
|
101
|
+
history (including its old snapshot tests, removed before the move). Issue and pull request
|
|
102
|
+
numbers in commit messages before the move refer to
|
|
103
|
+
[camphoric/camphoric](https://github.com/camphoric/camphoric).
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
MIT
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
badge_role: {
|
|
3
|
+
data: {
|
|
4
|
+
type: string;
|
|
5
|
+
title: string;
|
|
6
|
+
maxLength: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
vehicles: {
|
|
10
|
+
ui: {
|
|
11
|
+
items: {
|
|
12
|
+
"ui:order": string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
data: {
|
|
16
|
+
type: string;
|
|
17
|
+
items: {
|
|
18
|
+
type: string;
|
|
19
|
+
properties: {
|
|
20
|
+
make: {
|
|
21
|
+
type: string;
|
|
22
|
+
title: string;
|
|
23
|
+
};
|
|
24
|
+
year: {
|
|
25
|
+
type: string;
|
|
26
|
+
title: string;
|
|
27
|
+
maxLength: number;
|
|
28
|
+
minLength: number;
|
|
29
|
+
};
|
|
30
|
+
color: {
|
|
31
|
+
type: string;
|
|
32
|
+
title: string;
|
|
33
|
+
};
|
|
34
|
+
model: {
|
|
35
|
+
type: string;
|
|
36
|
+
title: string;
|
|
37
|
+
};
|
|
38
|
+
state: {
|
|
39
|
+
type: string;
|
|
40
|
+
title: string;
|
|
41
|
+
default: string;
|
|
42
|
+
maxLength: number;
|
|
43
|
+
minLength: number;
|
|
44
|
+
};
|
|
45
|
+
license: {
|
|
46
|
+
type: string;
|
|
47
|
+
title: string;
|
|
48
|
+
};
|
|
49
|
+
passengers: {
|
|
50
|
+
type: string;
|
|
51
|
+
items: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
title: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
title: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
checked_in: {
|
|
62
|
+
ui: {
|
|
63
|
+
"ui:enumNames": {
|
|
64
|
+
false: string;
|
|
65
|
+
true: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
data: {
|
|
69
|
+
type: string;
|
|
70
|
+
title: string;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
guardian_name: {
|
|
75
|
+
ui: {};
|
|
76
|
+
data: {
|
|
77
|
+
type: string;
|
|
78
|
+
title: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
crew_exception: {
|
|
82
|
+
ui: {};
|
|
83
|
+
data: {
|
|
84
|
+
type: string;
|
|
85
|
+
title: string;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
food_trade_only: {
|
|
90
|
+
ui: {
|
|
91
|
+
"ui:enumNames": {
|
|
92
|
+
false: string;
|
|
93
|
+
true: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
data: {
|
|
97
|
+
type: string;
|
|
98
|
+
title: string;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
precamp_meals_comp: {
|
|
103
|
+
ui: {
|
|
104
|
+
"ui:enumNames": {
|
|
105
|
+
false: string;
|
|
106
|
+
true: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
data: {
|
|
110
|
+
type: string;
|
|
111
|
+
title: string;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
instructor_meal_rate: {
|
|
116
|
+
ui: {
|
|
117
|
+
"ui:enumNames": {
|
|
118
|
+
false: string;
|
|
119
|
+
true: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
data: {
|
|
123
|
+
type: string;
|
|
124
|
+
title: string;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
meal_assignment_dinner: {
|
|
129
|
+
ui: {
|
|
130
|
+
"ui:placeholder": string;
|
|
131
|
+
};
|
|
132
|
+
data: {
|
|
133
|
+
enum: string[];
|
|
134
|
+
type: string;
|
|
135
|
+
title: string;
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
registration_volunteer: {
|
|
140
|
+
ui: {
|
|
141
|
+
"ui:enumNames": {
|
|
142
|
+
false: string;
|
|
143
|
+
true: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
data: {
|
|
147
|
+
type: string;
|
|
148
|
+
title: string;
|
|
149
|
+
default: boolean;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
guardian_forms_received: {
|
|
153
|
+
ui: {
|
|
154
|
+
"ui:enumNames": {
|
|
155
|
+
false: string;
|
|
156
|
+
true: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
data: {
|
|
160
|
+
type: string;
|
|
161
|
+
title: string;
|
|
162
|
+
default: boolean;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
guardian_forms_required: {
|
|
166
|
+
ui: {
|
|
167
|
+
"ui:enumNames": {
|
|
168
|
+
false: string;
|
|
169
|
+
true: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
data: {
|
|
173
|
+
type: string;
|
|
174
|
+
title: string;
|
|
175
|
+
default: boolean;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
meal_assignment_breakfast: {
|
|
179
|
+
ui: {
|
|
180
|
+
"ui:placeholder": string;
|
|
181
|
+
};
|
|
182
|
+
data: {
|
|
183
|
+
enum: string[];
|
|
184
|
+
type: string;
|
|
185
|
+
title: string;
|
|
186
|
+
description: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
export default _default;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/* eslint-disable quotes */
|
|
2
|
+
export default {
|
|
3
|
+
"badge_role": {
|
|
4
|
+
"data": {
|
|
5
|
+
"type": "string",
|
|
6
|
+
"title": "Role for name badge",
|
|
7
|
+
"maxLength": 10
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"vehicles": {
|
|
11
|
+
"ui": {
|
|
12
|
+
"items": {
|
|
13
|
+
"ui:order": [
|
|
14
|
+
"year",
|
|
15
|
+
"make",
|
|
16
|
+
"model",
|
|
17
|
+
"color",
|
|
18
|
+
"state",
|
|
19
|
+
"license",
|
|
20
|
+
"*"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"data": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"make": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"title": "Make"
|
|
32
|
+
},
|
|
33
|
+
"year": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"title": "Year",
|
|
36
|
+
"maxLength": 4,
|
|
37
|
+
"minLength": 4
|
|
38
|
+
},
|
|
39
|
+
"color": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"title": "Color"
|
|
42
|
+
},
|
|
43
|
+
"model": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"title": "Model"
|
|
46
|
+
},
|
|
47
|
+
"state": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"title": "License Plate State",
|
|
50
|
+
"default": "CA",
|
|
51
|
+
"maxLength": 2,
|
|
52
|
+
"minLength": 2
|
|
53
|
+
},
|
|
54
|
+
"license": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"title": "License Plate Number"
|
|
57
|
+
},
|
|
58
|
+
"passengers": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"title": "Passengers"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"title": "Registration: Vehicles"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"checked_in": {
|
|
71
|
+
"ui": {
|
|
72
|
+
"ui:enumNames": {
|
|
73
|
+
"false": "No",
|
|
74
|
+
"true": "Yes"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"data": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"title": "Registration: Checked-In",
|
|
80
|
+
"default": false
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"guardian_name": {
|
|
84
|
+
"ui": {},
|
|
85
|
+
"data": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"title": "Guardian name"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"crew_exception": {
|
|
91
|
+
"ui": {},
|
|
92
|
+
"data": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"title": "Crew Exception/Title",
|
|
95
|
+
"description": "Enter 'Guest' if not actually on crew, and 'Manager of <Crewname>' if manager of a crew"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"food_trade_only": {
|
|
99
|
+
"ui": {
|
|
100
|
+
"ui:enumNames": {
|
|
101
|
+
"false": "No",
|
|
102
|
+
"true": "Yes"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"data": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"title": "Food trade only",
|
|
108
|
+
"default": false
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"precamp_meals_comp": {
|
|
112
|
+
"ui": {
|
|
113
|
+
"ui:enumNames": {
|
|
114
|
+
"false": "No",
|
|
115
|
+
"true": "Yes"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"data": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"title": "Comped pre-camp meals",
|
|
121
|
+
"default": false
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"instructor_meal_rate": {
|
|
125
|
+
"ui": {
|
|
126
|
+
"ui:enumNames": {
|
|
127
|
+
"false": "No",
|
|
128
|
+
"true": "Yes"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"data": {
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"title": "Instructor meal rate",
|
|
134
|
+
"default": false
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"meal_assignment_dinner": {
|
|
138
|
+
"ui": {
|
|
139
|
+
"ui:placeholder": "Choose an option"
|
|
140
|
+
},
|
|
141
|
+
"data": {
|
|
142
|
+
"enum": [
|
|
143
|
+
"Camp 1",
|
|
144
|
+
"Camp 2"
|
|
145
|
+
],
|
|
146
|
+
"type": "string",
|
|
147
|
+
"title": "Meals: Dinner in",
|
|
148
|
+
"description": "If camper is not eating meals in the camp where they're staying"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"registration_volunteer": {
|
|
152
|
+
"ui": {
|
|
153
|
+
"ui:enumNames": {
|
|
154
|
+
"false": "No",
|
|
155
|
+
"true": "Yes"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"data": {
|
|
159
|
+
"type": "boolean",
|
|
160
|
+
"title": "Registration volunteer",
|
|
161
|
+
"default": false
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"guardian_forms_received": {
|
|
165
|
+
"ui": {
|
|
166
|
+
"ui:enumNames": {
|
|
167
|
+
"false": "No",
|
|
168
|
+
"true": "Yes"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"data": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"title": "Guardian forms received",
|
|
174
|
+
"default": false
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"guardian_forms_required": {
|
|
178
|
+
"ui": {
|
|
179
|
+
"ui:enumNames": {
|
|
180
|
+
"false": "No",
|
|
181
|
+
"true": "Yes"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"data": {
|
|
185
|
+
"type": "boolean",
|
|
186
|
+
"title": "Guardian forms required",
|
|
187
|
+
"default": false
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"meal_assignment_breakfast": {
|
|
191
|
+
"ui": {
|
|
192
|
+
"ui:placeholder": "Choose an option"
|
|
193
|
+
},
|
|
194
|
+
"data": {
|
|
195
|
+
"enum": [
|
|
196
|
+
"Camp 1",
|
|
197
|
+
"Camp 2"
|
|
198
|
+
],
|
|
199
|
+
"type": "string",
|
|
200
|
+
"title": "Meals: Breakfast in",
|
|
201
|
+
"description": "If camper is not eating meals in the camp where they're staying"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { mealsLookup } from './pricing/camperPricingLogic.ts';
|
|
2
|
+
export declare const mealTypes: string[];
|
|
3
|
+
declare const createMeals: (...options: (keyof typeof mealsLookup)[]) => {
|
|
4
|
+
type: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
required: string[];
|
|
8
|
+
properties: {
|
|
9
|
+
meal_plan: {
|
|
10
|
+
type: string;
|
|
11
|
+
title: string;
|
|
12
|
+
enum: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
dependencies: {
|
|
16
|
+
meal_plan: {
|
|
17
|
+
oneOf: ({
|
|
18
|
+
properties: {
|
|
19
|
+
meal_plan: {
|
|
20
|
+
enum: string[];
|
|
21
|
+
};
|
|
22
|
+
meal_type?: undefined;
|
|
23
|
+
};
|
|
24
|
+
required?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
required: string[];
|
|
27
|
+
properties: {
|
|
28
|
+
meal_plan: {
|
|
29
|
+
enum: string[];
|
|
30
|
+
};
|
|
31
|
+
meal_type: {
|
|
32
|
+
type: string;
|
|
33
|
+
title: string;
|
|
34
|
+
enum: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
})[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default createMeals;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { mealsLookup } from "./pricing/camperPricingLogic.js";
|
|
2
|
+
import pricing from "./pricing/pricing.js";
|
|
3
|
+
import regTemplateVars from "./regTemplateVars.js";
|
|
4
|
+
export const mealTypes = [
|
|
5
|
+
'Non-Vegetarian',
|
|
6
|
+
'Vegetarian',
|
|
7
|
+
'Vegan',
|
|
8
|
+
];
|
|
9
|
+
const dependencies = {
|
|
10
|
+
'meal_plan': {
|
|
11
|
+
'oneOf': [
|
|
12
|
+
{
|
|
13
|
+
'properties': {
|
|
14
|
+
'meal_plan': {
|
|
15
|
+
'enum': ['No meals', '']
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
'required': ['meal_type'],
|
|
21
|
+
'properties': {
|
|
22
|
+
'meal_plan': {
|
|
23
|
+
'enum': Object.values(mealsLookup),
|
|
24
|
+
},
|
|
25
|
+
'meal_type': {
|
|
26
|
+
'type': 'string',
|
|
27
|
+
'title': 'What types of meals do you want?',
|
|
28
|
+
'enum': mealTypes,
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
// Switched off (see the commented-out allOf below), kept for when it returns
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
|
+
const allOf = [
|
|
38
|
+
{
|
|
39
|
+
if: { properties: { meal_plan: { enum: Object.values(mealsLookup) } } },
|
|
40
|
+
then: {
|
|
41
|
+
required: ['meal_type'],
|
|
42
|
+
properties: {
|
|
43
|
+
meal_type: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
title: 'What types of meals do you want?',
|
|
46
|
+
enum: mealTypes,
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
else: {},
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
const createMeals = (...options) => ({
|
|
54
|
+
'type': 'object',
|
|
55
|
+
'title': 'Meal Plans',
|
|
56
|
+
'description': `Meal plans must be fully paid by ${regTemplateVars.meals_due_date}. We cannot accept partial payments. Food prices include sales tax.
|
|
57
|
+
|
|
58
|
+
NOTE: You may only cook if you’re camping in a vehicle with a built-in kitchen. No portable white gas or propane stoves are allowed in the park.
|
|
59
|
+
|
|
60
|
+
| Meal Plan Pricing | adult age 12+ | child ages 0-11 |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| Full camp, full meals | $${pricing.meals_adult_full} adults | $${pricing.meals_youth_full} kids |
|
|
63
|
+
| Full camp, just dinners | $${pricing.meals_adult_dinners} adults | $${pricing.meals_youth_dinners} kids |
|
|
64
|
+
| Half camp, full meals | $${pricing.meals_adult_half} adults | $${pricing.meals_youth_half} kids |
|
|
65
|
+
|
|
66
|
+
Meal plans offer significant savings. You may buy individual meals at camp instead of buying a meal plan. (But it costs more!)`,
|
|
67
|
+
'required': ['meal_plan'],
|
|
68
|
+
'properties': {
|
|
69
|
+
'meal_plan': {
|
|
70
|
+
'type': 'string',
|
|
71
|
+
'title': 'What meals will you purchase?',
|
|
72
|
+
'enum': [
|
|
73
|
+
'No meals',
|
|
74
|
+
...options.map(o => mealsLookup[o])
|
|
75
|
+
],
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
dependencies,
|
|
79
|
+
// allOf,
|
|
80
|
+
});
|
|
81
|
+
export default createMeals;
|