Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) O3-4312: Add translation to start visit workspace title #2169

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/esm-patient-chart-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { esmPatientChartSchema } from './config-schema';
import genericDashboardComponent, { genericDashboardConfigSchema } from './side-nav/generic-dashboard.component';
import genericNavGroupComponent, { genericNavGroupConfigSchema } from './side-nav/generic-nav-group.component';
import { moduleName } from './constants';
import { setupOfflineVisitsSync, setupCacheableRoutes } from './offline';
import { summaryDashboardMeta, encountersDashboardMeta } from './dashboard.meta';
import { setupCacheableRoutes, setupOfflineVisitsSync } from './offline';
import { encountersDashboardMeta, summaryDashboardMeta } from './dashboard.meta';
import addPastVisitActionButtonComponent from './actions-buttons/add-past-visit.component';
import cancelVisitActionButtonComponent from './actions-buttons/cancel-visit.component';
import currentVisitSummaryComponent from './visit/visits-widget/current-visit-summary.component';
Expand All @@ -24,7 +24,6 @@ import patientChartPageComponent from './root.component';
import patientDetailsTileComponent from './patient-details-tile/patient-details-tile.component';
import startVisitActionButtonComponent from './actions-buttons/start-visit.component';
import startVisitActionButtonOnPatientSearch from './visit/start-visit-button.component';
import startVisitFormComponent from './visit/visit-form/visit-form.component';
import stopVisitActionButtonComponent from './actions-buttons/stop-visit.component';
import visitAttributeTagsComponent from './patient-banner-tags/visit-attribute-tags.component';

Expand Down Expand Up @@ -159,7 +158,8 @@ export const genericDashboard = getSyncLifecycle(genericDashboardComponent, {
moduleName,
});

export const startVisitForm = getSyncLifecycle(startVisitFormComponent, {
// t('startVisitWorkspaceTitle', 'Start a visit')
export const startVisitWorkspace = getAsyncLifecycle(() => import('./visit/visit-form/visit-form.workspace'), {
featureName: 'start-visit-form',
moduleName,
});
Expand Down
16 changes: 6 additions & 10 deletions packages/esm-patient-chart-app/src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,6 @@
"view": "visits"
}
},
{
"name": "start-visit-workspace-form",
"slot": "start-visit-workspace-form-slot",
"component": "startVisitForm",
"meta": {
"title": "Start a visit"
},
"online": true,
"offline": true
},
{
"name": "patient-details-tile",
"slot": "visit-form-header-slot",
Expand Down Expand Up @@ -248,6 +238,12 @@
"component": "markPatientDeceasedForm",
"title": "Mark patient deceased",
"type": "form"
},
{
"name": "start-visit-workspace-form",
"component": "startVisitWorkspace",
"title": "startVisitWorkspaceTitle",
"type": "start-visit"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
type FetchResponse,
getDefaultsFromConfigSchema,
saveVisit,
showSnackbar,
Expand All @@ -7,7 +8,6 @@ import {
useLocations,
usePatient,
useVisitTypes,
type FetchResponse,
type Visit,
} from '@openmrs/esm-framework';
import { render, screen } from '@testing-library/react';
Expand All @@ -16,10 +16,10 @@ import { mockLocations, mockVisitTypes, mockVisitWithAttributes } from '__mocks_
import dayjs from 'dayjs';
import React from 'react';
import { mockPatient } from 'tools';
import { esmPatientChartSchema, type ChartConfig } from '../../config-schema';
import { type ChartConfig, esmPatientChartSchema } from '../../config-schema';
import { useEmrConfiguration } from '../hooks/useEmrConfiguration';
import { useVisitAttributeType } from '../hooks/useVisitAttributeType';
import StartVisitForm from './visit-form.component';
import StartVisitForm from './visit-form.workspace';
import {
createVisitAttribute,
deleteVisitAttribute,
Expand Down
1 change: 1 addition & 0 deletions packages/esm-patient-chart-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"startNewVisit": "Start new visit",
"startVisit": "Start visit",
"startVisitError": "Error starting visit",
"startVisitWorkspaceTitle": "Start a visit",
"tests": "Tests",
"time": "Time",
"timeFormat ": "Time Format",
Expand Down
Loading