|
1 | | -{% from "tables/macro.jinja" import table %} |
2 | 1 | {% from "components/filters.jinja" import filters %} |
| 2 | +{% from "components/heading.jinja" import heading %} |
3 | 3 | {% from "card/macro.jinja" import card %} |
4 | | - |
| 4 | +{% from "tables/macro.jinja" import table %} |
| 5 | +{% from "components/app_dashboard_card.jinja" import app_dashboard_card %} |
5 | 6 |
|
6 | 7 | {% extends 'layouts/dashboard.jinja' %} |
7 | 8 |
|
|
21 | 22 | </div> |
22 | 23 |
|
23 | 24 | <div id="dashboard" class="app-grid-column-content"> |
24 | | - |
25 | 25 | <div class="nhsuk-card-group nhsuk-grid-row app-card-group"> |
26 | | - <div class="nhsuk-grid-column-one-third nhsuk-card-group__item app-card-group__item"> |
27 | | - {% set child_or_children = "child" if data.cohort == 1 else "children" %} |
28 | | - {{ card({ |
29 | | - "classes": "app-card app-card--blue", |
30 | | - "heading": "Cohort", |
31 | | - "headingClasses": "nhsuk-heading-xs", |
32 | | - "headingLevel": 3, |
33 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.cohort | thousands ~ "<span class='nhsuk-card__caption'>" ~ child_or_children ~ " </span></p>", |
34 | | - }) }} |
35 | | - </div> |
36 | | - |
37 | | - <div class="nhsuk-grid-column-one-third nhsuk-card-group__item app-card-group__item"> |
38 | | - {{ card({ |
39 | | - "classes": "app-card app-card--red", |
40 | | - "heading": "Not vaccinated", |
41 | | - "headingClasses": "nhsuk-heading-xs", |
42 | | - "headingLevel": 3, |
43 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data["not_vaccinated_percentage"] | percentage ~ "<span class='nhsuk-card__caption'>" ~ data["not_vaccinated"] | format_child_count ~ "</span></p>", |
44 | | - }) }} |
45 | | - </div> |
46 | | - |
47 | | - <div class="nhsuk-grid-column-one-third nhsuk-card-group__item app-card-group__item"> |
48 | | - {{ card({ |
49 | | - "classes": "app-card app-card--green", |
50 | | - "heading": "Vaccinated", |
51 | | - "headingClasses": "nhsuk-heading-xs", |
52 | | - "headingLevel": 3, |
53 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data["vaccinated_percentage"] | percentage ~ "<span class='nhsuk-card__caption'>" ~ data["vaccinated"] | format_child_count ~ "</span></p>", |
54 | | - }) }} |
55 | | - </div> |
56 | | - <div class="nhsuk-grid-column-one-half nhsuk-card-group__item app-card-group__item"> |
57 | | - {{ card({ |
58 | | - "classes": "app-card", |
59 | | - "heading": "Vaccinated by SAIS in " ~ academic_year, |
60 | | - "headingClasses": "nhsuk-heading-xs", |
61 | | - "headingLevel": 3, |
62 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data["vaccinated_by_sais_percentage"] | percentage ~ "<span class='nhsuk-card__caption'>" ~ data["vaccinated_by_sais"] | format_child_count ~ "</span></p>", |
63 | | - }) }} |
64 | | - </div> |
| 26 | + {{ app_dashboard_card({ |
| 27 | + "classes": "nhsuk-grid-column-one-third", |
| 28 | + "card_classes": "app-card--blue", |
| 29 | + "heading": "Cohort", |
| 30 | + "description": data.cohort | thousands, |
| 31 | + "caption": "child" if data.cohort == 1 else "children", |
| 32 | + }) }} |
| 33 | + |
| 34 | + {{ app_dashboard_card({ |
| 35 | + "classes": "nhsuk-grid-column-one-third", |
| 36 | + "card_classes": "app-card--red", |
| 37 | + "heading": "Not vaccinated", |
| 38 | + "description": data["not_vaccinated_percentage"] | percentage, |
| 39 | + "caption": data["not_vaccinated"] | format_child_count, |
| 40 | + }) }} |
| 41 | + |
| 42 | + {{ app_dashboard_card({ |
| 43 | + "classes": "nhsuk-grid-column-one-third", |
| 44 | + "card_classes": "app-card--green", |
| 45 | + "heading": "Vaccinated", |
| 46 | + "description": data["vaccinated_percentage"] | percentage, |
| 47 | + "caption": data["vaccinated"] | format_child_count, |
| 48 | + }) }} |
| 49 | + </div> |
65 | 50 |
|
66 | | - <div class="nhsuk-grid-column-one-half nhsuk-card-group__item app-card-group__item"> |
67 | | - {% set isFlu = current_filters.programme == "flu" %} |
68 | | - {% set percentage = "N/A" if isFlu else data["vaccinated_previously_percentage"] | percentage %} |
69 | | - {% set child_count = "N/A" if isFlu else data["vaccinated_previously"] | format_child_count %} |
70 | | - {{ card({ |
71 | | - "classes": "app-card", |
72 | | - "heading": "Vaccinated in a previous academic year", |
73 | | - "headingClasses": "nhsuk-heading-xs", |
74 | | - "headingLevel": 3, |
75 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ percentage ~ "<span class='nhsuk-card__caption'>" ~ child_count ~ "</span></p>", |
76 | | - }) }} |
77 | | - </div> |
| 51 | + {{ heading({ |
| 52 | + "text": "Vaccinated in the current school year", |
| 53 | + "level": 2, |
| 54 | + "size": "s" |
| 55 | + }) }} |
78 | 56 |
|
79 | | - <div class="nhsuk-grid-column-one-half nhsuk-card-group__item app-card-group__item"> |
80 | | - {{ card({ |
81 | | - "classes": "app-card", |
82 | | - "heading": "Vaccinated elsewhere (self-reported)", |
83 | | - "headingClasses": "nhsuk-heading-xs", |
84 | | - "headingLevel": 3, |
85 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data["vaccinated_elsewhere_declared_percentage"] | percentage ~ "<span class='nhsuk-card__caption'>" ~ data["vaccinated_elsewhere_declared"] | format_child_count ~ "</span></p>", |
86 | | - }) }} |
87 | | - </div> |
| 57 | + <div class="nhsuk-grid-row app-card-group nhsuk-card-group"> |
| 58 | + {{ app_dashboard_card({ |
| 59 | + "classes": "nhsuk-grid-column-one-third", |
| 60 | + "heading": "Vaccinated by " ~ team.name, |
| 61 | + "description": data["vaccinated_by_sais_percentage"] | percentage, |
| 62 | + "caption": data["vaccinated_by_sais"] | format_child_count, |
| 63 | + }) }} |
| 64 | + |
| 65 | + {{ app_dashboard_card({ |
| 66 | + "classes": "nhsuk-grid-column-one-third", |
| 67 | + "heading": "Vaccinated elsewhere (self-reported)", |
| 68 | + "description": data["vaccinated_elsewhere_declared_percentage"] | percentage, |
| 69 | + "caption": data["vaccinated_elsewhere_declared"] | format_child_count, |
| 70 | + }) }} |
| 71 | + |
| 72 | + {{ app_dashboard_card({ |
| 73 | + "classes": "nhsuk-grid-column-one-third", |
| 74 | + "heading": "Vaccinated elsewhere (confirmed)", |
| 75 | + "description": data["vaccinated_elsewhere_recorded_percentage"] | percentage, |
| 76 | + "caption": data["vaccinated_elsewhere_recorded"] | format_child_count, |
| 77 | + }) }} |
| 78 | + </div> |
88 | 79 |
|
89 | | - <div class="nhsuk-grid-column-one-half nhsuk-card-group__item app-card-group__item"> |
90 | | - {{ card({ |
91 | | - "classes": "app-card", |
92 | | - "heading": "Vaccinated elsewhere (recorded)", |
93 | | - "headingClasses": "nhsuk-heading-xs", |
94 | | - "headingLevel": 3, |
95 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data["vaccinated_elsewhere_recorded_percentage"] | percentage ~ "<span class='nhsuk-card__caption'>" ~ data["vaccinated_elsewhere_recorded"] | format_child_count ~ "</span></p>", |
| 80 | + {% if current_filters.programme != "flu" %} |
| 81 | + {{ heading({ |
| 82 | + "text": "Vaccinated before this school year", |
| 83 | + "level": 2, |
| 84 | + "size": "s" |
| 85 | + }) }} |
| 86 | + |
| 87 | + <div class="nhsuk-grid-row app-card-group nhsuk-card-group"> |
| 88 | + {{ app_dashboard_card({ |
| 89 | + "classes": "nhsuk-grid-column-full", |
| 90 | + "heading": "Vaccinated in all settings", |
| 91 | + "description": data["vaccinated_previously_percentage"] | percentage, |
| 92 | + "caption": data["vaccinated_previously"] | format_child_count, |
96 | 93 | }) }} |
97 | 94 | </div> |
98 | | - </div> |
| 95 | + {% endif %} |
99 | 96 |
|
100 | 97 | {% set rows = [] %} |
101 | 98 | {% for row in data.monthly_vaccinations_given %} |
|
110 | 107 | ]) %} |
111 | 108 |
|
112 | 109 | {{ table({ |
113 | | - "heading": "Monthly vaccinations", |
| 110 | + "heading": "Monthly vaccinations by " ~ team.name, |
114 | 111 | "tableClasses": "nhsuk-table--data nhsuk-table--with-total", |
115 | 112 | "panel": true, |
116 | 113 | "head": [ |
|
0 commit comments