Skip to content

Commit

Permalink
add setup screen
Browse files Browse the repository at this point in the history
  • Loading branch information
eperedo committed Nov 26, 2024
1 parent fb2c170 commit 6cdf39c
Show file tree
Hide file tree
Showing 31 changed files with 1,071 additions and 164 deletions.
68 changes: 58 additions & 10 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-11-14T05:07:50.716Z\n"
"PO-Revision-Date: 2024-11-14T05:07:50.716Z\n"
"POT-Creation-Date: 2024-11-26T05:08:32.550Z\n"
"PO-Revision-Date: 2024-11-26T05:08:32.550Z\n"

msgid "edit dataset"
msgstr ""
Expand Down Expand Up @@ -38,6 +38,15 @@ msgstr ""
msgid "Project name is required"
msgstr ""

msgid "Cannot be blank: {{fieldName}}"
msgstr ""

msgid "{{fieldName}} must be a positive number"
msgstr ""

msgid "At least one org. unit is required"
msgstr ""

msgid "Add"
msgstr ""

Expand Down Expand Up @@ -173,6 +182,15 @@ msgstr ""
msgid "No Selected"
msgstr ""

msgid "Show closed projects"
msgstr ""

msgid "Filter projects"
msgstr ""

msgid "<No value>"
msgstr ""

msgid "Select Project"
msgstr ""

Expand All @@ -182,21 +200,54 @@ msgstr ""
msgid "DataSet description"
msgstr ""

msgid "Start Date"
msgid "Expiry Days"
msgstr ""

msgid ""
"How many days after the period before the dataSet is locked for changing "
"data. Example: 5 means: after February 5th it's not possible to make "
"changes to January anymore. 0 is no lock"
msgstr ""

msgid "End Date"
msgid "Open future periods for data entry"
msgstr ""

msgid "Select org units"
msgstr ""

msgid "There is already a dataset with this name"
msgstr ""

msgid "Validating..."
msgstr ""

msgid "Please select the regions you want to share this dataSet with"
msgstr ""

msgid "Saving..."
msgstr ""

msgid "Data set saved successfully"
msgstr ""

msgid "The dataSet is finished. Press the button Save to save the data"
msgstr ""

msgid "Save"
msgstr ""

msgid "and {{number}} more."
msgstr ""

msgid "Description"
msgstr ""

msgid "Linked Project"
msgstr ""

msgid "Organisation Units"
msgstr ""

msgid "Setup"
msgstr ""

Expand All @@ -215,12 +266,6 @@ msgstr ""
msgid "Merge"
msgstr ""

msgid "Organisation Units"
msgstr ""

msgid "Save"
msgstr ""

msgid "Bulk update strategy: {{actionLabel}}"
msgstr ""

Expand Down Expand Up @@ -265,3 +310,6 @@ msgstr ""

msgid "Removing DataSets"
msgstr ""

msgid "Loading..."
msgstr ""
69 changes: 57 additions & 12 deletions 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-11-14T05:07:50.716Z\n"
"POT-Creation-Date: 2024-11-26T05:08:32.550Z\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 @@ -38,6 +38,15 @@ msgstr ""
msgid "Project name is required"
msgstr ""

msgid "Cannot be blank: {{fieldName}}"
msgstr ""

msgid "{{fieldName}} must be a positive number"
msgstr ""

msgid "At least one org. unit is required"
msgstr ""

msgid "Add"
msgstr "Añadir"

Expand Down Expand Up @@ -173,6 +182,15 @@ msgstr ""
msgid "No Selected"
msgstr ""

msgid "Show closed projects"
msgstr ""

msgid "Filter projects"
msgstr ""

msgid "<No value>"
msgstr ""

msgid "Select Project"
msgstr ""

Expand All @@ -183,21 +201,55 @@ msgstr ""
msgid "DataSet description"
msgstr "Sección"

msgid "Start Date"
msgid "Expiry Days"
msgstr ""

msgid ""
"How many days after the period before the dataSet is locked for changing "
"data. Example: 5 means: after February 5th it's not possible to make changes "
"to January anymore. 0 is no lock"
msgstr ""

msgid "End Date"
msgid "Open future periods for data entry"
msgstr ""

msgid "Select org units"
msgstr ""

msgid "There is already a dataset with this name"
msgstr ""

msgid "Validating..."
msgstr ""

msgid "Please select the regions you want to share this dataSet with"
msgstr ""

msgid "Saving..."
msgstr ""

msgid "Data set saved successfully"
msgstr ""

msgid "The dataSet is finished. Press the button Save to save the data"
msgstr ""

msgid "Save"
msgstr ""

msgid "and {{number}} more."
msgstr ""

#, fuzzy
msgid "Description"
msgstr "Sección"

msgid "Linked Project"
msgstr ""

msgid "Organisation Units"
msgstr ""

msgid "Setup"
msgstr ""

Expand All @@ -216,12 +268,6 @@ msgstr ""
msgid "Merge"
msgstr ""

msgid "Organisation Units"
msgstr ""

msgid "Save"
msgstr ""

msgid "Bulk update strategy: {{actionLabel}}"
msgstr ""

Expand Down Expand Up @@ -267,9 +313,8 @@ msgstr ""
msgid "Removing DataSets"
msgstr ""

#, fuzzy
#~ msgid "Description"
#~ msgstr "Sección"
msgid "Loading..."
msgstr ""

