Skip to content

Commit

Permalink
fix: [DHIS2-17089] replace "Registering unit" text with "Organisation…
Browse files Browse the repository at this point in the history
… unit" text (#3583)
  • Loading branch information
simonadomnisoru authored May 29, 2024
1 parent a99c17f commit 7a0c380
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 35 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/NewPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Given('you are in the registration page with Ngelehun CHC org unit selected', ()

And('there should be informative message explaining you need to select an organisation unit', () => {
cy.get('[data-test="informative-paper"]')
.contains('Choose a registering unit to start reporting')
.contains('Choose an organisation unit to start reporting')
.should('exist');
});

Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/ScopeSelector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ const selectedChildProgram = ['Program', 'Child Programme'];
const selectedMalariaProgram = ['Program', 'Malaria case diagnosis'];
const selectedEventProgram = ['Program', 'Antenatal care visit'];
const emptyProgramSelection = ['Program', 'Choose a program'];
const selectedOrgUnit = ['Registering unit', 'Taninahun (Malen) CHP'];
const emptyOrgUnitSelection = ['Choose a registering unit'];
const selectedOrgUnit = ['Organisation unit', 'Taninahun (Malen) CHP'];
const emptyOrgUnitSelection = ['Choose an organisation unit'];
const selectedTei = ['Person', 'Carlos Cruz'];
const selectedEnrollment = ['Enrollment', `${getCurrentYear() + 1}-07-01 12:05`];

Expand Down Expand Up @@ -294,7 +294,7 @@ And('you see the enrollment event Edit page but there is no org unit id in the u

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 a registering unit to start reporting');
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', () => {
Expand Down Expand Up @@ -370,7 +370,7 @@ When('you select org unit that is incompatible with the already selected program

Then('you can see message on the scope selector', () => {
cy.get('[data-test="error-message-handler"]')
.contains('Selected program is invalid for selected registering unit');
.contains('Selected program is invalid for selected organisation unit');
cy.get('[data-test="program-selector-container-clear-icon"]')
.click();
cy.get('[data-test="program-selector-container"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ And the list should display teis with John as the first name
And rows per page should be set to 15
And for a tracker program the page navigation should show that you are on the first page

Scenario: Show the registering unit column
Scenario: Show the organisation unitt column
Given you open the main page with Ngelehun and child programme context
When you open the column selector
And you select the registering unit and save from the column selector
Then the registering unit should display in the list
And you select the organisation unit and save from the column selector
Then the organisation unit should display in the list

Scenario: Show next page
Given you open the main page with Ngelehun and child programme context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ When('you open the column selector', () => {
.click();
});

When('you select the registering unit and save from the column selector', () => {
When('you select the organisation unit and save from the column selector', () => {
cy.get('aside[role="dialog"]')
.contains('Registering unit')
.contains('Organisation unit')
.find('input')
.click();

Expand All @@ -256,9 +256,9 @@ When('you select the registering unit and save from the column selector', () =>
.click();
});

Then('the registering unit should display in the list', () => {
Then('the organisation unit should display in the list', () => {
cy.get('[data-test="online-list-table"]')
.contains('Registering unit')
.contains('Organisation unit')
.should('exist');
});

Expand Down
2 changes: 1 addition & 1 deletion docs/user/using-the-capture-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ Depending on the status of events, there can be additional information regarding

![](resources/images/enrollment-dash-stages-events-03.png)

When you expand the list, you will see the table contains the data of events in the stage. This includes mandatory columns: `Status`, `Report date` and `Registering unit`, the following columns depend on the data elements that have been selected as `Display in list` of event.
When you expand the list, you will see the table contains the data of events in the stage. This includes mandatory columns: `Status`, `Report date` and `Organization unit`, the following columns depend on the data elements that have been selected as `Display in list` of event.

Events are sorted with most recent on top and other columns are also sortable.

Expand Down
19 changes: 8 additions & 11 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,8 @@ msgstr "Could not get organisation unit"
msgid "Program doesn't exist"
msgstr "Program doesn't exist"

msgid "Selected program is invalid for selected registering unit"
msgstr "Selected program is invalid for selected registering unit"
msgid "Selected program is invalid for selected organisation unit"
msgstr "Selected program is invalid for selected organisation unit"

msgid "Online"
msgstr "Online"
Expand Down Expand Up @@ -786,8 +786,8 @@ 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 a registering unit to start reporting"
msgstr "Choose a registering unit to start reporting"
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"
Expand Down Expand Up @@ -996,11 +996,8 @@ msgstr "Add relationship"
msgid "No results found for "
msgstr "No results found for "

msgid "Registering unit"
msgstr "Registering unit"

msgid "Choose a registering unit"
msgstr "Choose a registering unit"
msgid "Choose an organisation unit"
msgstr "Choose an organisation unit"

msgid "Clear selection"
msgstr "Clear selection"
Expand All @@ -1011,8 +1008,8 @@ msgstr "No programs available."
msgid "Search for a program"
msgstr "Search for a program"

msgid "Some programs are being filtered by the chosen registering unit"
msgstr "Some programs are being filtered by the chosen registering unit"
msgid "Some programs are being filtered by the chosen organisation unit"
msgstr "Some programs are being filtered by the chosen organisation unit"

msgid "Show all programs"
msgstr "Show all programs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const validateSelectionsBasedOnUrlUpdateEpic = (action$: InputObservable)
}

if (orgUnitId && !program.organisationUnits[orgUnitId]) {
return invalidSelectionsFromUrl(i18n.t('Selected program is invalid for selected registering unit'));
return invalidSelectionsFromUrl(i18n.t('Selected program is invalid for selected organisation unit'));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const EnrollmentAddEventPagePain = ({
if (!orgUnitId) {
return (
<IncompleteSelectionsMessage>
{i18n.t('Choose a registering unit to start reporting')}
{i18n.t('Choose an organisation unit to start reporting')}
</IncompleteSelectionsMessage>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const NewPagePlain = ({
newPageStatus === newPageStatuses.WITHOUT_ORG_UNIT_SELECTED &&
<>
<IncompleteSelectionsMessage>
{i18n.t('Choose a registering unit to start reporting')}
{i18n.t('Choose an organisation unit to start reporting')}
</IncompleteSelectionsMessage>
<Button
dataTest="new-page-cancel-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './searchOrgUnitSelector.actions';


const RETRIEVE_ERROR = 'Could not retrieve registering unit list';
const RETRIEVE_ERROR = 'Could not retrieve organisation unit list';


const isInitializeTeiSearch = (action: Object, searchId: string) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const WidgetEventEditWrapper = ({ pageStatus, ...passOnProps }: WidgetPro
if (pageStatus === pageStatuses.WITHOUT_ORG_UNIT_SELECTED) {
return (
<IncompleteSelectionsMessage>
{i18n.t('Choose a registering unit to start reporting')}
{i18n.t('Choose an organisation unit to start reporting')}
</IncompleteSelectionsMessage>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class OrgUnitSelectorPlain extends Component<Props, State> {

return (
<SelectorBarItem
label={i18n.t('Registering unit')}
noValueMessage={i18n.t('Choose a registering unit')}
label={i18n.t('Organisation unit')}
noValueMessage={i18n.t('Choose an organisation unit')}
value={selectedOrgUnitId ? selectedOrgUnit?.name : ''}
open={this.state.open}
setOpen={open => this.setState({ open })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const ProgramListPlain = ({ programOptions, programsArray, onChange, onResetOrgU
<>
<MenuDivider />
<div className={classes.filterWarning}>
<span>{i18n.t('Some programs are being filtered by the chosen registering unit')}</span>
<span>{i18n.t('Some programs are being filtered by the chosen organisation unit')}</span>
<Button small secondary onClick={() => onResetOrgUnit()}>
{i18n.t('Show all programs')}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './searchOrgUnitSelector.actions';


const RETRIEVE_ERROR = 'Could not retrieve registering unit list';
const RETRIEVE_ERROR = 'Could not retrieve organisation unit list';


const isInitializeTeiSearch = (action: Object, searchId: string) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const getBaseColumnHeaders = props => [
{ header: i18n.t('Status'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true },
{ header: props.formFoundation.getLabel('occurredAt'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true },
{ header: i18n.t('Assigned to'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true },
{ header: i18n.t('Registering unit'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true },
{ header: i18n.t('Organisation unit'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true },
{ header: props.formFoundation.getLabel('scheduledAt'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true },
{ header: '', sortDirection: null, isPredefined: true },
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getMainConfig = (hasDisplayInReportsAttributes: boolean): Array<MainColumn
id: 'orgUnit',
visible: false,
type: dataElementTypes.ORGANISATION_UNIT,
header: i18n.t('Registering unit'),
header: i18n.t('Organisation unit'),
},
{
id: 'createdAt',
Expand Down

0 comments on commit 7a0c380

Please sign in to comment.