diff --git a/i18n/en.pot b/i18n/en.pot
index 61c515fbca..162da26bd4 100644
--- a/i18n/en.pot
+++ b/i18n/en.pot
@@ -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-10-25T18:18:11.518Z\n"
-"PO-Revision-Date: 2024-10-25T18:18:11.518Z\n"
+"POT-Creation-Date: 2024-11-05T09:50:50.070Z\n"
+"PO-Revision-Date: 2024-11-05T09:50:50.070Z\n"
msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
@@ -1493,26 +1493,20 @@ msgstr "{{ scheduledEvents }} scheduled"
msgid "Stages and Events"
msgstr "Stages and Events"
-msgid "Referral details"
-msgstr "Referral details"
-
msgid "View linked event"
msgstr "View linked event"
msgid "An error occurred while loading the widget."
msgstr "An error occurred while loading the widget."
-msgid "Refferal response"
-msgstr "Refferal response"
-
msgid "Linked event"
msgstr "Linked event"
msgid ""
-"This refferal response event is linked to a Refferal details event. Review "
+"This {{stageName}} event is linked to a {{linkedStageName}} event. Review "
"the linked event details before entering data below"
msgstr ""
-"This refferal response event is linked to a Refferal details event. Review "
+"This {{stageName}} event is linked to a {{linkedStageName}} event. Review "
"the linked event details before entering data below"
msgid "Scheduled"
diff --git a/src/core_modules/capture-core/components/Pages/common/EnrollmentOverviewDomain/EnrollmentPageLayout/DefaultEnrollmentLayout.types.js b/src/core_modules/capture-core/components/Pages/common/EnrollmentOverviewDomain/EnrollmentPageLayout/DefaultEnrollmentLayout.types.js
index 922a2071fc..cbb1bea87a 100644
--- a/src/core_modules/capture-core/components/Pages/common/EnrollmentOverviewDomain/EnrollmentPageLayout/DefaultEnrollmentLayout.types.js
+++ b/src/core_modules/capture-core/components/Pages/common/EnrollmentOverviewDomain/EnrollmentPageLayout/DefaultEnrollmentLayout.types.js
@@ -8,7 +8,6 @@ type DefaultComponents = 'QuickActions'
| 'AssigneeWidget'
| 'NewEventWorkspace'
| 'EditEventWorkspace'
- | 'TwoEventWorkspace'
| 'EnrollmentNote'
| 'EventNote'
| 'TrackedEntityRelationship'
diff --git a/src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js b/src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js
index 1d31384c01..8dbb57dd44 100644
--- a/src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js
+++ b/src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js
@@ -112,6 +112,7 @@ export const WidgetEventEditPlain = ({
programId={programId}
orgUnitId={orgUnitId}
stageId={stageId}
+ stage={stage}
/>
{
- if (type === WidgetTwoEventWorkspaceWrapperTypes.EDIT_EVENT) {
- return i18n.t('Referral details');
- }
- return stage.name;
-};
-
-const WidgetHeaderPlain = ({ stage, linkedEvent, orgUnitId, currentPage, type, classes }: Props) => {
+const WidgetHeaderPlain = ({ linkedStage, linkedEvent, orgUnitId, currentPage, classes }: Props) => {
const [actionsIsOpen, setActionsIsOpen] = useState(false);
const { push } = useHistory();
- const { icon } = stage;
- const title = getTitle({ type, stage });
-
+ const { icon } = linkedStage;
return (
<>
{icon && (
@@ -48,7 +38,7 @@ const WidgetHeaderPlain = ({ stage, linkedEvent, orgUnitId, currentPage, type, c
/>
)}
- {title}
+ {linkedStage.name}
{currentPage === EnrollmentPageKeys.VIEW_EVENT && (
| string,
- type?: $Values,
|};
export type Props = {|
diff --git a/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.container.js b/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.container.js
index 2b257c3f22..645f84064a 100644
--- a/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.container.js
+++ b/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.container.js
@@ -15,6 +15,7 @@ export const WidgetTwoEventWorkspace = ({
programId,
orgUnitId,
currentPage,
+ stage,
type,
}: Props) => {
const {
@@ -26,7 +27,7 @@ export const WidgetTwoEventWorkspace = ({
const {
formFoundation,
- stage,
+ stage: linkedStage,
isLoading: isLoadingMetadata,
isError: isMetadataError,
} = useMetadataForProgramStage({
@@ -56,22 +57,23 @@ export const WidgetTwoEventWorkspace = ({
);
}
- if (!linkedEvent || !formFoundation || !stage) {
+ if (!linkedEvent || !formFoundation || !linkedStage) {
return null;
}
return (
}
noncollapsible
diff --git a/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.types.js b/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.types.js
index 59b50aca9a..c79a68c5d5 100644
--- a/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.types.js
+++ b/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.types.js
@@ -3,6 +3,7 @@ import {
EnrollmentPageKeys,
} from '../Pages/common/EnrollmentOverviewDomain/EnrollmentPageLayout/DefaultEnrollmentLayout.constants';
import { WidgetTwoEventWorkspaceWrapperTypes } from './index';
+import type { ProgramStage } from '../../metaData';
export type Props = {|
programId: string,
@@ -10,6 +11,7 @@ export type Props = {|
orgUnitId: string,
stageId: string,
currentPage: $Values | string,
+ stage?: ProgramStage,
type?: $Values,
|}
diff --git a/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetWrapper/WidgetWrapper.container.js b/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetWrapper/WidgetWrapper.container.js
index d740486392..c25a8e618c 100644
--- a/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetWrapper/WidgetWrapper.container.js
+++ b/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetWrapper/WidgetWrapper.container.js
@@ -39,11 +39,11 @@ const styles = {
},
};
-const WidgetWrapperPlain = ({ widget, type, classes }: Props) => {
+const WidgetWrapperPlain = ({ widget, type, stage, linkedStage, classes }: Props) => {
if (type === WidgetTwoEventWorkspaceWrapperTypes.EDIT_EVENT) {
return (
-
{i18n.t('Refferal response')}
+
{stage?.name}
@@ -53,7 +53,12 @@ const WidgetWrapperPlain = ({ widget, type, classes }: Props) => {
{i18n.t(
- 'This refferal response event is linked to a Refferal details event. Review the linked event details before entering data below',
+ 'This {{stageName}} event is linked to a {{linkedStageName}} event. Review the linked event details before entering data below',
+ {
+ linkedStageName: linkedStage?.name,
+ stageName: stage?.name,
+ interpolation: { escapeValue: false },
+ },
)}
{widget}
diff --git a/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetWrapper/WidgetWrapper.types.js b/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetWrapper/WidgetWrapper.types.js
index 43d6370b59..ae72f04aa3 100644
--- a/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetWrapper/WidgetWrapper.types.js
+++ b/src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetWrapper/WidgetWrapper.types.js
@@ -1,8 +1,11 @@
// @flow
import { WidgetTwoEventWorkspaceWrapperTypes } from '../index';
+import type { ProgramStage } from '../../../metaData';
type PlainProps = {|
widget: any,
+ linkedStage: ProgramStage,
+ stage?: ProgramStage,
type?: $Values
,
|};