Commit a3ed159
authored
Update home page stats (#445)
This updates the layout of the stats shown on the 'Home' tab to make it
more scalable to having more vaccine types, and also to show a breakdown
by site.
🗂️ [Jira card](https://nhsd-jira.digital.nhs.uk/browse/RAVS-2784)
## Before
Previously, a table was shown with a row for each of the past 7 days,
and each vaccine type being given by that organisation in columns (with
a Total at the end):
<img width="2240" height="2978" alt="stats-before"
src="https://github.com/user-attachments/assets/ce11d262-5faa-489a-a83e-88c88d8d1c44"
/>
However, this design doesn’t work so well when there are 7 or more
vaccine types, as the width of the table gets too wide and the table
becomes harder to read.
## After
Instead, the new design splits the data into multiple tables which are
shown as tabs. The first one has a row for each of the past 7 days but
only shows the total. The second has a row for each vaccine type, and
columns for Today, Past 7 days, Month to date and Total. The third one
has a row for each site, and columns for Today, Past 7 days, Month to
date and Total.
The "By vaccination" and "By site" tabs are only shown if there are at
least 2 vaccination types recorded or at least 2 different sites.
### Empty state
<img width="2210" height="2170" alt="empty"
src="https://github.com/user-attachments/assets/b92463e1-9410-4a3b-a080-a5581affc256"
/>
### First tab only (single vaccination type, single tab)
<img width="2210" height="3108" alt="localhost_3000_home (3)"
src="https://github.com/user-attachments/assets/a46b4fff-f9b8-4c5e-990b-c3dcc1420663"
/>
### By vaccination tab
<img width="2210" height="2742" alt="by-vaccination"
src="https://github.com/user-attachments/assets/5ab8a8d4-3944-43b6-afe3-f630f835de54"
/>
### By site tab
<img width="2210" height="2498" alt="by-site"
src="https://github.com/user-attachments/assets/29462d1e-13de-4d4d-8f83-cecc5c08989e"
/>
---
The pull request also refactors this bit of the prototype quite a bit,
and adds a new option to the 'Prototype data setup' section to record
some dummy vaccinations.1 parent d366b34 commit a3ed159
File tree
16 files changed
+519
-480
lines changed- app
- data
- routes
- views
- home
- prototype-setup
- record-vaccinations
16 files changed
+519
-480
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 18 | + | |
94 | 19 | | |
95 | 20 | | |
96 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
46 | 76 | | |
47 | 77 | | |
48 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
66 | 117 | | |
0 commit comments