Skip to content

Commit

Permalink
Merge branch 'development' of github.com:EyeSeeTea/data-quality-dev i…
Browse files Browse the repository at this point in the history
…nto feat/custom-table
  • Loading branch information
eperedo committed May 16, 2024
2 parents ac8aff8 + e63b4ef commit 573080d
Show file tree
Hide file tree
Showing 106 changed files with 445 additions and 222 deletions.
8 changes: 6 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@
"testing-library/no-await-sync-query": "error",
"testing-library/prefer-screen-queries": "off",
"testing-library/no-debugging-utils": "off",
"testing-library/no-dom-import": "off"
"testing-library/no-dom-import": "off",
"no-relative-import-paths/no-relative-import-paths": [
"error",
{ "allowSameFolder": true, "rootDir": "src", "prefix": "$" }
]
},
"plugins": ["@typescript-eslint", "react-hooks", "unused-imports"],
"plugins": ["@typescript-eslint", "react-hooks", "no-relative-import-paths", "unused-imports"],
"env": {},
"parserOptions": {
"project": "./tsconfig.json"
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.preferences.importModuleSpecifier": "non-relative"
}
16 changes: 14 additions & 2 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-04-19T12:52:35.588Z\n"
"PO-Revision-Date: 2024-04-19T12:52:35.589Z\n"
"POT-Creation-Date: 2024-05-15T07:48:56.601Z\n"
"PO-Revision-Date: 2024-05-15T07:48:56.602Z\n"

msgid "ID"
msgstr ""
Expand Down Expand Up @@ -89,6 +89,12 @@ msgstr ""
msgid "New Data Quality Report"
msgstr ""

msgid "Add"
msgstr ""

msgid "List"
msgstr ""

msgid "Name"
msgstr ""

Expand Down Expand Up @@ -235,6 +241,12 @@ msgstr ""
msgid "Yes, {{actionButton}}"
msgstr ""

msgid "Hello {{name}}"
msgstr ""

msgid "Detail page"
msgstr ""

msgid "Progress"
msgstr ""

Expand Down
23 changes: 13 additions & 10 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-04-19T12:52:35.588Z\n"
"POT-Creation-Date: 2024-05-15T07:48:56.601Z\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 @@ -89,6 +89,12 @@ msgstr ""
msgid "New Data Quality Report"
msgstr ""

msgid "Add"
msgstr "Añadir"

msgid "List"
msgstr "Listar"

msgid "Name"
msgstr ""

Expand Down Expand Up @@ -235,17 +241,14 @@ msgstr ""
msgid "Yes, {{actionButton}}"
msgstr ""

msgid "Hello {{name}}"
msgstr "Hola {{name}}"

msgid "Detail page"
msgstr ""

msgid "Progress"
msgstr ""

msgid "Last Modification"
msgstr ""

#~ msgid "Add"
#~ msgstr "Añadir"

#~ msgid "List"
#~ msgstr "Listar"

#~ msgid "Hello {{name}}"
#~ msgstr "Hola {{name}}"
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"dependencies": {
"$": "link:./src",
"@dhis2/app-runtime": "2.8.0",
"@dhis2/d2-i18n": "1.1.3",
"@dhis2/d2-i18n-extract": "1.0.8",
"@dhis2/d2-i18n-generate": "1.2.0",
"@dhis2/d2-i18n": "1.1.3",
"@dhis2/ui": "6.12.0",
"@eyeseetea/d2-api": "1.14.0",
"@eyeseetea/d2-logger": "1.0.0",
Expand All @@ -25,15 +25,16 @@
"@material-ui/lab": "4.0.0-alpha.60",
"@material-ui/styles": "4.11.5",
"classnames": "2.5.1",
"d2": "31.10.2",
"d2-manifest": "1.0.0",
"d2": "31.10.2",
"eslint-plugin-no-relative-import-paths": "^1.5.3",
"font-awesome": "4.7.0",
"lodash": "4.17.21",
"purify-ts": "2.0.3",
"purify-ts-extra-codec": "0.6.0",
"react": "^18.2.0",
"purify-ts": "2.0.3",
"react-dom": "^18.2.0",
"react-router-dom": "5.2.0",
"react": "^18.2.0",
"real-cancellable-promise": "^1.1.2",
"styled-components": "5.3.5",
"styled-jsx": "3.4.5",
Expand Down
4 changes: 2 additions & 2 deletions src/data/api-futures.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Future } from "../domain/entities/generic/Future";
import { CancelableResponse } from "../types/d2-api";
import { Future } from "$/domain/entities/generic/Future";
import { CancelableResponse } from "$/types/d2-api";

