Skip to content

Commit

Permalink
fix: show only items with "ALL" incident status
Browse files Browse the repository at this point in the history
  • Loading branch information
deeonwuli committed Dec 11, 2024
1 parent 4adcbff commit d4e5092
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/data/repositories/PerformanceOverviewD2Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, TotalCardCounts>);
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d4e5092

Please sign in to comment.