Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Performance overview table with indicator linked #15

Merged
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
f7c25e6
fix `$boldUnderline` warning
Aug 27, 2024
4292c23
add SatisticTable in dashboard (WIP fetch data) and ordering
Aug 27, 2024
3d9332d
translations
Aug 27, 2024
c230c8b
plug api to table, new usecase and repository
Aug 28, 2024
e466517
add deaths and cases from api
Aug 28, 2024
aaa40ca
refactor Analytics and constants
Aug 29, 2024
f7809c9
fix dimension
Aug 29, 2024
15f1ea3
fix calculation
Aug 29, 2024
e8a9fa6
remove ERI
Aug 30, 2024
d88a46c
add diseases total cards, usecase, repo
Sep 2, 2024
545f4b9
fix filtering and add link redirection
Sep 3, 2024
bd4556c
add duration calculation
Sep 3, 2024
6e6e5e4
update indicators ids, fix card layout, card size
Sep 4, 2024
4b0e37e
fix overflow table
Sep 5, 2024
5389c60
add respond7d
Sep 5, 2024
996d209
Merge branch 'development' into feature/performace-overview-table-lin…
Sep 5, 2024
95b8baa
remove comment
Sep 9, 2024
94a68d3
Merge branch 'feature/performace-overview-table-link-indicators' of g…
Sep 9, 2024
6b5c02f
update ids
Sep 10, 2024
7a784d6
new filters Disease and Hazard Type
Sep 10, 2024
6aec4f6
add id tu URL on go to event tracker
Sep 10, 2024
8aad62b
new useFilters hook, used in useDiseaseTotal
Sep 10, 2024
ceac112
Add datastore and getProgramIndicatorsFromDatastore common function
anagperal Sep 10, 2024
d434b07
add DateRangeFilter
Sep 12, 2024
c2ad7fb
add DateRangeFilter to dashboard
Sep 12, 2024
4f04421
use diseaseOutbreakEvents list for fetching table data
Sep 12, 2024
080152c
Merge branch 'development' into feature/performace-overview-table-lin…
Sep 12, 2024
9865eb6
fix DateRangePicker input value and style
Sep 12, 2024
7a56c73
Merge branch 'feature/performace-overview-table-link-indicators' of g…
Sep 12, 2024
78d9154
Merge branch 'feature/performace-overview-table-link-indicators' of g…
Sep 12, 2024
e70fc94
remove 717 references
Sep 16, 2024
d268438
add typings
Sep 16, 2024
14253c4
fix `hazardType`
Sep 16, 2024
6b20cc8
update cases indicators
Sep 16, 2024
d31a21c
Merge branch 'development' into feature/performace-overview-table-lin…
Sep 16, 2024
286c845
feat: fetch cases and deaths from datastore
9sneha-n Sep 17, 2024
56548c2
fix: UI footer buttons layout fix
9sneha-n Sep 17, 2024
ee6eb48
fix: use suspected cases
9sneha-n Sep 17, 2024
e1cdfa6
fix duration
Sep 17, 2024
603c8c9
rename fetchActiveVerifiedAnalytics
Sep 18, 2024
d11f330
fix disease total with orgUnit
Sep 23, 2024
a6bac4f
fix typings
Sep 23, 2024
b942223
fix ou filter
Sep 23, 2024
2c9dc4e
fix dataPerformanceOverview useEffect
Sep 23, 2024
7868384
Merge branch 'development' into feature/performace-overview-table-lin…
Sep 23, 2024
7819143
fix any typings
Sep 25, 2024
6dce748
fix any typings
Sep 25, 2024
09b22b1
refactor: some code renaming
9sneha-n Sep 27, 2024
0bd5edb
fix: fetch cases and deaths from datastore
9sneha-n Sep 27, 2024
686088d
refactor: naming refactor
9sneha-n Sep 27, 2024
9a25539
refactor: refactor card counts
9sneha-n Sep 28, 2024
86089fa
fix: max update depth fix
9sneha-n Sep 28, 2024
3aaa590
feat: add incident status to perf overview table
9sneha-n Sep 30, 2024
1a95290
feat: fix duration calculation
9sneha-n Sep 30, 2024
8321e43
fix: filter users by incident manager group
9sneha-n Sep 30, 2024
aecd723
fix: only active enrolments should be listed
9sneha-n Sep 30, 2024
3f2e826
fix: set earliest respond date
9sneha-n Sep 30, 2024
f5b9041
fix: add notes and dates to summary
9sneha-n Sep 30, 2024
dd734a4
fix: some renaming
9sneha-n Sep 30, 2024
7ca95e3
fix: d2-api version update
9sneha-n Sep 30, 2024
99bad44
chore: fixing warn
9sneha-n Sep 30, 2024
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
19 changes: 14 additions & 5 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-09-04T07:57:22.036Z\n"
"PO-Revision-Date: 2024-09-04T07:57:22.036Z\n"
"POT-Creation-Date: 2024-09-16T15:12:17.095Z\n"
"PO-Revision-Date: 2024-09-16T15:12:17.095Z\n"

msgid "Low"
msgstr ""
Expand Down Expand Up @@ -63,6 +63,12 @@ msgstr ""
msgid "Add new option"
msgstr ""

