From 7f262372499b98d9fd8071c7b8069238ad3a1d15 Mon Sep 17 00:00:00 2001 From: Tony Valle <79843014+superskip@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:30:11 +0200 Subject: [PATCH 01/16] fix: [TECH-1623] rename TEI "Launchpad McQuack" -> "Breaking TheGlass" (#3400) --- .../EnrollmentPage/BreakingTheGlass/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cypress/integration/EnrollmentPage/BreakingTheGlass/index.js b/cypress/integration/EnrollmentPage/BreakingTheGlass/index.js index b460d47b33..45ad92f517 100644 --- a/cypress/integration/EnrollmentPage/BreakingTheGlass/index.js +++ b/cypress/integration/EnrollmentPage/BreakingTheGlass/index.js @@ -1,7 +1,7 @@ import '../sharedSteps'; Given('the tei created by this test is cleared from the database', () => { - cy.buildApiUrl('tracker', 'trackedEntities?filter=w75KJ2mc4zz:like:Launchpad&filter=zDhUuAYrxNC:like:McQuack&trackedEntityType=nEenWmSyUEp&page=1&pageSize=5&ouMode=ACCESSIBLE') + cy.buildApiUrl('tracker', 'trackedEntities?filter=w75KJ2mc4zz:like:Breaking&filter=zDhUuAYrxNC:like:TheGlass&trackedEntityType=nEenWmSyUEp&page=1&pageSize=5&ouMode=ACCESSIBLE') .then(url => cy.request(url)) .then(({ body }) => body.instances.forEach(({ trackedEntity }) => @@ -24,12 +24,12 @@ And('you create a new tei in Child programme from Ngelehun CHC', () => { cy.get('[data-test="d2-form-component"]') .find('[data-test="capture-ui-input"]') .eq(0) - .type('Launchpad') + .type('Breaking') .blur(); cy.get('[data-test="d2-form-component"]') .find('[data-test="capture-ui-input"]') .eq(1) - .type('McQuack') + .type('TheGlass') .blur(); clickSave(); @@ -61,7 +61,7 @@ And('you enroll the tei from Njandama MCHP', () => { .click(); cy.get('[data-test="enrollment-page-content"]') - .contains('Enroll Launchpad McQuack in this program') + .contains('Enroll Breaking TheGlass in this program') .click(); cy.get('[data-test="d2-form-component"]') @@ -97,7 +97,7 @@ And('you log in as tracker2 user', () => { And('you select the new tei', () => { cy.visit('/#/?orgUnitId=DiszpKrYNg8&programId=IpHINAT79UW'); - cy.contains('Launchpad') + cy.contains('Breaking') .click(); // Wait for enrollment dashboard cy.get('[data-test="profile-widget"]') From 519198b0c8dc4f97f47a6dc52a1b69d71927fc35 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Fri, 11 Aug 2023 08:47:51 +0000 Subject: [PATCH 02/16] chore(release): cut 100.35.6 [skip release] ## [100.35.6](https://github.com/dhis2/capture-app/compare/v100.35.5...v100.35.6) (2023-08-11) ### Bug Fixes * [TECH-1623] rename TEI "Launchpad McQuack" -> "Breaking TheGlass" ([#3400](https://github.com/dhis2/capture-app/issues/3400)) ([7f26237](https://github.com/dhis2/capture-app/commit/7f262372499b98d9fd8071c7b8069238ad3a1d15)) --- CHANGELOG.md | 7 +++++++ package.json | 4 ++-- packages/rules-engine/package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6a4627eb0..c2022d7582 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [100.35.6](https://github.com/dhis2/capture-app/compare/v100.35.5...v100.35.6) (2023-08-11) + + +### Bug Fixes + +* [TECH-1623] rename TEI "Launchpad McQuack" -> "Breaking TheGlass" ([#3400](https://github.com/dhis2/capture-app/issues/3400)) ([7f26237](https://github.com/dhis2/capture-app/commit/7f262372499b98d9fd8071c7b8069238ad3a1d15)) + ## [100.35.5](https://github.com/dhis2/capture-app/compare/v100.35.4...v100.35.5) (2023-08-03) diff --git a/package.json b/package.json index 4f00969968..966c3f4c8a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "capture-app", "homepage": ".", - "version": "100.35.5", + "version": "100.35.6", "cacheVersion": "5", "serverVersion": "38", "license": "BSD-3-Clause", @@ -10,7 +10,7 @@ "packages/rules-engine" ], "dependencies": { - "@dhis2/rules-engine-javascript": "100.35.5", + "@dhis2/rules-engine-javascript": "100.35.6", "@dhis2/app-runtime": "^3.8.0", "@dhis2/d2-i18n": "^1.1.0", "@dhis2/d2-icons": "^1.0.1", diff --git a/packages/rules-engine/package.json b/packages/rules-engine/package.json index 908b0b2737..4d314f92cc 100644 --- a/packages/rules-engine/package.json +++ b/packages/rules-engine/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/rules-engine-javascript", - "version": "100.35.5", + "version": "100.35.6", "license": "BSD-3-Clause", "main": "./build/cjs/index.js", "scripts": { From c02c3ee46ed4209215946636682ec86c97c9d905 Mon Sep 17 00:00:00 2001 From: Simona Domnisoru Date: Tue, 15 Aug 2023 11:39:16 +0200 Subject: [PATCH 03/16] fix: [DHIS2-15525] show formNames in the enrollment dashboard (#3402) --- .../EnrollmentPageDefault/hooks/useProgramMetadata.js | 2 +- .../EnrollmentPageDefault/hooks/useProgramStages.js | 1 + .../Stages/Stage/StageDetail/hooks/useEventList.js | 4 ++-- .../components/WidgetStagesAndEvents/types/common.types.js | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramMetadata.js b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramMetadata.js index 085a79bd15..d319df06d1 100644 --- a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramMetadata.js +++ b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramMetadata.js @@ -8,7 +8,7 @@ const query = { id: ({ id }) => id, params: { fields: - ['programStages[id,repeatable,hideDueDate,programStageDataElements[displayInReports,dataElement[id,valueType,displayName,optionSet[options[code,name]]]'], + ['programStages[id,repeatable,hideDueDate,programStageDataElements[displayInReports,dataElement[id,valueType,displayName,displayFormName,optionSet[options[code,name]]]'], }, }, }; diff --git a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js index d146c6e3a9..3c8b50285a 100644 --- a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js +++ b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js @@ -32,6 +32,7 @@ export const useProgramStages = (program: Program, programStages?: Array, events: const useComputeHeaderColumn = (dataElements: Array, hideDueDate: boolean, formFoundation: Object) => { const headerColumns = useMemo(() => { const dataElementHeaders = dataElements.reduce((acc, currDataElement) => { - const { id, name, type, optionSet } = currDataElement; + const { id, name, formName, type, optionSet } = currDataElement; if (!acc.find(item => item.id === id)) { if (isNotValidOptionSet(type, optionSet)) { log.error(errorCreator(MULIT_TEXT_WITH_NO_OPTIONS_SET)({ currDataElement })); return acc; } - acc.push({ id, header: name, type, sortDirection: SORT_DIRECTION.DEFAULT }); + acc.push({ id, header: formName || name, type, sortDirection: SORT_DIRECTION.DEFAULT }); } return acc; }, []); diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/types/common.types.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/types/common.types.js index 53e97b9ebe..9ec7b002ac 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/types/common.types.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/types/common.types.js @@ -8,6 +8,7 @@ type StageOptions = { export type StageDataElement = { id: string, name: string, + formName: string, type: $Keys, options?: StageOptions, optionSet?: { options: Array