Skip to content

Commit

Permalink
Merge branch 'master' into DHIS2-15483
Browse files Browse the repository at this point in the history
  • Loading branch information
simonadomnisoru committed Sep 26, 2023
2 parents a0ec795 + a153053 commit 7807410
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 11 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# [100.40.0](https://github.com/dhis2/capture-app/compare/v100.39.4...v100.40.0) (2023-09-20)


### Features

* [DHIS2-15830] Add orgUnitId to plugin context ([b9ec237](https://github.com/dhis2/capture-app/commit/b9ec237af595a1112dc6db01206e8332c9bb6647))

## [100.39.4](https://github.com/dhis2/capture-app/compare/v100.39.3...v100.39.4) (2023-09-19)


### Bug Fixes

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

## [100.39.3](https://github.com/dhis2/capture-app/compare/v100.39.2...v100.39.3) (2023-09-14)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ And you apply the current filter
When you click the last name column header
Then the sort arrow should indicate ascending order
And the list should display data ordered ascendingly by last name
When you click the WHOMCH Smoking column header
When you click the WHOMCH Hemoglobin value column header
Then the sort arrow should indicate descending order
And the list should display data ordered ascendingly by WHOMCH Smoking
And the list should display data ordered descending by WHOMCH Hemoglobin

@v>=39
Scenario: The user can remove the program stage filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,9 @@ When('you click the last name column header', () => {
.click();
});

When('you click the WHOMCH Smoking column header', () => {
When('you click the WHOMCH Hemoglobin value column header', () => {
cy.get('[data-test="dhis2-uicore-tableheadercellaction"]')
.eq(6)
.last()
.click()
.click();
});
Expand Down Expand Up @@ -400,10 +400,10 @@ Then('the list should display data ordered ascendingly by last name', () => {
});
});

Then('the list should display data ordered ascendingly by WHOMCH Smoking', () => {
Then('the list should display data ordered descending by WHOMCH Hemoglobin', () => {
const names = [
'Siren',
'Hertz',
'Siren',
];

cy.get('[data-test="tei-working-lists"]')
Expand Down
4 changes: 2 additions & 2 deletions i18n/zh.po
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ msgid "Refer"
msgstr "转诊"

msgid "You can't add any more {{ programStageName }} events"
msgstr ""
msgstr "您无法添加更多的 {{ programStageName }} 事件"

msgid "Cancel without saving"
msgstr "取消而不保存"
Expand Down Expand Up @@ -1132,7 +1132,7 @@ msgid "Mark for follow-up"
msgstr "后续标记"

msgid "Existing dates for auto-generated events will not be updated."
msgstr ""
msgstr "自动生成的事件的现有日期将不会更新。"

msgid "Enrollment date"
msgstr "报名日期"
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.39.3",
"version": "100.40.0",
"cacheVersion": "5",
"serverVersion": "38",
"license": "BSD-3-Clause",
Expand All @@ -10,7 +10,7 @@
"packages/rules-engine"
],
"dependencies": {
"@dhis2/rules-engine-javascript": "100.39.3",
"@dhis2/rules-engine-javascript": "100.40.0",
"@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.39.3",
"version": "100.40.0",
"license": "BSD-3-Clause",
"main": "./build/cjs/index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import { usePluginMessages } from './hooks/usePluginMessages';
import { usePluginCallbacks } from './hooks/usePluginCallbacks';
import { usePluginValues } from './hooks/usePluginValues';
import { formatPluginConfig } from './formatPluginConfig';
import { useLocationQuery } from '../../../utils/routing';

export const FormFieldPlugin = (props: ContainerProps) => {
const { pluginSource, fieldsMetadata, formId, onUpdateField, pluginContext } = props;
const metadataByPluginId = useMemo(() => Object.fromEntries(fieldsMetadata), [fieldsMetadata]);
const configuredPluginIds = useMemo(() => Object.keys(metadataByPluginId), [metadataByPluginId]);
const { orgUnitId } = useLocationQuery();

// Plugin related functionality and feedback
const { pluginValues } = usePluginValues(formId, metadataByPluginId, pluginContext);
Expand Down Expand Up @@ -39,6 +41,7 @@ export const FormFieldPlugin = (props: ContainerProps) => {

return (
<FormFieldPluginComponent
orgUnitId={orgUnitId}
pluginSource={pluginSource}
fieldsMetadata={formattedMetadata}
values={pluginValues}
Expand All @@ -50,3 +53,4 @@ export const FormFieldPlugin = (props: ContainerProps) => {
/>
);
};

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export type ComponentProps = {|
fieldsMetadata: MetadataByPluginId,
formSubmitted: boolean,
values: { [id: string]: any },
orgUnitId: string,
setFieldValue: (SetFieldValueProps) => void,
errors: { [id: string]: Array<string> },
warnings: { [id: string]: Array<string> },
Expand Down

0 comments on commit 7807410

Please sign in to comment.