msgid "Reset"
msgstr ""

msgid "Save"
msgstr ""

msgid "There is an error in this field"
msgstr ""

Expand All @@ -72,9 +78,6 @@ msgstr ""
msgid "Cancel"
msgstr ""

msgid "Save"
msgstr ""

msgid "Edit Details"
msgstr ""

Expand Down Expand Up @@ -105,6 +108,12 @@ msgstr ""
msgid "Respond, alert, watch"
msgstr ""

msgid "Duration"
msgstr ""

msgid "7-1-7 performance"
msgstr ""

msgid "Performance overview"
msgstr ""

Expand Down
8 changes: 7 additions & 1 deletion i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2024-09-04T07:57:22.036Z\n"
"POT-Creation-Date: 2024-09-12T14:10:04.460Z\n"
"PO-Revision-Date: 2018-10-25T09:02:35.143Z\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -62,6 +62,12 @@ msgstr ""
msgid "Add new option"
msgstr ""

msgid "Reset"
msgstr ""

msgid "Save"
msgstr ""

msgid "There is an error in this field"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"d2": "31.10.2",
"d2-manifest": "1.0.0",
"font-awesome": "4.7.0",
"moment": "^2.30.1",
"purify-ts": "1.2.0",
"purify-ts-extra-codec": "0.6.0",
"react": "^18.2.0",
Expand Down
12 changes: 12 additions & 0 deletions src/CompositionRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ import { OrgUnitTestRepository } from "./data/repositories/test/OrgUnitTestRepos
import { GetAllDiseaseOutbreaksUseCase } from "./domain/usecases/GetAllDiseaseOutbreaksUseCase";
import { SaveDiseaseOutbreakUseCase } from "./domain/usecases/SaveDiseaseOutbreakUseCase";
import { GetDiseaseOutbreakWithOptionsUseCase } from "./domain/usecases/GetDiseaseOutbreakWithOptionsUseCase";
import { AnalyticsRepository } from "./domain/repositories/AnalyticsRepository";
import { GetAllProgramIndicatorsUseCase } from "./domain/usecases/GetAllProgramIndicatorsUseCase";
import { AnalyticsD2Repository } from "./data/repositories/AnalyticsD2Repository";
import { ProgramIndicatorsTestRepository } from "./data/repositories/test/ProgramIndicatorsTestRepository";
import { GetDiseasesTotalUseCase } from "./domain/usecases/GetDiseasesTotalUseCase";
import { MapDiseaseOutbreakToAlertsUseCase } from "./domain/usecases/MapDiseaseOutbreakToAlertsUseCase";
import { AlertRepository } from "./domain/repositories/AlertRepository";
import { AlertTestRepository } from "./data/repositories/test/AlertTestRepository";
Expand All @@ -33,6 +38,7 @@ type Repositories = {
optionsRepository: OptionsRepository;
teamMemberRepository: TeamMemberRepository;
orgUnitRepository: OrgUnitRepository;
analytics: AnalyticsRepository;
};

function getCompositionRoot(repositories: Repositories) {
Expand All @@ -49,6 +55,10 @@ function getCompositionRoot(repositories: Repositories) {
repositories.alertRepository
),
},
analytics: {
getProgramIndicators: new GetAllProgramIndicatorsUseCase(repositories),
getDiseasesTotal: new GetDiseasesTotalUseCase(repositories),
},
};
}

Expand All @@ -60,6 +70,7 @@ export function getWebappCompositionRoot(api: D2Api) {
optionsRepository: new OptionsD2Repository(api),
teamMemberRepository: new TeamMemberD2Repository(api),
orgUnitRepository: new OrgUnitD2Repository(api),
analytics: new AnalyticsD2Repository(api),
};

return getCompositionRoot(repositories);
Expand All @@ -73,6 +84,7 @@ export function getTestCompositionRoot() {
optionsRepository: new OptionsTestRepository(),
teamMemberRepository: new TeamMemberTestRepository(),
orgUnitRepository: new OrgUnitTestRepository(),
analytics: new ProgramIndicatorsTestRepository(),
};

return getCompositionRoot(repositories);
Expand Down
28 changes: 28 additions & 0 deletions src/data/DataStoreClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { D2Api, DataStore } from "@eyeseetea/d2-api/2.36";
import { apiToFuture, FutureData } from "./api-futures";

export const dataStoreNamespace = "zebra";

export class DataStoreClient {
private dataStore: DataStore;

constructor(private api: D2Api) {
this.dataStore = this.api.dataStore(dataStoreNamespace);
}

public listCollection<T>(key: string): FutureData<T[]> {
return apiToFuture(this.dataStore.get<T[]>(key)).map(data => data ?? []);
}

public getObject<T extends object>(key: string): FutureData<T | undefined> {
return apiToFuture(this.dataStore.get<T>(key));
}

public saveObject<T extends object>(key: string, value: T): FutureData<void> {
return apiToFuture(this.dataStore.save(key, value));
}

public removeObject(key: string): FutureData<boolean> {
return apiToFuture(this.dataStore.delete(key));
}
}
Loading
Loading