#~ msgid "Hello {{name}}"
#~ msgstr "Hola {{name}}"
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "5.2.0",
"react-window": "1.8.10",
"real-cancellable-promise": "^1.1.2",
"styled-components": "6.1.11",
"styled-jsx": "^5.1.6",
Expand All @@ -58,6 +59,7 @@
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/react-router-dom": "5.3.3",
"@types/react-window": "1.8.8",
"@types/styled-components": "5.1.24",
"@vitejs/plugin-react": "^3.1.0",
"@vitest/coverage-v8": "^0.32.4",
Expand Down
18 changes: 17 additions & 1 deletion src/CompositionRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@ import { DataSetD2Repository } from "$/data/repositories/DataSetD2Repository";
import { DataSetTestRepository } from "$/data/repositories/DataSetTestRepository";
import { LogD2Repository } from "$/data/repositories/LogD2Repository";
import { LogTestRepository } from "$/data/repositories/LogTestRepository";
import { OrgUnitD2Repository } from "$/data/repositories/OrgUnitD2Repository";
import { OrgUnitTestRepository } from "$/data/repositories/OrgUnitTestRepository";
import { ProjectD2Repository } from "$/data/repositories/ProjectD2Repository";
import { ProjectTestRepository } from "$/data/repositories/ProjectTestRepository";
import { SharingD2Repository } from "$/data/repositories/SharingD2Repository";
import { SharingRepository } from "$/data/repositories/SharingRepository";
import { SharingTestRepository } from "$/data/repositories/SharingTestRepository";
import { DataSetRepository } from "$/domain/repositories/DataSetRepository";
import { LogRepository } from "$/domain/repositories/LogRepository";
import { OrgUnitRepository } from "$/domain/repositories/OrgUnitRepository";
import { ProjectRepository } from "$/domain/repositories/ProjectRepository";
import { GetAllProjectsUseCase } from "$/domain/usecases/GetAllProjectsUseCase";
import { GetDataSetsByIdsUseCase } from "$/domain/usecases/GetDataSetsByIdsUseCase";
import { GetDataSetsUseCase } from "$/domain/usecases/GetDataSetsUseCase";
import { GetLogsUseCase } from "$/domain/usecases/GetLogsUseCase";
import { GetOrgUnitsByIdsUseCase } from "$/domain/usecases/GetOrgUnitsByIdsUseCase";
import { GetProjectsUseCase } from "$/domain/usecases/GetProjectsUseCase";
import { MigrateDataSetProjectsUseCase } from "$/domain/usecases/MigrateDataSetProjectsUseCase";
import { RemoveDataSetsUseCase } from "$/domain/usecases/RemoveDataSetsUseCase";
import { SaveDataSetUseCase } from "$/domain/usecases/SaveDataSetUseCase";
import { SaveOrgUnitDataSetUseCase } from "$/domain/usecases/SaveOrgUnitDataSetUseCase";
import { SaveSharingDataSetsUseCase } from "$/domain/usecases/SaveSharingDataSetsUseCase";
import { SearchSharingUseCase } from "$/domain/usecases/SearchSharingUseCase";
import { ValidateNameUseCase } from "$/domain/usecases/ValidateNameUseCase";
import { UserD2Repository } from "./data/repositories/UserD2Repository";
import { UserTestRepository } from "./data/repositories/UserTestRepository";
import { UserRepository } from "./domain/repositories/UserRepository";
Expand All @@ -33,6 +40,7 @@ type Repositories = {
dataSetsRepository: DataSetRepository;
logRepository: LogRepository;
projectRepository: ProjectRepository;
orgUnitRepository: OrgUnitRepository;
};

function getCompositionRoot(repositories: Repositories) {
Expand All @@ -41,12 +49,14 @@ function getCompositionRoot(repositories: Repositories) {
getByIds: new GetDataSetsByIdsUseCase(repositories.dataSetsRepository),
getAll: new GetDataSetsUseCase(repositories.dataSetsRepository),
remove: new RemoveDataSetsUseCase(repositories.dataSetsRepository),
save: new SaveSharingDataSetsUseCase(repositories.dataSetsRepository),
saveSharing: new SaveSharingDataSetsUseCase(repositories.dataSetsRepository),
saveOrgUnits: new SaveOrgUnitDataSetUseCase(repositories.dataSetsRepository),
migrateProjects: new MigrateDataSetProjectsUseCase(
repositories.dataSetsRepository,
repositories.projectRepository
),
validateName: new ValidateNameUseCase(repositories.dataSetsRepository),
save: new SaveDataSetUseCase(repositories.dataSetsRepository),
},
logs: {
getByDataSets: new GetLogsUseCase(
Expand All @@ -56,11 +66,15 @@ function getCompositionRoot(repositories: Repositories) {
},
projects: {
get: new GetProjectsUseCase(repositories.projectRepository),
getAll: new GetAllProjectsUseCase(repositories.projectRepository),
},
sharing: {
search: new SearchSharingUseCase(repositories.sharingRepository),
},
users: { getCurrent: new GetCurrentUserUseCase(repositories.usersRepository) },
orgUnits: {
getByIds: new GetOrgUnitsByIdsUseCase(repositories.orgUnitRepository),
},
};
}

Expand All @@ -71,6 +85,7 @@ export function getWebappCompositionRoot(api: D2Api) {
sharingRepository: new SharingD2Repository(api),
logRepository: new LogD2Repository(api),
projectRepository: new ProjectD2Repository(api),
orgUnitRepository: new OrgUnitD2Repository(api),
};

return getCompositionRoot(repositories);
Expand All @@ -83,6 +98,7 @@ export function getTestCompositionRoot() {
sharingRepository: new SharingTestRepository(),
logRepository: new LogTestRepository(),
projectRepository: new ProjectTestRepository(),
orgUnitRepository: new OrgUnitTestRepository(),
};

return getCompositionRoot(repositories);
Expand Down
Loading

0 comments on commit 6cdf39c

Please sign in to comment.