Skip to content

Commit

Permalink
chore: merge with performance indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
9sneha-n committed Sep 30, 2024
2 parents 98bfcbd + 99bad44 commit 5cd8e88
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@dhis2/ui": "6.12.0",
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.5",
"@eyeseetea/d2-api": "1.16.0-beta.9",
"@eyeseetea/d2-api": "1.16.0-beta.12",
"@eyeseetea/d2-ui-components": "v2.9.0-beta.2",
"@eyeseetea/feedback-component": "0.0.3",
"@material-ui/core": "4.12.4",
Expand Down
13 changes: 5 additions & 8 deletions src/data/repositories/PerformanceOverviewD2Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
TotalCardCounts,
HazardNames,
PerformanceOverviewMetrics,
DiseaseNames,
} from "../../domain/entities/disease-outbreak-event/PerformanceOverviewMetrics";
import { AlertSynchronizationData } from "../../domain/entities/alert/AlertData";
import { OrgUnit } from "../../domain/entities/OrgUnit";
Expand Down Expand Up @@ -135,7 +136,6 @@ export class PerformanceOverviewD2Repository implements PerformanceOverviewRepos
this.mapRowToBaseIndicator(
row,
indicatorsProgramFuture.headers,
//@ts-ignore
indicatorsProgramFuture.metaData
)
) || [];
Expand Down Expand Up @@ -196,7 +196,6 @@ export class PerformanceOverviewD2Repository implements PerformanceOverviewRepos
private mapRowToBaseIndicator(
row: string[],
headers: { name: string; column: string }[],
//@ts-ignore
metaData: AnalyticsResponse["metaData"]
): Partial<PerformanceOverviewMetrics> {
return headers.reduce((acc, header, index) => {
Expand All @@ -208,14 +207,12 @@ export class PerformanceOverviewD2Repository implements PerformanceOverviewRepos

if (key === "suspectedDisease") {
acc[key] =
//@ts-ignore
Object.values(metaData.items).find(item => item.code === row[index])?.name ||
"";
(Object.values(metaData.items).find(item => item.code === row[index])
?.name as DiseaseNames) || "";
} else if (key === "hazardType") {
acc[key] =
//@ts-ignore
Object.values(metaData.items).find(item => item.code === row[index])?.name ||
"";
(Object.values(metaData.items).find(item => item.code === row[index])
?.name as HazardNames) || "";
} else if (key === "nationalIncidentStatus") {
acc[key] = row[index] as NationalIncidentStatus;
} else {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3419,10 +3419,10 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==

"@eyeseetea/[email protected].9":
version "1.16.0-beta.9"
resolved "https://registry.yarnpkg.com/@eyeseetea/d2-api/-/d2-api-1.16.0-beta.9.tgz#bd318b62d8c94ea4e490c8e9b90461869f748c25"
integrity sha512-ASOcekMZoOOAZ9+Aq4I34qkiHW4sZFWoB5V8V51WAgYTv0ONoS8uLdFpmc1kFXJ5jsWC7IgSnE79rkLLZ9h9mg==
"@eyeseetea/[email protected].12":
version "1.16.0-beta.12"
resolved "https://registry.yarnpkg.com/@eyeseetea/d2-api/-/d2-api-1.16.0-beta.12.tgz#02fd26e7a28f2debf7d890364a077020e4eab7b7"
integrity sha512-5VlaiWPrpuIHlCKGB75H4ndd7W0s203CR7qBSmfcqAMhmKnybPI7tTB97DJxF+VnIxwRvfsZ0g8ATKVlUTz0Vg==
dependencies:
"@babel/runtime" "^7.5.4"
"@dhis2/d2-i18n" "^1.0.5"
Expand Down

0 comments on commit 5cd8e88

Please sign in to comment.