Skip to content

Commit

Permalink
Merge fix/incident-management-team-fixes branch and solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
anagperal committed Nov 7, 2024
2 parents c5c4c46 + adc486e commit 174cd95
Show file tree
Hide file tree
Showing 115 changed files with 5,300 additions and 3,630 deletions.
44 changes: 40 additions & 4 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-10-09T10:56:24.909Z\n"
"PO-Revision-Date: 2024-10-09T10:56:24.909Z\n"
"POT-Creation-Date: 2024-11-07T10:23:53.316Z\n"
"PO-Revision-Date: 2024-11-07T10:23:53.316Z\n"

msgid "Low"
msgstr ""
Expand Down Expand Up @@ -84,9 +84,18 @@ msgstr ""
msgid "Cancel"
msgstr ""

msgid "Edit Action Plan"
msgstr ""

msgid "Event completed"
msgstr ""

msgid "Edit Details"
msgstr ""

msgid "Complete Event"
msgstr ""

msgid "Notes"
msgstr ""

Expand All @@ -96,6 +105,9 @@ msgstr ""
msgid "Currently assigned:"
msgstr ""

msgid "Error loading current Incident Management Team"
msgstr ""

msgid "Create Event"
msgstr ""

Expand Down Expand Up @@ -186,13 +198,31 @@ msgstr ""
msgid "Risk Assessment Questionnaire saved successfully"
msgstr ""

msgid "Incident Action Plan saved successfully"
msgstr ""

msgid "Incident Response Actions saved successfully"
msgstr ""

msgid "Incident Management Team Member saved successfully"
msgstr ""

msgid "Create an incident action plan"
msgstr ""

msgid "No plan has been created for this incident"
msgstr ""

msgid "Create IAP"
msgstr ""

msgid "Incident Action Plan"
msgstr ""

msgid "Cholera in NW Province, June 2023"
msgid "Team"
msgstr ""

msgid "Edit Team"
msgstr ""

msgid "Incident Management Team Builder"
Expand All @@ -204,10 +234,16 @@ msgstr ""
msgid "Assign Role"
msgstr ""

msgid "Delete Roles"
msgstr ""

msgid "Delete Role"
msgstr ""

msgid "Delete team role"
msgid "Confirm deletion"
msgstr ""

msgid "Delete"
msgstr ""

msgid "Resources"
Expand Down
23 changes: 22 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-10-09T10:56:24.909Z\n"
"POT-Creation-Date: 2024-10-15T13:56:24.806Z\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 @@ -83,6 +83,9 @@ msgstr ""
msgid "Cancel"
msgstr ""

msgid "Edit Action Plan"
msgstr ""

msgid "Edit Details"
msgstr ""

Expand Down Expand Up @@ -185,12 +188,30 @@ msgstr ""
msgid "Risk Assessment Questionnaire saved successfully"
msgstr ""

msgid "Incident Action Plan saved successfully"
msgstr ""

msgid "Incident Response Actions saved successfully"
msgstr ""

msgid "Create an incident action plan"
msgstr ""

msgid "No plan has been created for this incident"
msgstr ""

msgid "Create IAP"
msgstr ""

msgid "Incident Management Team Member saved successfully"
msgstr ""

msgid "Incident Action Plan"
msgstr ""

msgid "Incident Management Team Builder"
msgstr ""

