bcgov / workbc-wage-subsidy

WorkBC intake form for Wage Subsidy.
Apache License 2.0
1 stars 1 forks source link

TECH-488: bug fix: display correct Submitted count in employer status sidebar #103

Closed strdavis closed 11 months ago

strdavis commented 11 months ago

In the employer client status sidebar, the number of 'Submitted' claims was sometimes incorrect.

This was because in the employer client, multiple internal statuses ('New', 'In Progress', and 'Completed') correspond to the 'Submitted' label in the sidebar. The previous code didn't handle this correctly.

This pull request addresses this issue by using two mappings to manage the status sidebar state:

{ status: label } { label: count }

Then we can obtain counts both by label and internal status value as required, ie:

counts[labels[status]]

or

counts[label]

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication