Skip to content

Commit 1c324a8

Browse files
authored
Merge pull request #134 from WDGPH/bug/dynamic-client-info-tbl
Fixes #90
2 parents b23540a + 9d128cb commit 1c324a8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

pipeline/generate_notices.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ def build_template_context(
423423
"date_of_birth": client.person["date_of_birth_display"],
424424
"school": client.school["name"],
425425
"date_data_cutoff": date_data_cutoff_formatted,
426+
"over_16": client.person["over_16"]
426427
}
427428

428429
# Check if QR code PNG exists from prior generation step

templates/conf.typ

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,15 @@
4242

4343
let vline_stroke = if vline { 1pt + black } else { none }
4444

45+
let address_to = if client_data.over_16 {
46+
"To:"
47+
} else {
48+
"To Parent/Guardian of:"
49+
}
50+
4551
// Content for the first column
4652
let col1_content = align(left)[
47-
To Parent/Guardian of: #linebreak()
53+
#address_to #linebreak()
4854
*#client_data.name* #linebreak()
4955
*#client_data.address* #linebreak()
5056
*#client_data.city*, *Ontario* *#client_data.postal_code*
@@ -100,10 +106,15 @@
100106
}
101107

102108
let vline_stroke = if vline { 1pt + black } else { none }
109+
let address_to = if client_data.over_16 {
110+
"Au:"
111+
} else {
112+
"Au parent ou tuteur de:"
113+
}
103114

104115
// Content for the first column
105116
let col1_content = align(left)[
106-
Au parent ou tuteur de: #linebreak()
117+
#address_to #linebreak()
107118
*#client_data.name* #linebreak()
108119
*#client_data.address* #linebreak()
109120
*#client_data.city*, *Ontario* *#client_data.postal_code*

0 commit comments

Comments
 (0)