Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into eh/feat/DHIS2-16322…
Browse files Browse the repository at this point in the history
…_OneClickTransfer

# Conflicts:
#	yarn.lock
  • Loading branch information
eirikhaugstulen committed Feb 27, 2024
2 parents 13e5d5c + 6fda7d6 commit a16b2a7
Show file tree
Hide file tree
Showing 81 changed files with 1,274 additions and 715 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## [100.57.4](https://github.com/dhis2/capture-app/compare/v100.57.3...v100.57.4) (2024-02-27)


### Bug Fixes

* [DHIS2-16016] handle multi-text in v40 ([#3491](https://github.com/dhis2/capture-app/issues/3491)) ([25d79cc](https://github.com/dhis2/capture-app/commit/25d79ccb9a8a880815d93659821348d1ebea253f))

## [100.57.3](https://github.com/dhis2/capture-app/compare/v100.57.2...v100.57.3) (2024-02-27)


### Bug Fixes

* [DHIS2-16318] enrollment page url management ([#3522](https://github.com/dhis2/capture-app/issues/3522)) ([0abec43](https://github.com/dhis2/capture-app/commit/0abec430ac4e74907c01b46fcd264194b542539e))

## [100.57.2](https://github.com/dhis2/capture-app/compare/v100.57.1...v100.57.2) (2024-02-26)


### Bug Fixes

* [DHIS2-15621] row view broken up in section ([#3457](https://github.com/dhis2/capture-app/issues/3457)) ([ce7282c](https://github.com/dhis2/capture-app/commit/ce7282ca440c1bddae3f02b938d505a9412d9ea6))

## [100.57.1](https://github.com/dhis2/capture-app/compare/v100.57.0...v100.57.1) (2024-02-23)


### Bug Fixes

* [DHIS2-16205] Sticky Locked Selector ([#3516](https://github.com/dhis2/capture-app/issues/3516)) ([61158b1](https://github.com/dhis2/capture-app/commit/61158b1097843309ac51187fe41e1af842220f71))

# [100.57.0](https://github.com/dhis2/capture-app/compare/v100.56.0...v100.57.0) (2024-02-19)


### Features

* [DHIS2-16527] assign user on first stage registration ([#3530](https://github.com/dhis2/capture-app/issues/3530)) ([54eef90](https://github.com/dhis2/capture-app/commit/54eef906e5c86ab6d65813c337242ff738882c5b))

# [100.56.0](https://github.com/dhis2/capture-app/compare/v100.55.0...v100.56.0) (2024-02-16)


### Features

* [DHIS2-12007] Text String Improvements ([#3498](https://github.com/dhis2/capture-app/issues/3498)) ([836368a](https://github.com/dhis2/capture-app/commit/836368ae33d191abf209a2813a6a8cbd26107581))

# [100.55.0](https://github.com/dhis2/capture-app/compare/v100.54.0...v100.55.0) (2024-02-05)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ When(/^the user changes the gender to (.*)/, gender =>
When(/^the user sets Plurality assessed to (.*)/, text =>
cy
.get('[data-test="widget-enrollment-event"]')
.get('[data-test="scope-selector"]')
.get('[data-test="virtualized-select"]')
.eq(4)
.click()
.contains(text)
.click(),
.click({ force: true }),
);

When('the user clicks switch tab to Schedule', () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/EnrollmentPage/BreakingTheGlass.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Feature: Breaking the glass page

# TODO - Flaky tests should be fixed by TECH-1662
@skip
Scenario: User with search scope access tries to access an enrollment in a protected program
Given the tei created by this test is cleared from the database
And the data store is clean
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/EnrollmentPage/BreakingTheGlass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ And('you create a new tei in Child programme from Ngelehun CHC', () => {
.eq(1)
.type('1999-09-01')
.blur();
cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.eq(0)
.type('Breaking')
.blur();
cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.eq(1)
.type('TheGlass')
Expand Down Expand Up @@ -68,7 +68,7 @@ And('you enroll the tei from Njandama MCHP', () => {
.contains('Enroll Breaking TheGlass in this program')
.click();

cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.eq(8)
.type('1999-09-01')
Expand Down
4 changes: 4 additions & 0 deletions cypress/e2e/EnrollmentPage/EnrollmentPageNavigation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ Feature: User interacts with Enrollment page
Given you enter enrollment page by typing: #/enrollment?programId=IpHINAT79UW&orgUnitId=DiszpKrYNg8&teiId=pybd813kIWx&enrollmentId=AUTO
Then you should be redirect to #/enrollment?enrollmentId=FS085BEkJo2&orgUnitId=DiszpKrYNg8&programId=IpHINAT79UW&teiId=pybd813kIWx

Scenario: Auto select orgunit when opening enrollment dashboard
Given you enter enrollment page by typing: #/enrollment?enrollmentId=avqvQMtX8DG&orgUnitId=DiszpKrYNg8&programId=IpHINAT79UW&teiId=btoHJM9byeF
Then you should be redirect to #/enrollment?enrollmentId=avqvQMtX8DG&orgUnitId=NnGUNkc5Zq8&programId=IpHINAT79UW&teiId=btoHJM9byeF

Scenario: Reset tei
Given you land on the enrollment page by having typed only the enrollmentId in the url
When you reset the tei selection
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/SearchForDuplicatesThroughAddRelationship/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { When, defineStep as And } from '@badeball/cypress-cucumber-preprocessor
import '../sharedSteps';

And('you fill in the first name with values that have duplicates', () => {
cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.eq(1)
.wait(500)
Expand All @@ -11,26 +11,26 @@ And('you fill in the first name with values that have duplicates', () => {
});

And('you fill in the first name with values that have less than 5 duplicates', () => {
cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.eq(1)
.type('Sarah')
.blur();
cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.eq(2)
.type('Fis')
.blur();
});

And('you fill in the first name with values that have exactly 5 duplicates', () => {
cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.eq(1)
.wait(500)
.type('Tesmi')
.blur();
cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.find('[data-test="capture-ui-input"]')
.eq(2)
.type('Abel')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/sharedSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Then('all pagination is disabled', () => {

And('you click search', () => {
// click outside of the input for the values to be updated
cy.get('[data-test="d2-form-component"]')
cy.get('[data-test="d2-section"]')
.click();

cy.get('button')
Expand Down
21 changes: 12 additions & 9 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-01-26T09:31:09.168Z\n"
"PO-Revision-Date: 2024-01-26T09:31:09.168Z\n"
"POT-Creation-Date: 2024-02-14T10:01:26.732Z\n"
"PO-Revision-Date: 2024-02-14T10:01:26.732Z\n"

msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
Expand Down Expand Up @@ -152,6 +152,9 @@ msgstr "Complete event"
msgid "{{ stageName }} - Basic info"
msgstr "{{ stageName }} - Basic info"

msgid "{{ stageName }} - Assignee"
msgstr "{{ stageName }} - Assignee"

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

Expand Down Expand Up @@ -659,11 +662,14 @@ msgstr "Stop using new Enrollment dashboard for {{programName}}"
msgid "Opt out for {{programName}}"
msgstr "Opt out for {{programName}}"

msgid "Enrollment with id \"{{enrollmentId}}\" does not exist"
msgstr "Enrollment with id \"{{enrollmentId}}\" does not exist"

msgid "Tracked entity instance with id \"{{teiId}}\" does not exist"
msgstr "Tracked entity instance with id \"{{teiId}}\" does not exist"

msgid "There is an error while opening this enrollment. Please enter a valid url."
msgstr "There is an error while opening this enrollment. Please enter a valid url."
msgid "Program with id \"{{programId}}\" does not exist"
msgstr "Program with id \"{{programId}}\" does not exist"

msgid "An error occurred while fetching enrollments. Please enter a valid url."
msgstr "An error occurred while fetching enrollments. Please enter a valid url."
Expand Down Expand Up @@ -893,9 +899,6 @@ msgstr ""
"Leaving this page will discard any selections you made for a new "
"relationship"

msgid "Feedbacks"
msgstr "Feedbacks"

msgid "Show all events"
msgstr "Show all events"

Expand Down Expand Up @@ -1407,8 +1410,8 @@ msgstr "{{ scheduledEvents }} scheduled"
msgid "Stages and Events"
msgstr "Stages and Events"

msgid "New TEI Relationship"
msgstr "New TEI Relationship"
msgid "New {{trackedEntityTypeName}} relationship"
msgstr "New {{trackedEntityTypeName}} relationship"

msgid "Missing implementation step"
msgstr "Missing implementation step"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "capture-app",
"homepage": ".",
"version": "100.55.0",
"version": "100.57.4",
"cacheVersion": "7",
"serverVersion": "38",
"license": "BSD-3-Clause",
Expand All @@ -10,7 +10,7 @@
"packages/rules-engine"
],
"dependencies": {
"@dhis2/rules-engine-javascript": "100.55.0",
"@dhis2/rules-engine-javascript": "100.57.4",
"@dhis2/app-runtime": "^3.9.3",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/d2-icons": "^1.0.1",
Expand All @@ -34,7 +34,7 @@
"leaflet": "^1.7.1",
"leaflet-draw": "^1.0.4",
"lodash": "^4.17.21",
"loglevel": "^1.8.1",
"loglevel": "^1.9.1",
"moment": "^2.29.4",
"prop-types": "^15.8.1",
"query-string": "^7.1.1",
Expand Down Expand Up @@ -103,10 +103,10 @@
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@vercel/ncc": "^0.34.0",
"babel-plugin-module-resolver": "^5.0.0",
"concurrently": "^7.0.0",
"concurrently": "^8.2.2",
"cypress": "12",
"docdash": "^2.0.2",
"dotenv": "^16.0.3",
"dotenv": "^16.4.5",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"eslint": "7.32.0",
Expand Down
4 changes: 2 additions & 2 deletions 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.55.0",
"version": "100.57.4",
"license": "BSD-3-Clause",
"main": "./build/cjs/index.js",
"scripts": {
Expand All @@ -12,7 +12,7 @@
},
"dependencies": {
"d2-utilizr": "^0.2.15",
"loglevel": "^1.8.0"
"loglevel": "^1.9.1"
},
"module": "./build/es/index.js",
"exports": {
Expand Down
1 change: 1 addition & 0 deletions src/components/AppLoader/AppLoader.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const AppLoader = (props: Props) => {
await initializeAsync(
onCacheExpired,
querySingleResource,
serverVersion.minor,
);
const store = getStore(
history, {
Expand Down
7 changes: 4 additions & 3 deletions src/components/AppLoader/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ async function setLocaleDataAsync(uiLocale: string) { //eslint-disable-line
initI18n(locale);
}

async function initializeMetaDataAsync(dbLocale: string, onQueryApi: Function) {
async function initializeMetaDataAsync(dbLocale: string, onQueryApi: Function, minorServerVersion: number) {
await loadMetaData(onQueryApi);
await buildMetaDataAsync(dbLocale);
await buildMetaDataAsync(dbLocale, minorServerVersion);
}

async function initializeSystemSettingsAsync(
Expand All @@ -140,6 +140,7 @@ async function initializeSystemSettingsAsync(
export async function initializeAsync(
onCacheExpired: Function,
onQueryApi: Function,
minorServerVersion: number,
) {
setLogLevel();

Expand Down Expand Up @@ -179,5 +180,5 @@ export async function initializeAsync(
await initializeSystemSettingsAsync(uiLocale, systemSettings);

// initialize metadata
await initializeMetaDataAsync(dbLocale, onQueryApi);
await initializeMetaDataAsync(dbLocale, onQueryApi, minorServerVersion);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
export const FEATURES = Object.freeze({
programStageWorkingList: 'programStageWorkingList',
storeProgramStageWorkingList: 'storeProgramStageWorkingList',
multiText: 'multiText',
customIcons: 'customIcons',
newTransferQueryParam: 'newTransferQueryParam',
exportablePayload: 'exportablePayload',
Expand All @@ -11,6 +12,7 @@ export const FEATURES = Object.freeze({
const MINOR_VERSION_SUPPORT = Object.freeze({
[FEATURES.programStageWorkingList]: 39,
[FEATURES.storeProgramStageWorkingList]: 40,
[FEATURES.multiText]: 41,
[FEATURES.customIcons]: 41,
[FEATURES.exportablePayload]: 41,
[FEATURES.newTransferQueryParam]: 41,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,39 +75,34 @@ class D2SectionPlain extends React.PureComponent<Props> {
renderSection(sectionProps) {
const { sectionMetaData, classes, sectionId, ...passOnProps } = sectionProps;

if (!sectionMetaData.showContainer || this.props.formHorizontal) {
const sectionFields = (
// $FlowFixMe[cannot-spread-inexact] automated comment
<D2SectionFields
ref={(instance) => { this.sectionFieldsInstance = instance; }}
fieldsMetaData={sectionMetaData.elements}
customForm={sectionMetaData.customForm}
{...passOnProps}
/>
);

if (sectionMetaData.showContainer && !this.props.formHorizontal) {
return (
// $FlowFixMe[cannot-spread-inexact] automated comment
<D2SectionFields
ref={(instance) => { this.sectionFieldsInstance = instance; }}
fieldsMetaData={sectionMetaData.elements}
customForm={sectionMetaData.customForm}
{...passOnProps}
/>
<div>
<Section
header={this.renderSectionHeader()}
description={this.renderSectionDescription()}
elevation={2}
className={classes.section}
>
{sectionFields}
</Section>
</div>
);
}
return (
<div>
<Section
header={this.renderSectionHeader()}
description={this.renderSectionDescription()}
elevation={2}
className={classes.section}
>
{/* $FlowFixMe[cannot-spread-inexact] automated comment */}
<D2SectionFields
ref={(instance) => {
this.sectionFieldsInstance = instance;
}}
fieldsMetaData={sectionMetaData.elements}
{...passOnProps}
/>

</Section>
</div>
);
return sectionFields;
}


render() {
const { isHidden, applyCustomFormClass, ...passOnProps } = this.props;

Expand All @@ -116,7 +111,7 @@ class D2SectionPlain extends React.PureComponent<Props> {
}

return (<div
data-test="d2-form-component"
data-test="d2-section"
className={applyCustomFormClass ? this.props.classes.containerCustomForm : ''}
>
{
Expand Down
Loading

0 comments on commit a16b2a7

Please sign in to comment.