Skip to content

Commit

Permalink
Merge branch 'master' into DHIS2-17860
Browse files Browse the repository at this point in the history
  • Loading branch information
simonadomnisoru committed Aug 13, 2024
2 parents dd64220 + 09905d7 commit 771920c
Show file tree
Hide file tree
Showing 97 changed files with 1,279 additions and 818 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## [100.76.1](https://github.com/dhis2/capture-app/compare/v100.76.0...v100.76.1) (2024-08-09)


### Bug Fixes

* [DHIS2-17632][DHIS2-17633] restrict invalid category combo for orgUnit ([#3738](https://github.com/dhis2/capture-app/issues/3738)) ([bfffe06](https://github.com/dhis2/capture-app/commit/bfffe069e3c16387dc0da6c08ed25b91f3f55bf1))

# [100.76.0](https://github.com/dhis2/capture-app/compare/v100.75.1...v100.76.0) (2024-08-08)


### Features

* [DHIS2-17171] preview images in versions prior to 41 ([#3694](https://github.com/dhis2/capture-app/issues/3694)) ([2f51805](https://github.com/dhis2/capture-app/commit/2f51805b469d74b57bff7c927a9aa76420913ea1))

## [100.75.1](https://github.com/dhis2/capture-app/compare/v100.75.0...v100.75.1) (2024-08-08)


### Bug Fixes

* [DHIS2-17859] Add missing ids to Enrollment plugin ([#3748](https://github.com/dhis2/capture-app/issues/3748)) ([19c77ec](https://github.com/dhis2/capture-app/commit/19c77ec50c2fff0deef948abd516726b51f95418))

# [100.75.0](https://github.com/dhis2/capture-app/compare/v100.74.0...v100.75.0) (2024-08-07)


### Features

* [DHIS2-17726] Plugins in Profile Widget ([#3709](https://github.com/dhis2/capture-app/issues/3709)) ([d783ade](https://github.com/dhis2/capture-app/commit/d783ade253e27badf03d267d8a3935186b170fd8))

# [100.74.0](https://github.com/dhis2/capture-app/compare/v100.73.0...v100.74.0) (2024-08-07)


### Features

* [DHIS2-17591][DHIS2-17607] Plugins in event forms ([#3684](https://github.com/dhis2/capture-app/issues/3684)) ([205b9f5](https://github.com/dhis2/capture-app/commit/205b9f5746f3d9b3d0d28035fd99e40b5649003c))

# [100.73.0](https://github.com/dhis2/capture-app/compare/v100.72.0...v100.73.0) (2024-08-07)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Then('the working list should be updated', () => {
.click();

cy.contains('WHOMCH Hemoglobin value')
.parents('tr')
.find('input[type="checkbox"]')
.click();

cy.contains('Save')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ When('you open the column selector', () => {
When('you select Household location and save from the column selector', () => {
cy.get('aside[role="dialog"]')
.contains('Household location')
.find('input')
.parents('tr')
.find('input[type="checkbox"]')
.click();

cy.get('aside[role="dialog"]')
Expand Down Expand Up @@ -388,11 +389,11 @@ When('you set the date of admission filter', () => {
.within(() => {
cy.contains('More filters')
.click();

cy.contains('Date of admission')
.click();
});

cy.get('[data-test="more-filters-menu"]')
.within(() => cy.contains('Date of admission').click());

cy.get('[data-test="list-view-filter-contents"]')
.within(() => {
cy.get('input[type="text"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ Given('you open the main page with Ngelehun, WHO RMNCH Tracker and First antenat
.within(() => {
cy.contains('More filters')
.click();
cy.contains('Program stage')
.click();
});

cy.get('[data-test="more-filters-menu"]')
.within(() => cy.contains('Program stage').click());

cy.get('[data-test="list-view-filter-contents"]')
.contains('First antenatal care visit')
.click();
Expand All @@ -66,10 +67,11 @@ Given('you open the main page with Ngelehun and Malaria case diagnosis and House
.within(() => {
cy.contains('More filters')
.click();
cy.contains('Program stage')
.click();
});

cy.get('[data-test="more-filters-menu"]')
.within(() => cy.contains('Program stage').click());

cy.get('[data-test="list-view-filter-contents"]')
.contains('Household investigation')
.click();
Expand Down Expand Up @@ -186,10 +188,11 @@ When('you set the WHOMCH Smoking filter to No', () => {
.within(() => {
cy.get('[data-test="more-filters"]').eq(1)
.click();
cy.contains('WHOMCH Smoking')
.click();
});

cy.get('[data-test="more-filters-menu"]')
.within(() => cy.contains('WHOMCH Smoking').click());

cy.get('[data-test="list-view-filter-contents"]')
.contains('No')
.click();
Expand Down Expand Up @@ -251,7 +254,8 @@ When('you open the column selector', () => {
When('you select the organisation unit and save from the column selector', () => {
cy.get('aside[role="dialog"]')
.contains('Organisation unit')
.find('input')
.parents('tr')
.find('input[type="checkbox"]')
.click();

cy.get('aside[role="dialog"]')
Expand Down Expand Up @@ -580,9 +584,9 @@ When('you open the program stage filters from the more filters dropdown menu', (
.within(() => {
cy.contains('More filters')
.click();
cy.contains('Program stage')
.click();
});
cy.get('[data-test="more-filters-menu"]')
.within(() => cy.contains('Program stage').click());
});

Then('you see the program stages and the default events filters', () => {
Expand Down Expand Up @@ -613,7 +617,8 @@ When('you select the Foci response program stage', () => {
When('you select a data element columns and save from the column selector', () => {
cy.get('aside[role="dialog"]')
.contains('People included')
.find('input')
.parents('tr')
.find('input[type="checkbox"]')
.click();

cy.get('aside[role="dialog"]')
Expand Down Expand Up @@ -674,7 +679,8 @@ Then('you see scheduledAt filter', () => {
When('you select a scheduledAt column and save from the column selector', () => {
cy.get('aside[role="dialog"]')
.contains('Appointment date')
.find('input')
.parents('tr')
.find('input[type="checkbox"]')
.click();

cy.get('aside[role="dialog"]')
Expand Down Expand Up @@ -741,10 +747,11 @@ Given('you open the main page with Ngelehun and WHO RMNCH Tracker context and co
.within(() => {
cy.contains('More filters')
.click();
cy.contains('Program stage')
.click();
});

cy.get('[data-test="more-filters-menu"]')
.within(() => cy.contains('Program stage').click());

cy.get('[data-test="list-view-filter-contents"]')
.contains('Postpartum care visit')
.click();
Expand All @@ -760,10 +767,11 @@ Given('you open the main page with all accesible records in the WHO RMNCH Tracke
.within(() => {
cy.contains('More filters')
.click();
cy.contains('Program stage')
.click();
});

cy.get('[data-test="more-filters-menu"]')
.within(() => cy.contains('Program stage').click());

cy.get('[data-test="list-view-filter-contents"]')
.contains('Postpartum care visit')
.click();
Expand Down
49 changes: 31 additions & 18 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-08-08T08:57:10.390Z\n"
"PO-Revision-Date: 2024-08-08T08:57:10.390Z\n"
"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n"
"PO-Revision-Date: 2024-08-08T11:49:13.423Z\n"

msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
Expand Down Expand Up @@ -366,17 +366,11 @@ msgstr "Registered person"
msgid "validation failed"
msgstr "validation failed"

msgid "Errors"
msgstr "Errors"

msgid "Feedback"
msgstr "Feedback"

msgid "Indicators"
msgstr "Indicators"
msgid "No feedback for this event yet"
msgstr "No feedback for this event yet"

msgid "Warnings"
msgstr "Warnings"
msgid "No indicator output for this event yet"
msgstr "No indicator output for this event yet"

msgid "Generate new event"
msgstr "Generate new event"
Expand Down Expand Up @@ -556,6 +550,9 @@ msgstr "Columns to show in table"
msgid "Column"
msgstr "Column"

msgid "Visible"
msgstr "Visible"

msgid "Update"
msgstr "Update"

Expand Down Expand Up @@ -777,12 +774,6 @@ 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 "No feedback for this event yet"
msgstr "No feedback for this event yet"

msgid "No indicator output for this event yet"
msgstr "No indicator output for this event yet"

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

Expand Down Expand Up @@ -813,6 +804,13 @@ msgstr "Stage"
msgid "Registered events"
msgstr "Registered events"

msgid ""
"The category option is not valid for the selected organisation unit. Please "
"select a valid combination."
msgstr ""
"The category option is not valid for the selected organisation unit. Please "
"select a valid combination."

msgid "Please select {{category}}."
msgstr "Please select {{category}}."

Expand Down Expand Up @@ -929,6 +927,18 @@ msgstr ""
"Leaving this page will discard any selections you made for a new "
"relationship"

msgid "Errors"
msgstr "Errors"

msgid "Feedback"
msgstr "Feedback"

msgid "Indicators"
msgstr "Indicators"

msgid "Warnings"
msgstr "Warnings"

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

Expand Down Expand Up @@ -970,6 +980,9 @@ msgstr "Could not retrieve metadata. Please try again later."
msgid "The enrollment event data could not be found"
msgstr "The enrollment event data could not be found"

msgid "Loading"
msgstr "Loading"

msgid "Possible duplicates found"
msgstr "Possible duplicates found"

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "capture-app",
"homepage": ".",
"version": "100.73.0",
"version": "100.76.1",
"cacheVersion": "7",
"serverVersion": "38",
"license": "BSD-3-Clause",
Expand All @@ -10,7 +10,7 @@
"packages/rules-engine"
],
"dependencies": {
"@dhis2/rules-engine-javascript": "100.73.0",
"@dhis2/rules-engine-javascript": "100.76.1",
"@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.73.0",
"version": "100.76.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 @@ -3,9 +3,10 @@ import i18n from '@dhis2/d2-i18n';
import React from 'react';
import moment from 'moment';
import type { ComponentType } from 'react';
import { Avatar, Grid, withStyles } from '@material-ui/core';
import { Grid, withStyles } from '@material-ui/core';
import { colors, Tag, IconCheckmark16, Tooltip } from '@dhis2/ui';
import { useTimeZoneConversion } from '@dhis2/app-runtime';
import { CardImage } from '../../../capture-ui/CardImage/CardImage.component';
import type {
CardDataElementsInformation,
CardProfileImageElementInformation,
Expand Down Expand Up @@ -63,8 +64,8 @@ const getStyles = (theme: Theme) => ({
flexGrow: 1,
},
image: {
width: theme.typography.pxToRem(44),
height: theme.typography.pxToRem(44),
width: theme.typography.pxToRem(54),
height: theme.typography.pxToRem(54),
marginRight: theme.typography.pxToRem(8),
},
buttonMargin: {
Expand Down Expand Up @@ -151,7 +152,8 @@ const CardListItemIndex = ({
const imageValue = item.values[imageElement.id];
return (
<div>
{imageValue && <Avatar src={imageValue.url} alt={imageValue.name} className={classes.image} />}
{imageValue && <CardImage imageUrl={imageValue.url} className={classes.image} size="medium" />}

</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ class D2Form extends React.PureComponent<PropsForPureComponent> {
renderHorizontal = (section: Section, passOnProps: any) => (
<D2SectionContainer
key={section.id}
innerRef={(sectionInstance) => { this.setSectionInstance(sectionInstance, section.id); }}
innerRef={(sectionInstance) => {
this.setSectionInstance(sectionInstance, section.id);
}}
sectionMetaData={section}
validationStrategy={this.props.formFoundation.validationStrategy}
formId={this.getFormId()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class D2SectionFieldsComponent extends Component<Props> {
fieldsMetadata: metaDataElement.fields,
customAttributes: metaDataElement.customAttributes,
formId: props.formId,
viewMode: props.viewMode,
},
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ export class FormBuilder extends React.Component<Props> {
customAttributes,
name,
formId,
viewMode,
} = field.props;

return (
Expand All @@ -578,6 +579,7 @@ export class FormBuilder extends React.Component<Props> {
pluginSource={pluginSource}
fieldsMetadata={fieldsMetadata}
formId={formId}
viewMode={viewMode}
onUpdateField={this.commitFieldUpdateFromPlugin.bind(this)}
pluginContext={pluginContext}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
export const PluginErrorMessages = Object.freeze({
SET_FIELD_VALUE_MISSING_ID: 'setFieldValue: missing required fieldId',
SET_FIELD_VALUE_ID_NOT_ALLOWED: 'setFieldValue: fieldId must be one of the configured plugin ids',
SET_CONTEXT_FIELD_VALUE_MISSING_ID: 'setContextFieldValue: tried to set value for a field that does not exist in the plugin context',
});

export const FormFieldTypes = Object.freeze({
// TODO [DHIS2-17605] - Unified field types
DATA_ELEMENT: 'dataElement',
PLUGIN: 'plugin',
});
Loading

0 comments on commit 771920c

Please sign in to comment.