Skip to content

Commit 37f06ff

Browse files
committed
Initial commit for STB 2026
1 parent 8c1f939 commit 37f06ff

5 files changed

Lines changed: 178 additions & 101 deletions

File tree

app/Config/CustomInvoiceModifier.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,18 @@ public static function modify(Team $team, Invoice $invoice, Entries $entries): v
1919
self::adjustJuniorStagePrices($invoice);
2020
}
2121

22-
$data = $team->getJsonData();
23-
if ($data->friday2h === 'yes' && $data->saturday5h === 'yes' && $data->sunday4h === 'yes') {
24-
$invoice->addItem('all_stages_discount', $invoice->items['team:enum:friday2h:yes']->getPrice()->multiply(-1));
25-
}
26-
2722
self::fixPersonItemAmounts($invoice, \count($team->persons));
2823
}
2924

3025
private static function adjustJuniorStagePrices(Invoice $invoice): void {
3126
$items = $invoice->items;
3227

33-
if (isset($items['team:enum:friday2h:yes'])) {
34-
$items['team:enum:friday2h:yes'] = self::discount($items['team:enum:friday2h:yes'], 10);
35-
}
36-
3728
if (isset($items['team:enum:saturday5h:yes'])) {
38-
$items['team:enum:saturday5h:yes'] = self::discount($items['team:enum:saturday5h:yes'], 20);
29+
$items['team:enum:saturday5h:yes'] = self::discount($items['team:enum:saturday5h:yes'], 10);
3930
}
4031

4132
if (isset($items['team:enum:sunday4h:yes'])) {
42-
$items['team:enum:sunday4h:yes'] = self::discount($items['team:enum:sunday4h:yes'], 20);
33+
$items['team:enum:sunday4h:yes'] = self::discount($items['team:enum:sunday4h:yes'], 10);
4334
}
4435

4536
$invoice->items = $items;

app/Config/local.neon

Lines changed: 156 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
php:
22
date.timezone: Europe/Prague
33

4-
# Do not forget to configure database here or in private.neon
5-
dbal:
6-
driver: mysqli
7-
host: localhost
8-
database: entries
9-
username: root
10-
password:
11-
connectionTz: +01:00
12-
options:
13-
charset: utf8mb4
14-
154
services:
165
exchange: Money\Exchange\ReversedCurrenciesExchange(
176
Money\Exchange\FixedExchange([
@@ -21,160 +10,237 @@ services:
2110
])
2211
)
2312

24-
2513
parameters:
26-
# Do not forget to set password here or in private.neon
27-
adminPassword:
2814
siteTitle:
29-
cs: Nějaký závod
30-
en: Some event
31-
webmasterEmail: email@example.com
15+
cs: 12. Sudetské Tojnárkovo Bloudění 2026
16+
en: Lost in Tojnarek’s Sudetenland 2026
3217
entries:
3318
minMembers: 2
34-
maxMembers: 5
35-
recommendedCardCapacity: 30
36-
eventDate: 2012-06-23 # used for age calculations
37-
opening: 2021-04-01T01:00:00
38-
closing: 2050-06-23T01:00:00
19+
maxMembers: 2
20+
eventDate: 2026-12-31 # used for age calculations
21+
opening: 2025-12-14T00:00:00
22+
closing: 2026-04-25T12:00:00
23+
accountNumber: '2800039826/2010'
3924
invoiceModifier: App\Config\CustomInvoiceModifier
40-
inputModifier: App\Config\BcnMandatoryForCzechs
4125
fees:
4226
currency: CZK
43-
person: 650
27+
person: 0
28+
limits:
29+
osecka: 14
30+
satlava: 29
31+
matraska: 15
4432
categories:
45-
HH20:
33+
MJ:
4634
constraints:
4735
- 'all(gender=male)'
48-
- 'all(age<20)'
49-
DD20:
50-
constraints:
51-
- 'all(gender=female)'
52-
- 'all(age<20)'
53-
HD20:
36+
- 'all(age<=18)'
37+
XJ:
5438
constraints:
5539
- 'some(gender=male)'
5640
- 'some(gender=female)'
57-
- 'all(age<20)'
58-
HH:
41+
- 'all(age<=18)'
42+
WJ:
5943
constraints:
60-
- 'all(gender=male)'
61-
DD:
44+
- 'all(gender=female)'
45+
- 'all(age<=18)'
46+
MO:
6247
constraints:
6348
- 'all(gender=male)'
64-
HD:
49+
XO:
6550
constraints:
6651
- 'some(gender=male)'
6752
- 'some(gender=female)'
68-
HH40:
53+
WO:
6954
constraints:
70-
- 'all(gender=male)'
71-
- 'all(age>40)'
72-
DD40:
55+
- 'all(gender=female)'
56+
MV:
7357
constraints:
7458
- 'all(gender=male)'
75-
- 'all(age>40)'
76-
HD40:
59+
- 'all(age>=45)'
60+
XV:
7761
constraints:
7862
- 'some(gender=male)'
7963
- 'some(gender=female)'
80-
- 'all(age>40)'
64+
- 'all(age>=40)'
65+
WV:
66+
constraints:
67+
- 'all(gender=female)'
68+
- 'all(age>=40)'
8169
fields:
8270
team:
8371
friday2h:
8472
type: enum
85-
label:
86-
en: '2 hour Friday Night'
87-
cs: 'Páteční noční dvouhodinovka'
8873
public: true
74+
label:
75+
en: '2-hour Friday Night:'
76+
cs: 'Páteční noční dvouhodinovka:'
8977
options:
9078
yes:
9179
label:
9280
en: 'Yes'
9381
cs: 'Ano'
94-
fee: 50
82+
fee: 100
9583
no:
9684
label:
9785
en: 'No'
9886
cs: 'Ne'
9987
default: true
10088
saturday5h:
10189
type: enum
102-
label:
103-
en: '5 hour Saturday'
104-
cs: 'Sobotní denní pětihodinovka'
10590
public: true
91+
label:
92+
en: '5-hour Saturday:'
93+
cs: 'Sobotní denní pětihodinovka:'
10694
options:
10795
yes:
10896
label:
10997
en: 'Yes'
11098
cs: 'Ano'
111-
fee: 150
99+
fee: 210
112100
no:
113101
label:
114102
en: 'No'
115103
cs: 'Ne'
116104
default: true
117105
sunday4h:
118106
type: enum
119-
label:
120-
en: '4 hour Sunday'
121-
cs: 'Nedělní čtyřhodinovka - mapa 1850'
122107
public: true
108+
label:
109+
en: '4-hour - historical map:'
110+
cs: 'Nedělní čtyřhodinovka - mapa 1850:'
123111
options:
124112
yes:
125113
label:
126114
en: 'Yes'
127115
cs: 'Ano'
128-
fee: 150
116+
fee: 210
129117
no:
130118
label:
131119
en: 'No'
132120
cs: 'Ne'
133121
default: true
122+
sportident:
123+
public: true
124+
type: sportident
125+
fee: 70
134126
person:
135127
country:
136128
type: country
137129
default: 46
138-
public: true
139-
sportident:
140-
type: sportident
141-
fee: 50
142-
public: true
143-
mug:
144-
type: checkbox
130+
accommodation:
145131
label:
146-
en: 'Mug (100 CZK)'
147-
cs: 'Hrnek (100 Kč)'
148-
fee: 100
132+
en: 'Accommodation must be ordered and paid until Monday April 13, 2026'
133+
cs: 'Ubytování se musí objednat a zaplatit do pondělí 13. 4. 2026'
134+
type: enum
135+
options:
136+
osecka:
137+
label:
138+
en: 'Pension Osecká Bouda (own sleeping bag), 700 CZK per person from Friday to Sunday'
139+
cs: 'Pension Osecká Bouda (vlastní spacák), 700 Kč/os. pátek až neděle'
140+
fee: 700
141+
limit: osecka
142+
satlava:
143+
label:
144+
en: 'Pension Šatlava (lienen included, shared bathroom), 700 CZK per person from Friday to Sunday'
145+
cs: 'Pension Šatlava, (s povlečením, společné sociálky), 700 Kč/os. pátek až neděle'
146+
fee: 700
147+
limit: satlava
148+
matraska:
149+
label:
150+
en: 'Pension Matrasova bouda (lienen included, bathroom en suite), 1600 CZK per person from Friday to Sunday'
151+
cs: 'Pension Šatlava, (s povlečením, vlastní sociálky), 1600 Kč/os. pátek až neděle'
152+
fee: 700
153+
limit: matraska
154+
none:
155+
default: true
156+
label:
157+
en: 'None'
158+
cs: 'Žádné'
149159
boarding:
150160
label:
151-
en: 'Boarding:'
152-
cs: 'Stravování:'
161+
en: 'Boarding must be ordered and paid until Monday April 13, 2026'
162+
cs: 'Stravování se musí objednat a zaplatit do pondělí 13. 4. 2026'
153163
type: checkboxlist
154164
items:
155-
fri_supper:
165+
fri-soup:
156166
label:
157-
en: 'Friday Supper (95 CZK)'
158-
cs: 'Páteční večeře (95 Kč)'
159-
fee: 95
160-
sat_breakfast:
167+
en: 'Friday poultry soup (35 CZK, available between 17:00 and 19:30)'
168+
cs: 'Páteční kuřecí vývar (35 Kč, odběr mezi 17:00 až 19:30)'
169+
fee: 35
170+
fri-d-goulash:
161171
label:
162-
en: 'Saturday Breakfest (100 CZK)'
163-
cs: 'Sobotní snídaně (100 Kč)'
164-
fee: 100
165-
sat_lun:
166-
label:
167-
en: 'Saturday Lunch (95 CZK)'
168-
cs: 'Sobotní oběd (95 Kč)'
169-
fee: 95
170-
description:
171-
en: Half-boarding costs 210 CZK per day
172-
cs: Polopenze stojí 210 Kč na den
173-
registry_bcn:
174-
type: text
172+
en: 'Friday goulash & dumplings (139 CZK, available between 17:00 and 19:30)'
173+
cs: 'Páteční guláš s knedlíkem (139 Kč, odběr mezi 17:00 až 19:30)'
174+
fee: 139
175+
fri-b-goulash:
176+
label:
177+
en: 'Friday goulash & bread (139 CZK, available between 17:00 and 19:30)'
178+
cs: 'Páteční guláš s chlebem (139 Kč, odběr mezi 17:00 až 19:30)'
179+
fee: 139
180+
sat-breakfast-sausage:
181+
label:
182+
en: 'Saturday sausage breakfast (70 CZK, available between 7:00 and 8:00)'
183+
cs: 'Sobotní párek k snídani (70 Kč, odběr mezi 7:00 až 8:00)'
184+
fee: 70
185+
sat-breakfast-eggs:
186+
label:
187+
en: 'Saturday scrambled eggs breakfast (70 CZK, available between 7:00 and 8:00)'
188+
cs: 'Sobotní snídaně míchaná vejce (70 Kč, odběr mezi 7:00 až 8:00)'
189+
fee: 70
190+
sat-breakfast-jam:
191+
label:
192+
en: 'Saturday bread/butter/jam/cheese breakfast (70 CZK, available between 7:00 and 8:00)'
193+
cs: 'Sobotní snídaně chléb, máslo, marmeláda, sýr (70 Kč, odběr mezi 7:00 až 8:00)'
194+
fee: 70
195+
sat-g-soup:
196+
label:
197+
en: 'Saturday goulash soup (35 CZK, available between 15:00 and 18:30)'
198+
cs: 'Sobotní gulášovka (35 Kč, odběr mezi 15:00 až 18:30)'
199+
fee: 35
200+
sat-d-chicken:
201+
label:
202+
en: 'Saturday chicken with paprika sauce with dumplings (139 CZK, available between 15:00 až 18:30)'
203+
cs: 'Sobotní kuře na paprice knedlík (139 Kč, odběr mezi 15:00 až 18:30)'
204+
fee: 139
205+
sat-p-chicken:
206+
label:
207+
en: 'Saturday chicken with paprika sauce with pasta (139 CZK, available between 15:00 až 18:30)'
208+
cs: 'Sobotní kuře na paprice s těstovinami (139 Kč, odběr mezi 15:00 až 18:30)'
209+
fee: 139
210+
sun-breakfast-sausage:
211+
label:
212+
en: 'Sunday sausage breakfast (70 CZK, available between 7:00 and 8:00)'
213+
cs: 'Nedělní párek k snídani (70 Kč, odběr mezi 7:00 až 8:00)'
214+
fee: 70
215+
sun-breakfast-eggs:
216+
label:
217+
en: 'Sunday scrambled eggs breakfast (70 CZK, available between 7:00 and 8:00)'
218+
cs: 'Nedělní snídaně míchaná vejce (70 Kč, odběr mezi 7:00 až 8:00)'
219+
fee: 70
220+
sun-breakfast-jam:
221+
label:
222+
en: 'Sunday bread/butter/jam/cheese breakfast (70 CZK, available between 7:00 and 8:00)'
223+
cs: 'Nedělní snídaně chléb, máslo, marmeláda, sýr (70 Kč, odběr mezi 7:00 až 8:00)'
224+
fee: 70
225+
sun-soup:
226+
label:
227+
en: 'Sunday pea soup (35 CZK, available between 13:00 and 14:30)'
228+
cs: 'Nedělní hrachovka (35 Kč, odběr mezi 13:00 až 14:30)'
229+
fee: 35
230+
sun-ch-risotto:
231+
label:
232+
en: 'Sunday chicken risotto (139 CZK, available between 13:00 and 14:30)'
233+
cs: 'Nedělní kuřecí rizoto (139 Kč, odběr mezi 13:00 až 14:30)'
234+
fee: 139
235+
sun-v-risotto:
236+
label:
237+
en: 'Sunday vegetable risotto (139 CZK, available between 13:00 and 14:30)'
238+
cs: 'Nedělní zeleninové rizoto (139 Kč, odběr mezi 13:00 až 14:30)'
239+
fee: 139
240+
concert:
241+
type: checkbox
175242
label:
176-
cs: 'Rodné číslo:'
177-
en: 'Birth certificate number:'
178-
description:
179-
cs: 'Pro účely rejstříku sportovců ČSA'
180-
en: 'For Czech competitors only - input any text'
243+
en: 'Saturday concert in the event centre (150 CZK, from 20:00)'
244+
cs: 'Sobotní koncert v závodním centru (150 Kč, od 20:00)'
245+
fee: 150
246+
webmasterEmail: "jan.tojnar@rogaining.cz"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{layout $layout}
2+
3+
{block payment}
4+
<p>Po zaplacení částky <strong>{$invoice->getTotal()|price}</strong> (startovné + příp. půjčovné čipu, ev. objednané jídlo) s&nbsp;variabilním symbolem <strong>{$id}</strong> na&nbsp;účet číslo <strong>2800039826/2010</strong> bude přihláška plně akceptována.</p>
5+
{/block}

app/Config/mail/verification.latte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{layout $layout}
2+
3+
{block payment}
4+
<p>Please pay sum of <strong>{$invoice->getTotal()|price}</strong> (for the entry fee + ev. ordered meals + ev. SI card rental) to&nbsp;the bank account of&nbsp;Krušnohorský rogainingový klub Litvínov.<br>
5+
Bank address: Fio banka, a.s., V&nbsp;Celnici 1028/10, Praha 1<br>
6+
IBAN: CZ8620100000002800039826<br>
7+
BIC/SWIFT code: FIOBCZPPXXX</p>
8+
{/block}

fafd.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[deployments.default]
2+
upload_uri = "sftp://ogion.cz/var/www/krk-litvinov.cz/entries/current/"
3+
web_root = "www/"
4+
web_uri = "https://entries.krk-litvinov.cz/"
5+
transfer_files = [
6+
"app/Config/private.neon",
7+
]

0 commit comments

Comments
 (0)