Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into DHIS2-18310-enable-…
Browse files Browse the repository at this point in the history
…non-gregorian-calendars-in-views-and-lists
  • Loading branch information
alaa-yahia committed Feb 3, 2025
2 parents ace2fe6 + c5335c7 commit 7ba48ab
Show file tree
Hide file tree
Showing 150 changed files with 1,779 additions and 1,097 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
## [101.24.1](https://github.com/dhis2/capture-app/compare/v101.24.0...v101.24.1) (2025-01-31)


### Bug Fixes

* [DHIS2-18582] Data element with number option set are not displayed in Stages and Events widget ([#3928](https://github.com/dhis2/capture-app/issues/3928)) ([e793240](https://github.com/dhis2/capture-app/commit/e79324029194f23c945b26cdd1f09f06bd27c213))

# [101.24.0](https://github.com/dhis2/capture-app/compare/v101.23.2...v101.24.0) (2025-01-31)


### Features

* [DHIS2-18329] Add org unit selector in schedule event form ([#3925](https://github.com/dhis2/capture-app/issues/3925)) ([4013d93](https://github.com/dhis2/capture-app/commit/4013d9326d17f93ff3b0ca11b7844764f92c6850))

## [101.23.2](https://github.com/dhis2/capture-app/compare/v101.23.1...v101.23.2) (2025-01-28)


### Bug Fixes

* [DHIS2-18902] keep program selection on unique id fallback search ([#3950](https://github.com/dhis2/capture-app/issues/3950)) ([6326f7a](https://github.com/dhis2/capture-app/commit/6326f7a134851a80352d6cf34ea2f8dbdb5b210d))

## [101.23.1](https://github.com/dhis2/capture-app/compare/v101.23.0...v101.23.1) (2025-01-28)


### Bug Fixes

* [DHIS2-18673] prevent saving in profile widget when validation errors are present ([#3943](https://github.com/dhis2/capture-app/issues/3943)) ([e341070](https://github.com/dhis2/capture-app/commit/e34107075678b78773d941bc1bca5dbf93f5088e))

# [101.23.0](https://github.com/dhis2/capture-app/compare/v101.22.0...v101.23.0) (2025-01-24)


### Features

* [DHIS2-18325] Show orgunit selector in the new event form ([#3879](https://github.com/dhis2/capture-app/issues/3879)) ([f07b4d4](https://github.com/dhis2/capture-app/commit/f07b4d47c219a21db2769cdc525135aa007ffe96))

# [101.22.0](https://github.com/dhis2/capture-app/compare/v101.21.6...v101.22.0) (2025-01-24)


### Features

* [DHIS2-17192] show related stages widget on registration page ([#3880](https://github.com/dhis2/capture-app/issues/3880)) ([03c156a](https://github.com/dhis2/capture-app/commit/03c156a8aa19708c5fc40140aa390ef547e18d25))

## [101.21.6](https://github.com/dhis2/capture-app/compare/v101.21.5...v101.21.6) (2025-01-16)


### Bug Fixes

* [DHIS2-18668] remove delete tei button in enrollment event pages ([#3941](https://github.com/dhis2/capture-app/issues/3941)) ([aef3400](https://github.com/dhis2/capture-app/commit/aef340023249b53de305fea55627082b443da060))

## [101.21.5](https://github.com/dhis2/capture-app/compare/v101.21.4...v101.21.5) (2025-01-15)


Expand Down
8 changes: 8 additions & 0 deletions cypress/e2e/NewPage/NewPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,14 @@ And('you delete the recently added tracked entity', () => {
});

And('you delete the recently added malaria entity', () => {
// deselect the program stage from the context selector
cy.get('[data-test="stage-selector-container-clear-icon"]')
.click();

cy.get('[data-test="dhis2-uicore-button"]')
.contains('Yes, discard changes')
.click();

cy.get('[data-test="profile-widget"]')
.contains('Malaria Entity profile')
.should('exist');
Expand Down
5 changes: 0 additions & 5 deletions cypress/e2e/ScopeSelector/ScopeSelector.feature
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,6 @@ Feature: User uses the ScopeSelector to navigate
When you reset the program selection
Then you see message explaining you need to select a program

Scenario: Enrollment event new page > resetting the org unit
Given you land on a enrollment page domain by having typed /#/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=UgYg0YW7ZIh&teiId=fhFQhO0xILJ&enrollmentId=gPDueU02tn8&stageId=A03MvHHogjR
When you reset the org unit selection
Then you see the enrollment event New page but there is no org unit id in the url

Scenario: Enrollment event new page > resetting the enrollment
Given you land on a enrollment page domain by having typed /#/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=UgYg0YW7ZIh&teiId=fhFQhO0xILJ&enrollmentId=gPDueU02tn8&stageId=A03MvHHogjR
When you reset the enrollment selection
Expand Down
5 changes: 0 additions & 5 deletions cypress/e2e/ScopeSelector/ScopeSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ And('you see the enrollment event Edit page but there is no org unit id in the u
cy.get('[data-test="widget-enrollment-event-view"]').should('exist');
});

And('you see the enrollment event New page but there is no org unit id in the url', () => {
cy.url().should('eq', `${Cypress.config().baseUrl}/#/enrollmentEventNew?enrollmentId=gPDueU02tn8&programId=IpHINAT79UW&stageId=A03MvHHogjR&teiId=fhFQhO0xILJ`);
cy.contains('Choose an organisation unit to start reporting');
});

And('you see the enrollment event New page but there is no stage id in the url', () => {
cy.url().should('eq', `${Cypress.config().baseUrl}/#/enrollmentEventNew?enrollmentId=gPDueU02tn8&orgUnitId=UgYg0YW7ZIh&programId=IpHINAT79UW&teiId=fhFQhO0xILJ`);
cy.contains('Choose a stage for a new event');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@ Feature: The user interacts with the widgets on the enrollment add event page
And the user sees the owner organisation unit
And the user sees the last update date

Scenario: You can delete a tracked entity from the profile widget
Given you add a new tracked entity in the Malaria focus investigation program
When the user clicks the "Back to all stages and events" button
When the user clicks the "New Event" button
When you open the overflow menu and click the "Delete Focus area" button
Then you see the delete tracked entity confirmation modal
When you confirm by clicking the "Yes, delete Focus area" button
Then you are redirected to the home page

Scenario: User can open the delete modal
Given you land on the enrollment add event page by having typed #/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=DiszpKrYNg8&teiId=EaOyKGOIGRp&enrollmentId=wBU0RAsYjKE&stageId=A03MvHHogjR
Then the enrollment widget should be opened
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ Feature: The user interacts with the widgets on the enrollment edit event
And the user sees the owner organisation unit
And the user sees the last update date

Scenario: You can delete a tracked entity from the profile widget
Given you add a new tracked entity in the Malaria focus investigation program
When you open the overflow menu and click the "Delete Focus area" button
Then you see the delete tracked entity confirmation modal
When you confirm by clicking the "Yes, delete Focus area" button
Then you are redirected to the home page

Scenario: User can open the delete modal
Given you land on the enrollment edit event page by having typed /#/enrollmentEventEdit?eventId=XGLkLlOXgmE&orgUnitId=DiszpKrYNg8
Then the enrollment widget should be opened
Expand Down Expand Up @@ -76,7 +69,7 @@ Feature: The user interacts with the widgets on the enrollment edit event
Then the event has the user Tracker demo User assigned
When you remove the assigned user
Then the event has no assignd user

@v>=41
Scenario: The user can view an event changelog on the enrollment edit event
Given you land on the enrollment edit event page by having typed /#/enrollmentEventEdit?eventId=QsAhMiZtnl2&orgUnitId=DiszpKrYNg8
Expand All @@ -85,7 +78,7 @@ Feature: The user interacts with the widgets on the enrollment edit event
And the changelog modal should contain data
# One row is filtered out as the metadata is no longer there
And the number of changelog table rows should be 9

@v>=41
Scenario: The user can change changelog page size
Given you land on the enrollment edit event page by having typed /#/enrollmentEventEdit?eventId=QsAhMiZtnl2&orgUnitId=DiszpKrYNg8
Expand All @@ -96,7 +89,7 @@ Feature: The user interacts with the widgets on the enrollment edit event
And you change the page size to 100
Then the number of changelog table rows should be 37
Then the table footer should display page 1

@v>=41
Scenario: The user can move to the next page in the changelog
Given you land on the enrollment edit event page by having typed /#/enrollmentEventEdit?eventId=QsAhMiZtnl2&orgUnitId=DiszpKrYNg8
Expand Down
66 changes: 36 additions & 30 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-12-15T15:25:38.375Z\n"
"PO-Revision-Date: 2024-12-15T15:25:38.375Z\n"
"POT-Creation-Date: 2025-01-24T15:26:19.128Z\n"
"PO-Revision-Date: 2025-01-24T15:26:19.128Z\n"

msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
Expand Down Expand Up @@ -229,8 +229,8 @@ msgstr "Active"
msgid "Completed"
msgstr "Completed"

msgid "Please add or cancel note before saving the event"
msgstr "Please add or cancel note before saving the event"
msgid "Please add or cancel the note before saving the event"
msgstr "Please add or cancel the note before saving the event"

msgid "Save and add another"
msgstr "Save and add another"
Expand Down Expand Up @@ -709,9 +709,6 @@ msgstr "There was an error opening the Page"
msgid "There was an error loading the page"
msgstr "There was an error loading the page"

msgid "Choose an organisation unit to start reporting"
msgstr "Choose an organisation unit to start reporting"

msgid "Program stage is invalid"
msgstr "Program stage is invalid"

Expand Down Expand Up @@ -768,6 +765,9 @@ msgstr ""
"You don't have access to create a {{trackedEntityName}} in the current "
"selections"

msgid "Choose an organisation unit to start reporting"
msgstr "Choose an organisation unit to start reporting"

msgid "Choose the {{missingCategories}} to start reporting"
msgstr "Choose the {{missingCategories}} to start reporting"

Expand All @@ -792,6 +792,9 @@ msgstr "Save {{trackedEntityTypeName}}"
msgid "Save {{trackedEntityName}}"
msgstr "Save {{trackedEntityName}}"

msgid "Enter details now is not available when creating a relationship"
msgstr "Enter details now is not available when creating a relationship"

msgid "Save new {{trackedEntityTypeName}} and link"
msgstr "Save new {{trackedEntityTypeName}} and link"

Expand Down Expand Up @@ -1228,15 +1231,18 @@ msgstr "Add coordinates"
msgid "Add area"
msgstr "Add area"

msgid "Please add or cancel the note before saving the event"
msgstr "Please add or cancel the note before saving the event"
msgid "Please provide an valid organisation unit"
msgstr "Please provide an valid organisation unit"

msgid "organisation unit could not be retrieved. Please try again later."
msgstr "organisation unit could not be retrieved. Please try again later."

msgid "Saving to {{stageName}} for {{programName}} in {{orgUnitName}}"
msgstr "Saving to {{stageName}} for {{programName}} in {{orgUnitName}}"

msgid "Saving to {{stageName}} for {{programName}}"
msgstr "Saving to {{stageName}} for {{programName}}"

msgid "program or stage is invalid"
msgstr "program or stage is invalid"

Expand All @@ -1258,9 +1264,6 @@ msgstr "Warning"
msgid "stage not found in rules execution"
msgstr "stage not found in rules execution"

msgid "Please provide an valid organisation unit"
msgstr "Please provide an valid organisation unit"

msgid "Delete event"
msgstr "Delete event"

Expand Down Expand Up @@ -1288,6 +1291,12 @@ msgstr "Write a note about this event"
msgid "This event doesn't have any notes"
msgstr "This event doesn't have any notes"

msgid "after"
msgstr "after"

msgid "before"
msgstr "before"

msgid "Schedule date info"
msgstr "Schedule date info"

Expand All @@ -1302,32 +1311,29 @@ msgid_plural "The scheduled date is {{count}} days {{position}} the suggested da
msgstr[0] "The scheduled date is {{count}} day {{position}} the suggested date."
msgstr[1] "The scheduled date is {{count}} days {{position}} the suggested date."

msgid "after"
msgstr "after"

msgid "before"
msgstr "before"

msgid "There are {{count}} scheduled event in {{orgUnitName}} on this day."
msgid_plural "There are {{count}} scheduled event in {{orgUnitName}} on this day."
msgstr[0] "There are {{count}} scheduled event in {{orgUnitName}} on this day."
msgstr[1] "There are {{count}} scheduled events in {{orgUnitName}} on this day."

msgid "Scheduling an event in {{stageName}} for {{programName}} in {{orgUnitName}}"
msgstr "Scheduling an event in {{stageName}} for {{programName}} in {{orgUnitName}}"
msgid "Schedule date / Due date"
msgstr "Schedule date / Due date"

msgid "Please provide a valid organisation unit"
msgstr "Please provide a valid organisation unit"

msgid "Schedule info"
msgstr "Schedule info"

msgid "Schedule date / Due date"
msgstr "Schedule date / Due date"

msgid "Event notes"
msgstr "Event notes"

msgid "Write a note about this scheduled event"
msgstr "Write a note about this scheduled event"

msgid "Program or stage is invalid"
msgstr "Program or stage is invalid"

msgid "Save note"
msgstr "Save note"

Expand Down Expand Up @@ -1394,8 +1400,8 @@ msgstr "{{trackedEntityTypeName}} profile"
msgid "tracked entity instance"
msgstr "tracked entity instance"

msgid "Link to an existing {{linkableStageLabel}}"
msgstr "Link to an existing {{linkableStageLabel}}"
msgid "Choose a {{linkableStageLabel}} event"
msgstr "Choose a {{linkableStageLabel}} event"

msgid "Choose a {{linkableStageLabel}}"
msgstr "Choose a {{linkableStageLabel}}"
Expand All @@ -1406,14 +1412,17 @@ msgstr "{{ linkableStageLabel }} is not repeatable"
msgid "{{ linkableStageLabel }} has no linkable events"
msgstr "{{ linkableStageLabel }} has no linkable events"

msgid "Actions - {{relationshipName}}"
msgstr "Actions - {{relationshipName}}"

msgid "Ambiguous relationships, contact system administrator"
msgstr "Ambiguous relationships, contact system administrator"

msgid "Enter details now"
msgstr "Enter details now"

msgid "Link to an existing"
msgstr "Link to an existing"
msgid "Link to an existing event"
msgstr "Link to an existing event"

msgid "Scheduled date"
msgstr "Scheduled date"
Expand All @@ -1424,9 +1433,6 @@ msgstr "Report date"
msgid "Please enter a date"
msgstr "Please enter a date"

msgid "Please provide a valid organisation unit"
msgstr "Please provide a valid organisation unit"

msgid "Please select a valid event"
msgstr "Please select a valid event"

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "capture-app",
"homepage": ".",
"version": "101.21.5",
"version": "101.24.1",
"cacheVersion": "7",
"serverVersion": "38",
"license": "BSD-3-Clause",
Expand All @@ -10,7 +10,7 @@
"packages/rules-engine"
],
"dependencies": {
"@dhis2/rules-engine-javascript": "101.21.5",
"@dhis2/rules-engine-javascript": "101.24.1",
"@dhis2/app-runtime": "^3.9.3",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/d2-icons": "^1.0.1",
Expand Down Expand Up @@ -115,7 +115,7 @@
"eslint-config-react-app": "^6.0.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-import-resolver-exports": "^1.0.0-beta.5",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-import-resolver-webpack": "^0.13.10",
"eslint-plugin-flowtype": "^5.10.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "^5.1.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": "101.21.5",
"version": "101.24.1",
"license": "BSD-3-Clause",
"main": "./build/cjs/index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
export type D2FunctionsInput = $ReadOnly<{|
dateUtils: IDateUtils,
variablesHash: RuleVariables,
selectedOrgUnit: OrgUnit,
selectedOrgUnit: ?OrgUnit,
selectedUserRoles: Array<string>,
|}>;

Expand Down
2 changes: 1 addition & 1 deletion packages/rules-engine/src/rulesEngine.types.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export type RulesEngineInput = {|
selectedEntity?: ?TEIValues,
trackedEntityAttributes?: ?TrackedEntityAttributes,
selectedEnrollment?: ?Enrollment,
selectedOrgUnit: OrgUnit,
selectedOrgUnit: ?OrgUnit,
selectedUserRoles?: ?Array<string>,
optionSets: OptionSets,
|}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type SourceData = {
selectedEntity: ?TEIValues,
selectedEnrollment: ?Enrollment,
optionSets: OptionSets,
selectedOrgUnit: OrgUnit,
selectedOrgUnit: ?OrgUnit,
};

const variableSourceTypesDataElementSpecific = {
Expand Down Expand Up @@ -516,7 +516,7 @@ export class VariableService {
return variables;
}

getOrganisationContextVariables(orgUnit: OrgUnit) {
getOrganisationContextVariables(orgUnit: ?OrgUnit) {
const variables = {};
variables.orgunit_code = this.buildContextVariable(orgUnit?.code, typeKeys.TEXT);
return variables;
Expand Down
Loading

0 comments on commit 7ba48ab

Please sign in to comment.