diff --git a/src/data/repositories/PerformanceOverviewD2Repository.ts b/src/data/repositories/PerformanceOverviewD2Repository.ts index c0dc874b..a002f144 100644 --- a/src/data/repositories/PerformanceOverviewD2Repository.ts +++ b/src/data/repositories/PerformanceOverviewD2Repository.ts @@ -109,7 +109,7 @@ export class PerformanceOverviewD2Repository implements PerformanceOverviewRepos existingEntry.total += totalCardCount.total; acc[totalCardCount.name] = existingEntry; } else { - acc[totalCardCount.name] = totalCardCount; + acc[totalCardCount.name] = { ...totalCardCount }; } return acc; }, {} as Record); @@ -190,7 +190,7 @@ export class PerformanceOverviewD2Repository implements PerformanceOverviewRepos if (filters && Object.entries(filters).length) { return Object.entries(filters).every(([key, value]) => { if (!value) { - return true; + return item.incidentStatus === "ALL"; } if (key === "incidentStatus") { return value === item.incidentStatus; diff --git a/src/domain/entities/disease-outbreak-event/PerformanceOverviewMetrics.ts b/src/domain/entities/disease-outbreak-event/PerformanceOverviewMetrics.ts index 9a1c3634..59596a6b 100644 --- a/src/domain/entities/disease-outbreak-event/PerformanceOverviewMetrics.ts +++ b/src/domain/entities/disease-outbreak-event/PerformanceOverviewMetrics.ts @@ -53,7 +53,7 @@ export type PerformanceOverviewMetrics = { nationalIncidentStatus: string; }; -export type IncidentStatus = "Watch" | "Alert" | "Respond" | "All"; +export type IncidentStatus = "Watch" | "Alert" | "Respond" | "ALL"; type BaseCounts = { name: DiseaseNames | HazardNames;