diff --git a/CHANGELOG.md b/CHANGELOG.md index c4054510d8..f5540c833b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/cypress/integration/WorkingLists/TeiWorkingLists/TeiWorkingListsUser.feature b/cypress/integration/WorkingLists/TeiWorkingLists/TeiWorkingListsUser.feature index 8059bed14d..fe69bbc858 100644 --- a/cypress/integration/WorkingLists/TeiWorkingLists/TeiWorkingListsUser.feature +++ b/cypress/integration/WorkingLists/TeiWorkingLists/TeiWorkingListsUser.feature @@ -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 diff --git a/cypress/integration/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/index.js b/cypress/integration/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/index.js index 6426baf38c..dedb6cd458 100644 --- a/cypress/integration/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/index.js +++ b/cypress/integration/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/index.js @@ -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(); }); @@ -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"]') diff --git a/i18n/zh.po b/i18n/zh.po index c3053636d4..77abc5059a 100644 --- a/i18n/zh.po +++ b/i18n/zh.po @@ -758,7 +758,7 @@ msgid "Refer" msgstr "转诊" msgid "You can't add any more {{ programStageName }} events" -msgstr "" +msgstr "您无法添加更多的 {{ programStageName }} 事件" msgid "Cancel without saving" msgstr "取消而不保存" @@ -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 "报名日期" diff --git a/package.json b/package.json index a1598cb52f..9acdd9c1cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "capture-app", "homepage": ".", - "version": "100.39.3", + "version": "100.40.0", "cacheVersion": "5", "serverVersion": "38", "license": "BSD-3-Clause", @@ -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", diff --git a/packages/rules-engine/package.json b/packages/rules-engine/package.json index dfeccd586a..c3b109cd88 100644 --- a/packages/rules-engine/package.json +++ b/packages/rules-engine/package.json @@ -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": { diff --git a/src/core_modules/capture-core/components/D2Form/FormFieldPlugin/FormFieldPlugin.container.js b/src/core_modules/capture-core/components/D2Form/FormFieldPlugin/FormFieldPlugin.container.js index 7f4b193646..65e4cf82e8 100644 --- a/src/core_modules/capture-core/components/D2Form/FormFieldPlugin/FormFieldPlugin.container.js +++ b/src/core_modules/capture-core/components/D2Form/FormFieldPlugin/FormFieldPlugin.container.js @@ -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); @@ -39,6 +41,7 @@ export const FormFieldPlugin = (props: ContainerProps) => { return ( { /> ); }; + diff --git a/src/core_modules/capture-core/components/D2Form/FormFieldPlugin/FormFieldPlugin.types.js b/src/core_modules/capture-core/components/D2Form/FormFieldPlugin/FormFieldPlugin.types.js index 3aa8638400..9a97d2e42a 100644 --- a/src/core_modules/capture-core/components/D2Form/FormFieldPlugin/FormFieldPlugin.types.js +++ b/src/core_modules/capture-core/components/D2Form/FormFieldPlugin/FormFieldPlugin.types.js @@ -64,6 +64,7 @@ export type ComponentProps = {| fieldsMetadata: MetadataByPluginId, formSubmitted: boolean, values: { [id: string]: any }, + orgUnitId: string, setFieldValue: (SetFieldValueProps) => void, errors: { [id: string]: Array }, warnings: { [id: string]: Array },