export type FutureData<D> = Future<Error, D>;

Expand Down
10 changes: 5 additions & 5 deletions src/data/common/D2CategoryOption.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { D2Api } from "../../types/d2-api";
import { FutureData, apiToFuture } from "../api-futures";
import { Id } from "../../domain/entities/Ref";
import _ from "../../domain/entities/generic/Collection";
import { CategoryOption } from "../../domain/entities/CategoryOption";
import { D2Api } from "$/types/d2-api";
import { FutureData, apiToFuture } from "$/data/api-futures";
import { Id } from "$/domain/entities/Ref";
import _ from "$/domain/entities/generic/Collection";
import { CategoryOption } from "$/domain/entities/CategoryOption";
import { Maybe } from "$/utils/ts-utils";

export class D2CategoryOption {
Expand Down
2 changes: 1 addition & 1 deletion src/data/common/D2Country.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { D2Api } from "$/types/d2-api";
import { FutureData, apiToFuture } from "../api-futures";
import { FutureData, apiToFuture } from "$/data/api-futures";
import { Id } from "$/domain/entities/Ref";
import _ from "$/domain/entities/generic/Collection";
import { Country } from "$/domain/entities/Country";
Expand Down
10 changes: 5 additions & 5 deletions src/data/common/D2DataElement.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { D2Api } from "../../types/d2-api";
import { FutureData, apiToFuture } from "../api-futures";
import { Id } from "../../domain/entities/Ref";
import _ from "../../domain/entities/generic/Collection";
import { DataElement } from "../../domain/entities/DataElement";
import { D2Api } from "$/types/d2-api";
import { FutureData, apiToFuture } from "$/data/api-futures";
import { Id } from "$/domain/entities/Ref";
import _ from "$/domain/entities/generic/Collection";
import { DataElement } from "$/domain/entities/DataElement";

export class D2DataElement {
constructor(private api: D2Api) {}
Expand Down
2 changes: 1 addition & 1 deletion src/data/common/D2User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { UserGroup } from "$/domain/entities/UserGroup";
import { Future } from "$/domain/entities/generic/Future";
import { User } from "$/domain/entities/User";
import { D2Api, MetadataPick } from "$/types/d2-api";
import { apiToFuture, FutureData } from "../api-futures";
import { apiToFuture, FutureData } from "$/data/api-futures";
import _ from "$/domain/entities/generic/Collection";

export class D2User {
Expand Down
2 changes: 1 addition & 1 deletion src/data/common/SpreadSheet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as XLSX from "xlsx";
import { FutureData } from "../api-futures";
import { FutureData } from "$/data/api-futures";
import { Future } from "$/domain/entities/generic/Future";

export interface Workbook {
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/AnalysisSectionD2Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { MetadataItem } from "$/domain/entities/MetadataItem";
import { QualityAnalysisSection } from "$/domain/entities/QualityAnalysisSection";
import { Future } from "$/domain/entities/generic/Future";
import { AnalysisSectionRepository } from "$/domain/repositories/AnalysisSectionRepository";
import { FutureData } from "../api-futures";
import { FutureData } from "$/data/api-futures";

export class AnalysisSectionD2Repository implements AnalysisSectionRepository {
constructor(private metadata: MetadataItem) {}
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/AnalysisSectionTestRepository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { QualityAnalysisSection } from "$/domain/entities/QualityAnalysisSection";
import { Future } from "$/domain/entities/generic/Future";
import { AnalysisSectionRepository } from "$/domain/repositories/AnalysisSectionRepository";
import { FutureData } from "../api-futures";
import { FutureData } from "$/data/api-futures";

export class AnalysisSectionTestRepository implements AnalysisSectionRepository {
get(): FutureData<QualityAnalysisSection[]> {
Expand Down
14 changes: 7 additions & 7 deletions src/data/repositories/CountryD2Repository.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { D2Api } from "../../types/d2-api";
import { FutureData } from "../api-futures";
import { Id } from "../../domain/entities/Ref";
import _ from "../../domain/entities/generic/Collection";
import { Country } from "../../domain/entities/Country";
import { CountryOptions, CountryRepository } from "../../domain/repositories/CountryRepository";
import { D2OrgUnit } from "../common/D2Country";
import { D2Api } from "$/types/d2-api";
import { FutureData } from "$/data/api-futures";
import { Id } from "$/domain/entities/Ref";
import _ from "$/domain/entities/generic/Collection";
import { Country } from "$/domain/entities/Country";
import { CountryOptions, CountryRepository } from "$/domain/repositories/CountryRepository";
import { D2OrgUnit } from "$/data/common/D2Country";

export class CountryD2Repository implements CountryRepository {
d2Country: D2OrgUnit;
Expand Down
8 changes: 4 additions & 4 deletions src/data/repositories/CountryTestRepository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FutureData } from "../api-futures";
import _ from "../../domain/entities/generic/Collection";
import { Country } from "../../domain/entities/Country";
import { CountryRepository } from "../../domain/repositories/CountryRepository";
import { FutureData } from "$/data/api-futures";
import _ from "$/domain/entities/generic/Collection";
import { Country } from "$/domain/entities/Country";
import { CountryRepository } from "$/domain/repositories/CountryRepository";
import { Future } from "$/domain/entities/generic/Future";

export class CountryTestRepository implements CountryRepository {
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/DataValueD2Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
DataValueRepository,
GetDataValueOptions,
} from "$/domain/repositories/DataValueRepository";
import { FutureData, apiToFuture } from "../api-futures";
import { FutureData, apiToFuture } from "$/data/api-futures";
import { DataValueSetsDataValue } from "@eyeseetea/d2-api/api";

export class DataValueD2Repository implements DataValueRepository {
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/DataValueTestRepository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DataValue } from "$/domain/entities/DataValue";
import { DataValueRepository } from "$/domain/repositories/DataValueRepository";
import { FutureData } from "../api-futures";
import { FutureData } from "$/data/api-futures";
import { Future } from "$/domain/entities/generic/Future";

export class DataValueTestRepository implements DataValueRepository {
Expand Down
6 changes: 3 additions & 3 deletions src/data/repositories/IssueD2Repository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { D2Api, D2TrackerEvent, DataValue } from "$/types/d2-api";
import { QualityAnalysisIssue } from "$/domain/entities/QualityAnalysisIssue";
import { GetIssuesOptions, IssueRepository } from "$/domain/repositories/IssueRepository";
import { FutureData, apiToFuture } from "../api-futures";
import { FutureData, apiToFuture } from "$/data/api-futures";
import { RowsPaginated } from "$/domain/entities/Pagination";
import { Future } from "$/domain/entities/generic/Future";
import { logger } from "$/utils/logger";
Expand All @@ -20,8 +20,8 @@ import { HashMap } from "$/domain/entities/generic/HashMap";
import { Maybe } from "$/utils/ts-utils";
import { IssueAction } from "$/domain/entities/IssueAction";
import { IssueStatus } from "$/domain/entities/IssueStatus";
import { getDefaultModules } from "../common/D2Module";
import { getProgramStageIndexById } from "../common/utils";
import { getDefaultModules } from "$/data/common/D2Module";
import { getProgramStageIndexById } from "$/data/common/utils";

export class IssueD2Repository implements IssueRepository {
d2DataElement: D2DataElement;
Expand Down
4 changes: 2 additions & 2 deletions src/data/repositories/IssueSpreadSheetRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
QualityAnalysisIssueAttrs,
} from "$/domain/entities/QualityAnalysisIssue";
import { IssueExportRepository } from "$/domain/repositories/IssueExportRepository";
import { FutureData } from "../api-futures";
import { Workbook, WorkbookSheet, exportToSpreadsheet } from "../common/SpreadSheet";
import { FutureData } from "$/data/api-futures";
import { Workbook, WorkbookSheet, exportToSpreadsheet } from "$/data/common/SpreadSheet";
import i18n from "$/utils/i18n";
import { MetadataItem } from "$/domain/entities/MetadataItem";

Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/IssueSpreadSheetTestRepository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from "lodash";

import { IssueExportRepository } from "$/domain/repositories/IssueExportRepository";
import { FutureData } from "../api-futures";
import { FutureData } from "$/data/api-futures";
import { Future } from "$/domain/entities/generic/Future";

export class IssueSpreadSheetTestRepository implements IssueExportRepository {
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/IssueTestRepository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RowsPaginated } from "$/domain/entities/Pagination";
import { QualityAnalysisIssue } from "$/domain/entities/QualityAnalysisIssue";
import { IssueRepository } from "$/domain/repositories/IssueRepository";
import { FutureData } from "../api-futures";
import { FutureData } from "$/data/api-futures";

export class IssueTestRepository implements IssueRepository {
getById(): FutureData<QualityAnalysisIssue> {
Expand Down
12 changes: 6 additions & 6 deletions src/data/repositories/MetadataD2Repository.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import _ from "lodash";

import { D2Api, MetadataPick } from "../../types/d2-api";
import { FutureData, apiToFuture } from "../api-futures";
import { MetadataRepository } from "../../domain/repositories/MetadataRepository";
import { MetadataItem } from "../../domain/entities/MetadataItem";
import rec from "../../domain/entities/generic/Rec";
import { Future } from "../../domain/entities/generic/Future";
import { D2Api, MetadataPick } from "$/types/d2-api";
import { FutureData, apiToFuture } from "$/data/api-futures";
import { MetadataRepository } from "$/domain/repositories/MetadataRepository";
import { MetadataItem } from "$/domain/entities/MetadataItem";
import rec from "$/domain/entities/generic/Rec";
import { Future } from "$/domain/entities/generic/Future";

const metadataCodes = {
organisationUnits: { global: "WHO-HQ" },
Expand Down
6 changes: 3 additions & 3 deletions src/data/repositories/MetadataTestRepository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FutureData } from "../api-futures";
import { MetadataRepository } from "../../domain/repositories/MetadataRepository";
import { MetadataItem } from "../../domain/entities/MetadataItem";
import { FutureData } from "$/data/api-futures";
import { MetadataRepository } from "$/domain/repositories/MetadataRepository";
import { MetadataItem } from "$/domain/entities/MetadataItem";

export class MetadataTestRepository implements MetadataRepository {
get(): FutureData<MetadataItem> {
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/ModuleD2Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Module } from "$/domain/entities/Module";
import { ModuleRepository } from "$/domain/repositories/ModuleRepository";
import { FutureData, apiToFuture } from "$/data/api-futures";
import { Future } from "$/domain/entities/generic/Future";
import { getDefaultModules } from "../common/D2Module";
import { getDefaultModules } from "$/data/common/D2Module";
import { DataElement } from "$/domain/entities/DataElement";
import _ from "$/domain/entities/generic/Collection";
import { Maybe } from "$/utils/ts-utils";
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/ModuleTestRepository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Module } from "$/domain/entities/Module";
import { Future } from "$/domain/entities/generic/Future";
import { ModuleRepository } from "$/domain/repositories/ModuleRepository";
import { FutureData } from "../api-futures";
import { FutureData } from "$/data/api-futures";

export class ModuleTestRepository implements ModuleRepository {
getByIds(): FutureData<Module[]> {
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/OutlierD2Repository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { D2Api } from "$/types/d2-api";
import { OutlierOptions, OutlierRepository } from "$/domain/repositories/OutlierRepository";
import { FutureData, apiToFuture } from "../api-futures";
import { FutureData, apiToFuture } from "$/data/api-futures";
import { Id, Period } from "$/domain/entities/Ref";
import { Outlier } from "$/domain/entities/Outlier";
import { Maybe } from "$/utils/ts-utils";
Expand Down
2 changes: 1 addition & 1 deletion src/data/repositories/OutlierTestRepository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Outlier } from "$/domain/entities/Outlier";
import { OutlierRepository } from "$/domain/repositories/OutlierRepository";
import { FutureData } from "../api-futures";
import { FutureData } from "$/data/api-futures";

export class OutlierTestRepository implements OutlierRepository {
export(): FutureData<Outlier[]> {
Expand Down
Loading

0 comments on commit 573080d

Please sign in to comment.