Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Release/2.47.1 #4197

Merged
merged 17 commits into from
Apr 21, 2022
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ecbe053
Build Docker on release branches (#4174)
VWSCoronaDashboard24 Apr 12, 2022
20d70ec
feat: changed the way screenreaders read the content of tooltips in c…
hasan-ozaynaci Apr 13, 2022
02cbe2c
Feature/docker build improvements (#4166)
VWSCoronaDashboard24 Apr 13, 2022
48d15ed
Added selected graph date to metadata (#4181)
Jorrik-Klijnsma-Work Apr 13, 2022
fe95e39
Revert "Feature/docker build improvements (#4166)" (#4182)
VWSCoronaDashboard24 Apr 14, 2022
e0ad1e7
Removed third shots and its links (#4183)
hasan-ozaynaci Apr 14, 2022
d219c46
Remove vaccine_delivery & vaccine_administered_estimate from schema (…
VWSCoronaDashboard24 Apr 14, 2022
07e1959
feat: delete third shots schemas and its relations (#4184)
hasan-ozaynaci Apr 14, 2022
55183ca
Feature/incomplete zeewolde data (#4185)
Jorrik-Klijnsma-Work Apr 15, 2022
d3c4aa3
Semantic adjustments (#4186)
hasan-ozaynaci Apr 15, 2022
be85f7a
Feature/docker build improvements (#4187)
VWSCoronaDashboard24 Apr 19, 2022
f27d259
Changes applied to screenreaders (#4189)
hasan-ozaynaci Apr 20, 2022
a289513
Revert "Feature/docker build improvements (#4187)" (#4190)
VWSCoronaDashboard24 Apr 20, 2022
b85610c
feat: added table header text for screenreaders (#4192)
hasan-ozaynaci Apr 20, 2022
6a6759a
feat: improved handling of missing data for behavior_per_age_group (#…
VWSCoronaDashboard24 Apr 21, 2022
3fbd4d3
Fix/behavior per age group table (#4196)
VWSCoronaDashboard24 Apr 21, 2022
c3d06d7
Merge branch 'develop' into release/2.47.1
VWSCoronaDashboard24 Apr 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 43 additions & 38 deletions packages/app/src/domain/behavior/behavior-per-age-group-tile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ export function BehaviorPerAgeGroup({
}: BehaviorPerAgeGroupProps) {
const breakpoints = useBreakpoints();

const complianceValue = data[`${currentId}_compliance` as keyof typeof data];
const supportValue = data[`${currentId}_support` as keyof typeof data];
const complianceValue =
data[`${currentId}_compliance` as keyof typeof data] || undefined;
const supportValue =
data[`${currentId}_support` as keyof typeof data] || undefined;

assert(
typeof complianceValue !== 'number',
Expand All @@ -52,9 +54,11 @@ export function BehaviorPerAgeGroup({
);

const hasComplianceValues =
complianceValue &&
keys(complianceValue).every((key) => complianceValue[key] === null) ===
false;
false;
const hasSupportValues =
supportValue &&
keys(supportValue).every((key) => supportValue[key] === null) === false;
const dataAvailable = hasComplianceValues || hasSupportValues;

Expand Down Expand Up @@ -85,41 +89,42 @@ export function BehaviorPerAgeGroup({
</tr>
</thead>
<tbody>
{AGE_KEYS.map((age, index) => (
<React.Fragment key={index}>
{(isPresent(complianceValue[age]) ||
isPresent(supportValue[age])) && (
<tr>
<Cell>{text.shared.leeftijden.tabel[age]}</Cell>
<Cell>
{isPresent(complianceValue[age]) ? (
<PercentageBar
color={colors.data.cyan}
amount={complianceValue[age]}
/>
) : (
<Text>
{
text.shared.leeftijden.tabel
.compliance_no_data
}
</Text>
)}
{isPresent(supportValue[age]) ? (
<PercentageBar
color={colors.data.yellow}
amount={supportValue[age]}
/>
) : (
<Text>
{text.shared.leeftijden.tabel.support_no_data}
</Text>
)}
</Cell>
</tr>
)}
</React.Fragment>
))}
{AGE_KEYS.map((age, index) => {
const ageValueCompliance = complianceValue?.[age];
const ageValueSupport = supportValue?.[age];

if (!ageValueCompliance && !ageValueSupport) {
return null;
}

return (
<tr key={index}>
<Cell>{text.shared.leeftijden.tabel[age]}</Cell>
<Cell>
{ageValueCompliance ? (
<PercentageBar
color={colors.data.cyan}
amount={ageValueCompliance}
/>
) : (
<Text>
{text.shared.leeftijden.tabel.compliance_no_data}
</Text>
)}
{ageValueSupport ? (
<PercentageBar
color={colors.data.yellow}
amount={ageValueSupport}
/>
) : (
<Text>
{text.shared.leeftijden.tabel.support_no_data}
</Text>
)}
</Cell>
</tr>
);
})}
</tbody>
</StyledTable>
<Box
Expand Down