From c55223fcc30d5a3ecb5a75effc3e1b5c7d496a46 Mon Sep 17 00:00:00 2001 From: pirupius Date: Tue, 12 Oct 2021 14:17:28 +0300 Subject: [PATCH 1/3] Add extension slot to context workspace header --- packages/esm-patient-chart-app/src/constants.ts | 1 + .../src/workspace/context-workspace.component.tsx | 3 ++- packages/esm-patient-chart-app/translations/en.json | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/esm-patient-chart-app/src/constants.ts b/packages/esm-patient-chart-app/src/constants.ts index 885939f9ce..c230e27a6d 100644 --- a/packages/esm-patient-chart-app/src/constants.ts +++ b/packages/esm-patient-chart-app/src/constants.ts @@ -4,3 +4,4 @@ export const dashboardPath = `${basePath}/:view?/:subview?`; export const spaBasePath = `${window.spaBase}${basePath}`; export const moduleName = '@openmrs/esm-patient-chart-app'; export const patientChartWorkspaceSlot = 'patient-chart-workspace-slot'; +export const patientChartWorkspaceHeaderSlot = 'patient-chart-workspace-header-slot'; diff --git a/packages/esm-patient-chart-app/src/workspace/context-workspace.component.tsx b/packages/esm-patient-chart-app/src/workspace/context-workspace.component.tsx index acc345d9c2..7acc577867 100644 --- a/packages/esm-patient-chart-app/src/workspace/context-workspace.component.tsx +++ b/packages/esm-patient-chart-app/src/workspace/context-workspace.component.tsx @@ -8,7 +8,7 @@ import { RouteComponentProps } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { Header, HeaderGlobalAction, HeaderGlobalBar, HeaderName } from 'carbon-components-react'; import { useWorkspace } from '../hooks/useWorkspace'; -import { patientChartWorkspaceSlot } from '../constants'; +import {patientChartWorkspaceHeaderSlot, patientChartWorkspaceSlot} from '../constants'; import { isDesktop } from '../utils'; import { useContextWorkspace } from '../hooks/useContextWindowSize'; import { ScreenModeTypes } from '../types'; @@ -54,6 +54,7 @@ const ContextWorkspace: React.FC> =
{title} + { size === ScreenModeTypes.maximize diff --git a/packages/esm-patient-chart-app/translations/en.json b/packages/esm-patient-chart-app/translations/en.json index fa584444aa..91afea33ed 100644 --- a/packages/esm-patient-chart-app/translations/en.json +++ b/packages/esm-patient-chart-app/translations/en.json @@ -1,10 +1,12 @@ { + "activeWorkspaceText": "", "addPastVisit": "Add past visit", "addPastVisitText": "You can add past visit, update past visit or add new past visit, Click on one of the buttons below", "all": "All", "allEncounters": "All Encounters", "cancel": "Cancel", "careActivities": "Care Activities", + "closeCurrent": "Open new form", "date": "Date", "dateAndTimeOfVisit": "Date and time of visit", "diagnoses": "Diagnoses", @@ -43,6 +45,7 @@ "startVisit": "Start visit", "startVisitError": "Error starting current visit", "startVisitSuccessfully": "Visit has been started successfully", + "startVisitTypeError": "No Visit Type selected", "tests": "Tests", "thereIsNoInformationToDisplayHere": "There is no information to display here", "time": "Time", @@ -50,5 +53,6 @@ "visitEndSuccessfully": "Ended current visit successfully", "visitLocation": "Visit Location", "visitSummary": "Visit Summary", - "visitType": "Visit type" + "visitType": "Visit type", + "workspaceNotificationHelperText": "" } From aec52e1677ee3f61bb2f92919d552cb0f7dbb6b1 Mon Sep 17 00:00:00 2001 From: pirupius Date: Tue, 12 Oct 2021 14:20:14 +0300 Subject: [PATCH 2/3] fix linting --- .../src/workspace/context-workspace.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/esm-patient-chart-app/src/workspace/context-workspace.component.tsx b/packages/esm-patient-chart-app/src/workspace/context-workspace.component.tsx index 7acc577867..11169095f4 100644 --- a/packages/esm-patient-chart-app/src/workspace/context-workspace.component.tsx +++ b/packages/esm-patient-chart-app/src/workspace/context-workspace.component.tsx @@ -8,7 +8,7 @@ import { RouteComponentProps } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { Header, HeaderGlobalAction, HeaderGlobalBar, HeaderName } from 'carbon-components-react'; import { useWorkspace } from '../hooks/useWorkspace'; -import {patientChartWorkspaceHeaderSlot, patientChartWorkspaceSlot} from '../constants'; +import { patientChartWorkspaceHeaderSlot, patientChartWorkspaceSlot } from '../constants'; import { isDesktop } from '../utils'; import { useContextWorkspace } from '../hooks/useContextWindowSize'; import { ScreenModeTypes } from '../types'; From d246bbdcc346a30f86a35a249ce63fafe70f6d69 Mon Sep 17 00:00:00 2001 From: Brandon Istenes Date: Wed, 20 Oct 2021 12:52:02 -0700 Subject: [PATCH 3/3] Remove changes to translations/en.json --- packages/esm-patient-chart-app/translations/en.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/esm-patient-chart-app/translations/en.json b/packages/esm-patient-chart-app/translations/en.json index 91afea33ed..fa584444aa 100644 --- a/packages/esm-patient-chart-app/translations/en.json +++ b/packages/esm-patient-chart-app/translations/en.json @@ -1,12 +1,10 @@ { - "activeWorkspaceText": "", "addPastVisit": "Add past visit", "addPastVisitText": "You can add past visit, update past visit or add new past visit, Click on one of the buttons below", "all": "All", "allEncounters": "All Encounters", "cancel": "Cancel", "careActivities": "Care Activities", - "closeCurrent": "Open new form", "date": "Date", "dateAndTimeOfVisit": "Date and time of visit", "diagnoses": "Diagnoses", @@ -45,7 +43,6 @@ "startVisit": "Start visit", "startVisitError": "Error starting current visit", "startVisitSuccessfully": "Visit has been started successfully", - "startVisitTypeError": "No Visit Type selected", "tests": "Tests", "thereIsNoInformationToDisplayHere": "There is no information to display here", "time": "Time", @@ -53,6 +50,5 @@ "visitEndSuccessfully": "Ended current visit successfully", "visitLocation": "Visit Location", "visitSummary": "Visit Summary", - "visitType": "Visit type", - "workspaceNotificationHelperText": "" + "visitType": "Visit type" }