msgid "Cholera in NW Province, June 2023"
msgstr ""

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "zebra",
"name": "zebra-perf-test",
"description": "Zambia Emergency Bridge for Response Application",
"version": "0.0.1",
"license": "GPL-3.0",
Expand Down Expand Up @@ -32,6 +32,7 @@
"dotenv": "^16.4.5",
"font-awesome": "4.7.0",
"moment": "^2.30.1",
"moment-timezone": "^0.5.46",
"purify-ts": "1.2.0",
"purify-ts-extra-codec": "0.6.0",
"react": "^18.2.0",
Expand Down Expand Up @@ -116,8 +117,8 @@
"script-map-outbreak-to-alerts": "npx ts-node -r dotenv/config src/scripts/mapDiseaseOutbreakToAlerts.ts"
},
"manifest.webapp": {
"name": "ZEBRA",
"description": "Zambia Emergency Bridge for Response Application",
"name": "ZEBRA-PERFTEST",
"description": "Zambia Emergency Bridge for Response Application-PERFTEST",
"icons": {
"48": "icon.png"
},
Expand Down
48 changes: 34 additions & 14 deletions src/CompositionRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,28 @@ import { UserRepository } from "./domain/repositories/UserRepository";
import { GetCurrentUserUseCase } from "./domain/usecases/GetCurrentUserUseCase";
import { GetDiseaseOutbreakByIdUseCase } from "./domain/usecases/GetDiseaseOutbreakByIdUseCase";
import { D2Api } from "./types/d2-api";
import { OptionsRepository } from "./domain/repositories/OptionsRepository";

import { TeamMemberRepository } from "./domain/repositories/TeamMemberRepository";
import { OrgUnitRepository } from "./domain/repositories/OrgUnitRepository";
import { OptionsD2Repository } from "./data/repositories/OptionsD2Repository";

import { TeamMemberD2Repository } from "./data/repositories/TeamMemberD2Repository";
import { OrgUnitD2Repository } from "./data/repositories/OrgUnitD2Repository";
import { AlertD2Repository } from "./data/repositories/AlertD2Repository";
import { OptionsTestRepository } from "./data/repositories/test/OptionsTestRepository";
import { TeamMemberTestRepository } from "./data/repositories/test/TeamMemberTestRepository";
import { OrgUnitTestRepository } from "./data/repositories/test/OrgUnitTestRepository";
import { GetAllDiseaseOutbreaksUseCase } from "./domain/usecases/GetAllDiseaseOutbreaksUseCase";
import { MapDiseaseOutbreakToAlertsUseCase } from "./domain/usecases/MapDiseaseOutbreakToAlertsUseCase";
import { AlertRepository } from "./domain/repositories/AlertRepository";
import { AlertTestRepository } from "./data/repositories/test/AlertTestRepository";
import { Get717PerformanceUseCase } from "./domain/usecases/Get717PerformanceUseCase";
import { GetEntityWithOptionsUseCase } from "./domain/usecases/GetEntityWithOptionsUseCase";
import { GetConfigurableFormUseCase } from "./domain/usecases/GetConfigurableFormUseCase";
import { SaveEntityUseCase } from "./domain/usecases/SaveEntityUseCase";
import { RiskAssessmentRepository } from "./domain/repositories/RiskAssessmentRepository";
import { RiskAssessmentD2Repository } from "./data/repositories/RiskAssessmentD2Repository";
import { RiskAssessmentTestRepository } from "./data/repositories/test/RiskAssessmentTestRepository";
import { IncidentActionRepository } from "./domain/repositories/IncidentActionRepository";
import { IncidentActionD2Repository } from "./data/repositories/IncidentActionD2Repository";
import { IncidentActionTestRepository } from "./data/repositories/test/IncidentActionTestRepository";
import { MapConfigRepository } from "./domain/repositories/MapConfigRepository";
import { MapConfigD2Repository } from "./data/repositories/MapConfigD2Repository";
import { MapConfigTestRepository } from "./data/repositories/test/MapConfigTestRepository";
Expand All @@ -42,10 +44,12 @@ import { AlertSyncDataStoreTestRepository } from "./data/repositories/test/Alert
import { AlertSyncRepository } from "./domain/repositories/AlertSyncRepository";
import { DataStoreClient } from "./data/DataStoreClient";
import { GetTotalCardCountsUseCase } from "./domain/usecases/GetTotalCardCountsUseCase";
import { GetIncidentActionByIdUseCase } from "./domain/usecases/GetIncidentActionByIdUseCase";
import { UpdateIncidentResponseActionUseCase } from "./domain/usecases/UpdateIncidentResponseActionUseCase";
import { RoleRepository } from "./domain/repositories/RoleRepository";
import { RoleD2Repository } from "./data/repositories/RoleD2Repository";
import { RoleTestRepository } from "./data/repositories/test/RoleTestRepository";
import { DeleteIncidentManagementTeamMemberRoleUseCase } from "./domain/usecases/DeleteIncidentManagementTeamMemberRoleUseCase";
import { DeleteIncidentManagementTeamMemberRolesUseCase } from "./domain/usecases/DeleteIncidentManagementTeamMemberRolesUseCase";
import { ChartConfigRepository } from "./domain/repositories/ChartConfigRepository";
import { GetChartConfigByTypeUseCase } from "./domain/usecases/GetChartConfigByTypeUseCase";
import { ChartConfigTestRepository } from "./data/repositories/test/ChartConfigTestRepository";
Expand All @@ -58,6 +62,11 @@ import { GetOverviewCardsUseCase } from "./domain/usecases/GetOverviewCardsUseCa
import { GetDiseaseOutbreakEventAggregateRootByIdUseCase } from "./domain/usecases/GetDiseaseOutbreakEventAggregateRootByIdUseCase";
import { GetAllRolesUseCase } from "./domain/usecases/GetAllRolesUseCase";
import { GetTeamMembersForIncidentManagementTeamUseCase } from "./domain/usecases/GetTeamMembersForIncidentManagementTeamUseCase";
import { GetConfigurationsUseCase } from "./domain/usecases/GetConfigurationsUseCase";
import { ConfigurationsRepository } from "./domain/repositories/ConfigurationsRepository";
import { ConfigurationsD2Repository } from "./data/repositories/ConfigurationsD2Repository";
import { ConfigurationsTestRepository } from "./data/repositories/test/ConfigurationsTestRepository";
import { CompleteEventTrackerUseCase } from "./domain/usecases/CompleteEventTrackerUseCase";

export type CompositionRoot = ReturnType<typeof getCompositionRoot>;

Expand All @@ -66,20 +75,21 @@ type Repositories = {
diseaseOutbreakEventRepository: DiseaseOutbreakEventRepository;
alertRepository: AlertRepository;
alertSyncRepository: AlertSyncRepository;
optionsRepository: OptionsRepository;
teamMemberRepository: TeamMemberRepository;
orgUnitRepository: OrgUnitRepository;
riskAssessmentRepository: RiskAssessmentRepository;
incidentActionRepository: IncidentActionRepository;
mapConfigRepository: MapConfigRepository;
performanceOverviewRepository: PerformanceOverviewRepository;
roleRepository: RoleRepository;
chartConfigRepository: ChartConfigRepository;
systemRepository: SystemRepository;
configurationsRepository: ConfigurationsRepository;
};

function getCompositionRoot(repositories: Repositories) {
return {
getWithOptions: new GetEntityWithOptionsUseCase(repositories),
getConfigurableForm: new GetConfigurableFormUseCase(repositories),
save: new SaveEntityUseCase(repositories),
users: {
getCurrent: new GetCurrentUserUseCase(repositories.usersRepository),
Expand All @@ -89,14 +99,22 @@ function getCompositionRoot(repositories: Repositories) {
getAll: new GetAllDiseaseOutbreaksUseCase(repositories.diseaseOutbreakEventRepository),
mapDiseaseOutbreakEventToAlerts: new MapDiseaseOutbreakToAlertsUseCase(
repositories.alertRepository,
repositories.alertSyncRepository,
repositories.optionsRepository
repositories.alertSyncRepository
),
deleteIncidentManagementTeamMemberRole:
new DeleteIncidentManagementTeamMemberRoleUseCase(repositories),
deleteIncidentManagementTeamMemberRoles:
new DeleteIncidentManagementTeamMemberRolesUseCase(repositories),
getAggregateRoot: new GetDiseaseOutbreakEventAggregateRootByIdUseCase(
repositories.diseaseOutbreakEventRepository
),
getConfigurations: new GetConfigurationsUseCase(
repositories.configurationsRepository,
repositories.teamMemberRepository
),
complete: new CompleteEventTrackerUseCase(repositories),
},
incidentActionPlan: {
get: new GetIncidentActionByIdUseCase(repositories),
updateResponseAction: new UpdateIncidentResponseActionUseCase(repositories),
},
performanceOverview: {
getPerformanceOverviewMetrics: new GetAllPerformanceOverviewMetricsUseCase(
Expand Down Expand Up @@ -133,19 +151,20 @@ function getCompositionRoot(repositories: Repositories) {
export function getWebappCompositionRoot(api: D2Api) {
const dataStoreClient = new DataStoreClient(api);
const repositories: Repositories = {
usersRepository: new UserD2Repository(api),
usersRepository: new UserD2Repository(api, dataStoreClient),
diseaseOutbreakEventRepository: new DiseaseOutbreakEventD2Repository(api),
alertRepository: new AlertD2Repository(api),
alertSyncRepository: new AlertSyncDataStoreRepository(api),
optionsRepository: new OptionsD2Repository(api),
teamMemberRepository: new TeamMemberD2Repository(api),
orgUnitRepository: new OrgUnitD2Repository(api),
riskAssessmentRepository: new RiskAssessmentD2Repository(api),
incidentActionRepository: new IncidentActionD2Repository(api),
mapConfigRepository: new MapConfigD2Repository(api),
performanceOverviewRepository: new PerformanceOverviewD2Repository(api, dataStoreClient),
roleRepository: new RoleD2Repository(api),
chartConfigRepository: new ChartConfigD2Repository(dataStoreClient),
systemRepository: new SystemD2Repository(api),
configurationsRepository: new ConfigurationsD2Repository(api),
};

return getCompositionRoot(repositories);
Expand All @@ -157,15 +176,16 @@ export function getTestCompositionRoot() {
diseaseOutbreakEventRepository: new DiseaseOutbreakEventTestRepository(),
alertRepository: new AlertTestRepository(),
alertSyncRepository: new AlertSyncDataStoreTestRepository(),
optionsRepository: new OptionsTestRepository(),
teamMemberRepository: new TeamMemberTestRepository(),
orgUnitRepository: new OrgUnitTestRepository(),
riskAssessmentRepository: new RiskAssessmentTestRepository(),
incidentActionRepository: new IncidentActionTestRepository(),
mapConfigRepository: new MapConfigTestRepository(),
performanceOverviewRepository: new PerformanceOverviewTestRepository(),
roleRepository: new RoleTestRepository(),
chartConfigRepository: new ChartConfigTestRepository(),
systemRepository: new SystemTestRepository(),
configurationsRepository: new ConfigurationsTestRepository(),
};

return getCompositionRoot(repositories);
Expand Down
Loading

0 comments on commit 174cd95

Please sign in to comment.