Skip to content

Commit

Permalink
(refactor) O3-3012: Switch registering appointments form workspace ba… (
Browse files Browse the repository at this point in the history
  • Loading branch information
mogoodrich authored and senthil-athiban committed Apr 15, 2024
1 parent 12d4454 commit 47e0fad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/esm-appointments-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ import {
getAsyncLifecycle,
getSyncLifecycle,
registerBreadcrumbs,
translateFrom,
} from '@openmrs/esm-framework';
import { configSchema } from './config-schema';
import { createDashboardLink } from './createDashboardLink.component';
import {
createDashboardLink as createPatientChartDashboardLink,
registerWorkspace,
} from '@openmrs/esm-patient-common-lib';
import { createDashboardLink as createPatientChartDashboardLink } from '@openmrs/esm-patient-common-lib';
import { dashboardMeta, appointmentCalendarDashboardMeta, patientChartDashboardMeta } from './dashboard.meta';
import {
cancelledAppointmentsPanelConfigSchema,
Expand Down Expand Up @@ -104,8 +100,4 @@ export const patientAppointmentsCancelConfirmationDialog = getAsyncLifecycle(
options,
);

registerWorkspace({
name: 'appointments-form-workspace',
load: getAsyncLifecycle(() => import('./form/appointments-form.component'), options),
title: translateFrom(moduleName, 'createNewAppointment', 'Create new appointment'),
});
export const appointmentsFormWorkspace = getAsyncLifecycle(() => import('./form/appointments-form.component'), options);
10 changes: 10 additions & 0 deletions packages/esm-appointments-app/src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@
"name": "early-appointments-panel",
"component": "earlyAppointments"
},
{
"name": "appointments-form-workspace",
"component": "appointmentsFormWorkspace",
"meta": {
"title": {
"key": "createNewAppointment",
"default": "Create new appointment"
}
}
},
{
"name": "patient-appointments-summary-dashboard",
"component": "patientAppointmentsSummaryDashboardLink",
Expand Down
1 change: 1 addition & 0 deletions packages/esm-appointments-app/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface AppointmentLocation {
name: string;
}

// TODO: remove interface elements that aren't actually present on the Appointment object returned from the Appointment API
export interface Appointment {
appointmentKind: string;
appointmentNumber: string;
Expand Down

0 comments on commit 47e0fad

Please # to comment.