|
1 | 1 | {% from "tables/macro.jinja" import table %} |
2 | 2 | {% from "components/filters.jinja" import filters %} |
3 | | -{% from "card/macro.jinja" import card %} |
| 3 | +{% from "components/app_dashboard_card.jinja" import app_dashboard_card %} |
4 | 4 |
|
5 | 5 |
|
6 | 6 | {% extends 'layouts/dashboard.jinja' %} |
|
23 | 23 | <div id="dashboard" class="app-grid-column-content"> |
24 | 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 | | - {{ card({ |
28 | | - "classes": "app-card app-card--blue", |
29 | | - "heading": "Cohort", |
30 | | - "headingClasses": "nhsuk-heading-xs", |
31 | | - "headingLevel": 3, |
32 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.cohort | thousands ~ "<span class='nhsuk-card__caption'>children</span></p>", |
33 | | - }) }} |
34 | | - </div> |
35 | | - |
36 | | - <div class="nhsuk-grid-column-one-third nhsuk-card-group__item app-card-group__item"> |
37 | | - {{ card({ |
38 | | - "classes": "app-card app-card--red", |
39 | | - "heading": "No consent", |
40 | | - "headingClasses": "nhsuk-heading-xs", |
41 | | - "headingLevel": 3, |
42 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.no_consent_percentage | percentage ~ "<span class='nhsuk-card__caption'>" ~ data.no_consent | thousands ~ " children</span></p>", |
43 | | - }) }} |
44 | | - </div> |
45 | | - |
46 | | - <div class="nhsuk-grid-column-one-third nhsuk-card-group__item app-card-group__item"> |
47 | | - {{ card({ |
48 | | - "classes": "app-card app-card--green", |
49 | | - "heading": "Consent given", |
50 | | - "headingClasses": "nhsuk-heading-xs", |
51 | | - "headingLevel": 3, |
52 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.consent_given_percentage | percentage ~ "<span class='nhsuk-card__caption'>" ~ data.consent_given | thousands ~ " children</span></p>", |
53 | | - }) }} |
54 | | - </div> |
55 | | - |
56 | | - <div class="nhsuk-grid-column-one-half nhsuk-card-group__item app-card-group__item"> |
57 | | - {{ card({ |
58 | | - "classes": "app-card", |
59 | | - "heading": "Consent requested", |
60 | | - "headingClasses": "nhsuk-heading-xs", |
61 | | - "headingLevel": 3, |
62 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.consent_requested_percentage | percentage ~ "<span class='nhsuk-card__caption'>" ~ data.consent_requested | thousands ~ " children</span></p>", |
63 | | - }) }} |
64 | | - </div> |
65 | | - |
66 | | - <div class="nhsuk-grid-column-one-half nhsuk-card-group__item app-card-group__item"> |
67 | | - {{ card({ |
68 | | - "classes": "app-card", |
69 | | - "heading": "No response", |
70 | | - "headingClasses": "nhsuk-heading-xs", |
71 | | - "headingLevel": 3, |
72 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.consent_no_response_percentage | percentage ~ "<span class='nhsuk-card__caption'>" ~ data.consent_no_response | thousands ~ " children</span></p>", |
73 | | - }) }} |
74 | | - </div> |
75 | | - |
76 | | - <div class="nhsuk-grid-column-one-third nhsuk-card-group__item app-card-group__item"> |
77 | | - {{ card({ |
78 | | - "classes": "app-card", |
79 | | - "heading": "Parent refused", |
80 | | - "headingClasses": "nhsuk-heading-xs", |
81 | | - "headingLevel": 3, |
82 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.parent_refused_consent_percentage | percentage ~ "<span class='nhsuk-card__caption'>" ~ data.parent_refused_consent | thousands ~ " children</span></p>", |
83 | | - }) }} |
84 | | - </div> |
85 | | - |
86 | | - <div class="nhsuk-grid-column-one-third nhsuk-card-group__item app-card-group__item"> |
87 | | - {{ card({ |
88 | | - "classes": "app-card", |
89 | | - "heading": "Child refused", |
90 | | - "headingClasses": "nhsuk-heading-xs", |
91 | | - "headingLevel": 3, |
92 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.child_refused_vaccination_percentage | percentage ~ "<span class='nhsuk-card__caption'>" ~ data.child_refused_vaccination | thousands ~ " children</span></p>", |
93 | | - }) }} |
94 | | - </div> |
95 | | - |
96 | | - <div class="nhsuk-grid-column-one-third nhsuk-card-group__item app-card-group__item"> |
97 | | - {{ card({ |
98 | | - "classes": "app-card", |
99 | | - "heading": "Conflicting consent", |
100 | | - "headingClasses": "nhsuk-heading-xs", |
101 | | - "headingLevel": 3, |
102 | | - "descriptionHtml": "<p class='nhsuk-card__description'>" ~ data.consent_conflicts_percentage | percentage ~ "<span class='nhsuk-card__caption'>" ~ data.consent_conflicts | thousands ~ " children</span></p>", |
103 | | - }) }} |
104 | | - </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": "No consent", |
| 38 | + "description": data.no_consent_percentage | percentage, |
| 39 | + "caption": data.no_consent | format_child_count, |
| 40 | + }) }} |
| 41 | + |
| 42 | + {{ app_dashboard_card({ |
| 43 | + "classes": "nhsuk-grid-column-one-third", |
| 44 | + "card_classes": "app-card--green", |
| 45 | + "heading": "Consent given", |
| 46 | + "description": data.consent_given_percentage | percentage, |
| 47 | + "caption": data.consent_given | format_child_count, |
| 48 | + }) }} |
| 49 | + |
| 50 | + {{ app_dashboard_card({ |
| 51 | + "classes": "nhsuk-grid-column-one-half", |
| 52 | + "heading": "Consent requested", |
| 53 | + "description": data.consent_requested_percentage | percentage, |
| 54 | + "caption": data.consent_requested | format_child_count, |
| 55 | + }) }} |
| 56 | + |
| 57 | + {{ app_dashboard_card({ |
| 58 | + "classes": "nhsuk-grid-column-one-half", |
| 59 | + "heading": "No response", |
| 60 | + "description": data.consent_no_response_percentage | percentage, |
| 61 | + "caption": data.consent_no_response | format_child_count, |
| 62 | + }) }} |
| 63 | + |
| 64 | + {{ app_dashboard_card({ |
| 65 | + "classes": "nhsuk-grid-column-one-third", |
| 66 | + "heading": "Parent refused", |
| 67 | + "description": data.parent_refused_consent_percentage | percentage, |
| 68 | + "caption": data.parent_refused_consent | format_child_count, |
| 69 | + }) }} |
| 70 | + |
| 71 | + {{ app_dashboard_card({ |
| 72 | + "classes": "nhsuk-grid-column-one-third", |
| 73 | + "heading": "Child refused", |
| 74 | + "description": data.child_refused_vaccination_percentage | percentage, |
| 75 | + "caption": data.child_refused_vaccination | format_child_count, |
| 76 | + }) }} |
| 77 | + |
| 78 | + {{ app_dashboard_card({ |
| 79 | + "classes": "nhsuk-grid-column-one-third", |
| 80 | + "heading": "Conflicting consent", |
| 81 | + "description": data.consent_conflicts_percentage | percentage, |
| 82 | + "caption": data.consent_conflicts | format_child_count, |
| 83 | + }) }} |
105 | 84 | </div> |
106 | 85 |
|
107 | 86 | {% set refusal_rows = [] %} |
|
0 commit comments