Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into eh/fix/UnableToSche…
Browse files Browse the repository at this point in the history
…duleEventWithNote
  • Loading branch information
eirikhaugstulen committed Oct 21, 2023
2 parents 0360762 + 3433a91 commit 06252ea
Show file tree
Hide file tree
Showing 88 changed files with 1,470 additions and 376 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## [100.41.3](https://github.com/dhis2/capture-app/compare/v100.41.2...v100.41.3) (2023-10-16)


### Bug Fixes

* [DHIS2-15782] navigation with program stage filter ([#3431](https://github.com/dhis2/capture-app/issues/3431)) ([8f7a017](https://github.com/dhis2/capture-app/commit/8f7a017c5860104620c6b7fc8c20916b00037302))

## [100.41.2](https://github.com/dhis2/capture-app/compare/v100.41.1...v100.41.2) (2023-10-12)


### Bug Fixes

* [DHIS2-15827] remove effects of 'Prevent adding new events to stage' action from the form ([#3418](https://github.com/dhis2/capture-app/issues/3418)) ([f17d087](https://github.com/dhis2/capture-app/commit/f17d087f368cf4d6b26923fd5cf4fb15d7795ba2))

## [100.41.1](https://github.com/dhis2/capture-app/compare/v100.41.0...v100.41.1) (2023-10-09)


### Bug Fixes

* [DHIS2-15734] assign effect dynamic formId object key ([#3422](https://github.com/dhis2/capture-app/issues/3422)) ([85f242b](https://github.com/dhis2/capture-app/commit/85f242b2b0c6092b46e92f087e21e102a2e1e19d))

# [100.41.0](https://github.com/dhis2/capture-app/compare/v100.40.1...v100.41.0) (2023-10-03)


### Features

* [DHIS2-9661][DHIS2-14830] first stage on registration page ([#3267](https://github.com/dhis2/capture-app/issues/3267)) ([6e5f6fe](https://github.com/dhis2/capture-app/commit/6e5f6fea7b6ab043800e806c7459210f10ef608a))

## [100.40.1](https://github.com/dhis2/capture-app/compare/v100.40.0...v100.40.1) (2023-09-30)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([b58bc66](https://github.com/dhis2/capture-app/commit/b58bc66db4136ad558c02f38ac54a2319b3af3f1))

# [100.40.0](https://github.com/dhis2/capture-app/compare/v100.39.4...v100.40.0) (2023-09-20)


Expand Down
4 changes: 4 additions & 0 deletions cypress/integration/EnrollmentPage/BreakingTheGlass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ And('you create a new tei in Child programme from Ngelehun CHC', () => {
.eq(1)
.type('TheGlass')
.blur();
cy.get('[data-test="capture-ui-input"]')
.eq(7)
.type('2023-09-01')
.blur();

clickSave();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Feature: Hidden program stage
Scenario: The user cannot add an event in a hidden program stage
Given you add an enrollment event that will result in a rule effect to hide a program stage
Then the New Postpartum care visit event button is disabled in the stages and events widget
And and an error is show in the Postpartum care visit stage
And the Postpartum care visit button is disabled in the enrollmentEventNew page
12 changes: 0 additions & 12 deletions cypress/integration/EnrollmentPage/HiddenProgramStage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ Then('the New Postpartum care visit event button is disabled in the stages and e
.should('be.disabled');
});

Then('and an error is show in the Postpartum care visit stage', () => {
cy.visit(
'/#/enrollmentEventNew?enrollmentId=fmhIsWXVDmS&orgUnitId=s7SLtx8wmRA&programId=WSGAb5XwJ3Y&teiId=uW8Y7AIcRKA&stageId=bbKtnxRZKEP',
);
cy.contains('[data-test="dhis2-uicore-button"]', 'Complete')
.should('be.disabled');
cy.contains('[data-test="dhis2-uicore-button"]', 'Save without completing')
.should('be.disabled');
cy.contains('[data-test="dhis2-uicore-noticebox-content"]', 'You can\'t add any more Postpartum care visit events')
.should('exist');
});

Then('the Postpartum care visit button is disabled in the enrollmentEventNew page', () => {
cy.visit(
'/#/enrollmentEventNew?enrollmentId=fmhIsWXVDmS&orgUnitId=s7SLtx8wmRA&programId=WSGAb5XwJ3Y&teiId=uW8Y7AIcRKA',
Expand Down
7 changes: 6 additions & 1 deletion cypress/integration/NewPage.feature
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Feature: User creates a new entries from the registration page
Scenario: New person in Tracker Program > Submitting the form shows a list with duplicates
Given you are in Child programme registration page
When you fill the Child programme registration form with a first name with value that has duplicates
And you fill in the birth report date
And you click the save person submit button
And you see the possible duplicates modal
When you click the next page button
Expand All @@ -197,7 +198,7 @@ Feature: User creates a new entries from the registration page
When you are in the Malaria case diagnosis, treatment and investigation program registration page
And you fill the Malaria case diagnosis registration form with values
And you click the save malaria entity submit button
Then you see the enrollment event New page
Then you see the enrollment event Edit page
When you open the main page with Ngelehun and Malaria case diagnosis, treatment and investigation context
And you opt out to use the new enrollment Dashboard for Malaria case diagnosis, treatment and investigation
Then you see the opt in component for Malaria case diagnosis, treatment and investigation
Expand All @@ -208,3 +209,7 @@ Feature: User creates a new entries from the registration page
Given you are in Child programme reenrollment page
Then you see the form prefield with existing TEI attributes values
And the scope selector has the TEI context

Scenario: First stage appears on registration page
Given you are in Child programme registration page
Then the first stage appears on registration page
23 changes: 19 additions & 4 deletions cypress/integration/NewPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,13 @@ And('you fill the Child programme registration form with a first name with value
.blur();
});

And('you fill in the birth report date', () => {
cy.get('[data-test="capture-ui-input"]')
.eq(7)
.type('2023-01-01')
.blur();
});

And('you are in the WNCH PNC program registration page', () => {
cy.visit('/#/new?programId=uy2gU8kT1jF&orgUnitId=DiszpKrYNg8');
});
Expand Down Expand Up @@ -561,12 +568,10 @@ And('you fill the Malaria case diagnosis registration form with values', () => {
.blur();
});

Then('you see the enrollment event New page', () => {
cy.url().should('include', '/#/enrollmentEventNew?');
cy.url().should('include', 'stageId=hYyB7FUS5eR');
Then('you see the enrollment event Edit page', () => {
cy.url().should('include', '/#/enrollmentEventEdit?');
});


And('you fill in multiple Allergies options', () => {
cy.get('[data-test="registration-page-content"]').within(() => {
cy.contains('Allergies').should('exist');
Expand All @@ -585,3 +590,13 @@ Then('you can see the multiple selections in the form', () => {
cy.contains('Other').should('exist');
});
});

Then('the first stage appears on registration page', () => {
cy.get('[data-test="registration-page-content"]').within(() => {
cy.contains('Birth - Basic info').should('exist');
cy.contains('Birth - Details').should('exist');
cy.contains('Birth - Status').should('exist');
cy.contains('Report date').should('exist');
cy.contains('Apgar Score').should('exist');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ And you select the events scheduled today
And you apply the current filter
Then you see the selected option in the scheduledAt filter

@v>=39
Scenario: The program stage working list configureation is kept when navigating
Given you open the main page with Ngelehun and WHO RMNCH Tracker context and configure a program stage working list
When you open an enrollment event from the working list
And you go back using the browser button
Then the program stage working list is loaded

@v>=40
Scenario: The user creates, updates and deletes a Program stage custom working list
Given you open the main page with Ngelehun and Malaria case diagnosis and Household investigation context
Expand Down Expand Up @@ -233,7 +240,7 @@ And the Custom Program stage list is deleted

@v>=40
Scenario: The user can save a program stage working list, based on a TEI working list configuration
Given you open the main page with Ngelehun and Malaria focus investigation context
Given you open a clean main page with Ngelehun and Malaria focus investigation context
Then you see the custom TEI working lists
And you can load the view with the name Ongoing foci responses
And you open the program stage filters from the more filters dropdown menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ import { v4 as uuid } from 'uuid';
import '../../sharedSteps';
import '../../../sharedSteps';

const cleanUpIfApplicable = (programId) => {
cy.buildApiUrl(`programStageWorkingLists?filter=program.id:eq:${programId}&fields=id,displayName`)
.then(url => cy.request(url))
.then(({ body }) => {
const workingList = body.programStageWorkingLists?.find(e => e.displayName === 'Custom Program stage list');
if (!workingList) {
return null;
}
return cy
.buildApiUrl('programStageWorkingLists', workingList.id)
.then(workingListUrl => cy.request('DELETE', workingListUrl));
});
};
Given('you open the main page with Ngelehun and child programme context', () => {
cy.visit('#/?programId=IpHINAT79UW&orgUnitId=DiszpKrYNg8');
});
Expand Down Expand Up @@ -42,6 +55,7 @@ Given('you open the main page with Ngelehun and Malaria case diagnosis context',
});

Given('you open the main page with Ngelehun and Malaria case diagnosis and Household investigation context', () => {
cleanUpIfApplicable('qDkgAbB5Jlk');
cy.visit('#/?programId=qDkgAbB5Jlk&orgUnitId=DiszpKrYNg8');

cy.get('[data-test="tei-working-lists"]')
Expand All @@ -60,6 +74,11 @@ Given('you open the main page with Ngelehun and Malaria case diagnosis and House
.click();
});

Given('you open a clean main page with Ngelehun and Malaria focus investigation context', () => {
cleanUpIfApplicable('M3xtLkYBlKI');
cy.visit('#/?programId=M3xtLkYBlKI&orgUnitId=DiszpKrYNg8');
});

Then('the default working list should be displayed', () => {
const names = [
'Filona',
Expand Down Expand Up @@ -740,3 +759,43 @@ Then('the program stage custom working list filters are loaded', () => {
.find('[data-test="more-filters"]')
.should('have.length', 2);
});

Given('you open the main page with Ngelehun and WHO RMNCH Tracker context and configure a program stage working list', () => {
cy.visit('#/?programId=WSGAb5XwJ3Y&orgUnitId=DiszpKrYNg8');
cy.get('[data-test="template-selector-create-list"]')
.click();

cy.get('[data-test="tei-working-lists"]')
.within(() => {
cy.contains('More filters')
.click();
cy.contains('Program stage')
.click();
});

cy.get('[data-test="list-view-filter-contents"]')
.contains('Postpartum care visit')
.click();

cy.get('[data-test="list-view-filter-apply-button"]')
.click();
});

When('you open an enrollment event from the working list', () => {
cy.contains('Linda')
.click();
});

When('you go back using the browser button', () => {
cy.go('back');
});

Then('the program stage working list is loaded', () => {
cy.get('[data-test="tei-working-lists"]')
.find('[data-test="more-filters"]')
.should('have.length', 2);

cy.get('[data-test="tei-working-lists"]')
.contains('WHOMCH Hemoglobin value')
.should('exist');
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions docs/user/using-the-capture-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,12 @@ You can set multiple program stages within a program to be auto-generating (this
A program can be configured to automatically take the user to register a new event immediately after enrolling a tracked entity instance. To enable this behavior, the program must have at least one program stage with the "Open data entry form after registration" option checked. If more than one program stage has this option enabled, the first stage will be used.

To configure it, you must follow the steps described in the [Enrollment with auto generated events](#enrollment-with-auto-generated-events) section and then check the option "Open data entry form after enrollment".

![](resources/images/open-data-entry-form-after-enrollment.png)

### Enrollment with first stage on registration page

For tracker programs enable the "First stage appears on registration page" flag in the Maintenance. The enrollment registration page will now display the first program stage the user has access to.

![](resources/images/first-stage-during-registration.png)

#### Active type of event

Expand Down
22 changes: 17 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: 2023-09-04T07:07:59.195Z\n"
"PO-Revision-Date: 2023-09-04T07:07:59.195Z\n"
"POT-Creation-Date: 2023-09-29T14:14:34.330Z\n"
"PO-Revision-Date: 2023-09-29T14:14:34.330Z\n"

msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
Expand Down Expand Up @@ -149,6 +149,15 @@ msgstr "Coordinate"
msgid "Enrollment"
msgstr "Enrollment"

msgid "Complete event"
msgstr "Complete event"

msgid "{{ stageName }} - Basic info"
msgstr "{{ stageName }} - Basic info"

msgid "{{ stageName }} - Status"
msgstr "{{ stageName }} - Status"

msgid "Please select {{categoryName}}"
msgstr "Please select {{categoryName}}"

Expand All @@ -167,15 +176,18 @@ msgstr "Cancel"
msgid "Metadata error. see log for details"
msgstr "Metadata error. see log for details"

msgid "{{ stageName }} - Details"
msgstr "{{ stageName }} - Details"

msgid "{{ stageName }} - {{ sectionName }}"
msgstr "{{ stageName }} - {{ sectionName }}"

msgid "Assigned user"
msgstr "Assigned user"

msgid "Search for user"
msgstr "Search for user"

msgid "Complete event"
msgstr "Complete event"

msgid "Basic info"
msgstr "Basic info"

Expand Down
12 changes: 6 additions & 6 deletions i18n/zh.po
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ msgid ""
msgstr "一个具有 {{attributeName}} 的 {{trackedEntityTypeName}} 实体已经登记"

msgid "Show registered {{trackedEntityTypeName}}"
msgstr "显示登记的 {{attributeName}} "
msgstr "显示已注册的{{trackedEntityTypeName}}"

msgid "Registered person"
msgstr "登记的人"
Expand Down Expand Up @@ -1069,7 +1069,7 @@ msgid "To work with the selected program,"
msgstr "基于选择的项目工作"

msgid "open the Tracker Capture app"
msgstr "打开跟踪随访采集APP"
msgstr "打开跟踪记录APP"

msgid "This program is protected"
msgstr "该项目受保护"
Expand Down Expand Up @@ -1257,7 +1257,7 @@ msgid "Save changes"
msgstr "保存修改"

msgid "Profile"
msgstr "简历"
msgstr "基本信息"

msgid "There is a problem with this form"
msgstr "这个表单有问题"
Expand All @@ -1278,7 +1278,7 @@ msgid "Profile widget could not be loaded. Please try again later"
msgstr "无法加载个人资料窗口小部件。请稍后再试"

msgid "{{TETName}} profile"
msgstr "{{TETName}} 基本资料"
msgstr "{{TETName}} 基本信息"

msgid "Edit"
msgstr "编辑"
Expand Down Expand Up @@ -1314,7 +1314,7 @@ msgid "{{ overdueEvents }} overdue"
msgstr "{{ overdueEvents }} 逾期"

msgid "{{ scheduledEvents }} scheduled"
msgstr "{{scheduledEvents}} 已调度"
msgstr "{{ ScheduledEvents }} 已安排"

msgid "Stages and Events"
msgstr "阶段与活动"
Expand Down Expand Up @@ -1416,7 +1416,7 @@ msgid "Scheduled"
msgstr "已经调度"

msgid "Overdue{{ escape }} due {{ time }}"
msgstr "逾期{{逃脱}}到期{{时间}}"
msgstr "逾期{{ escape }}到期{{ time }}"

msgid "Overdue"
msgstr "逾期"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "capture-app",
"homepage": ".",
"version": "100.40.0",
"cacheVersion": "5",
"version": "100.41.3",
"cacheVersion": "6",
"serverVersion": "38",
"license": "BSD-3-Clause",
"private": true,
"workspaces": [
"packages/rules-engine"
],
"dependencies": {
"@dhis2/rules-engine-javascript": "100.40.0",
"@dhis2/rules-engine-javascript": "100.41.3",
"@dhis2/app-runtime": "^3.9.3",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/d2-icons": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/rules-engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhis2/rules-engine-javascript",
"version": "100.40.0",
"version": "100.41.3",
"license": "BSD-3-Clause",
"main": "./build/cjs/index.js",
"scripts": {
Expand Down
Loading

0 comments on commit 06252ea

Please sign in to comment.