@openmrs/esm-appointments-app 9.2.1-pre.7279 → 9.2.1-pre.7288
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/dist/1431.js +1 -1
- package/dist/1431.js.map +1 -1
- package/dist/3092.js +1 -1
- package/dist/3092.js.map +1 -1
- package/dist/4889.js +1 -1
- package/dist/4889.js.map +1 -1
- package/dist/525.js +1 -1
- package/dist/525.js.map +1 -1
- package/dist/7026.js +1 -1
- package/dist/7026.js.map +1 -1
- package/dist/openmrs-esm-appointments-app.js.buildmanifest.json +15 -15
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/appointments/common-components/appointments-table.component.tsx +3 -3
- package/src/form/appointments-form.test.tsx +56 -35
- package/src/form/appointments-form.workspace.tsx +427 -419
- package/src/metrics/metrics-header.component.tsx +2 -2
- package/src/patient-appointments/patient-appointments-action-menu.component.tsx +3 -3
- package/src/patient-appointments/patient-appointments-base.component.tsx +4 -4
- package/src/patient-search/patient-search.component.tsx +2 -2
- package/src/routes.json +14 -3
|
@@ -4,7 +4,7 @@ import isToday from 'dayjs/plugin/isToday';
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { Calendar, Hospital } from '@carbon/react/icons';
|
|
6
6
|
import { Button } from '@carbon/react';
|
|
7
|
-
import { ExtensionSlot, isDesktop,
|
|
7
|
+
import { ExtensionSlot, isDesktop, launchWorkspace2, navigate, useLayoutType } from '@openmrs/esm-framework';
|
|
8
8
|
import { spaHomePage } from '../constants';
|
|
9
9
|
import { useAppointmentsStore } from '../store';
|
|
10
10
|
import styles from './metrics-header.scss';
|
|
@@ -24,7 +24,7 @@ const MetricsHeader: React.FC = () => {
|
|
|
24
24
|
mutate: () => {}, // TODO get this to mutate properly
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
launchWorkspace2('appointments-form-workspace', { ...props });
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Layer, OverflowMenu, OverflowMenuItem } from '@carbon/react';
|
|
4
|
-
import {
|
|
4
|
+
import { launchWorkspace2, showModal, useLayoutType } from '@openmrs/esm-framework';
|
|
5
5
|
import type { Appointment } from '../types';
|
|
6
6
|
import styles from './patient-appointments-action-menu.scss';
|
|
7
7
|
|
|
@@ -15,10 +15,10 @@ export const PatientAppointmentsActionMenu = ({ appointment, patientUuid }: appo
|
|
|
15
15
|
const isTablet = useLayoutType() === 'tablet';
|
|
16
16
|
|
|
17
17
|
const handleLaunchEditAppointmentForm = () => {
|
|
18
|
-
|
|
18
|
+
launchWorkspace2('appointments-form-workspace', {
|
|
19
19
|
appointment,
|
|
20
20
|
context: 'editing',
|
|
21
|
-
|
|
21
|
+
patientUuid,
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -3,7 +3,7 @@ import dayjs from 'dayjs';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { Button, ContentSwitcher, DataTableSkeleton, InlineLoading, Layer, Switch, Tile } from '@carbon/react';
|
|
5
5
|
import { Add } from '@carbon/react/icons';
|
|
6
|
-
import {
|
|
6
|
+
import { launchWorkspace2, useLayoutType } from '@openmrs/esm-framework';
|
|
7
7
|
import { CardHeader, EmptyDataIllustration, ErrorState } from '@openmrs/esm-patient-common-lib';
|
|
8
8
|
import { usePatientAppointments } from './patient-appointments.resource';
|
|
9
9
|
import { PatientAppointmentContextTypes, usePatientAppointmentContext } from '../hooks/patient-appointment-context';
|
|
@@ -44,14 +44,14 @@ const PatientAppointmentsBase: React.FC<PatientAppointmentsBaseProps> = ({ patie
|
|
|
44
44
|
if (
|
|
45
45
|
(patientAppointmentContext as PatientAppointmentContextTypes) === PatientAppointmentContextTypes.PATIENT_CHART
|
|
46
46
|
) {
|
|
47
|
-
|
|
47
|
+
launchWorkspace2('appointments-form-workspace', {
|
|
48
48
|
context: 'creating',
|
|
49
|
+
patientUuid,
|
|
49
50
|
});
|
|
50
51
|
} else {
|
|
51
|
-
|
|
52
|
+
launchWorkspace2('appointments-form-workspace', {
|
|
52
53
|
context: 'creating',
|
|
53
54
|
patientUuid,
|
|
54
|
-
workspaceTitle: t('createNewAppointment', 'Create new appointment'),
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ExtensionSlot,
|
|
2
|
+
import { ExtensionSlot, launchWorkspace2 } from '@openmrs/esm-framework';
|
|
3
3
|
import styles from './patient-search.scss';
|
|
4
4
|
|
|
5
5
|
const PatientSearch: React.FC = () => {
|
|
@@ -10,7 +10,7 @@ const PatientSearch: React.FC = () => {
|
|
|
10
10
|
mutate: () => {}, // TODO get this to mutate properly
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
launchWorkspace2('appointments-form-workspace', { ...props });
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
return (
|
package/src/routes.json
CHANGED
|
@@ -135,12 +135,23 @@
|
|
|
135
135
|
"component": "cancelAppointmentModal"
|
|
136
136
|
}
|
|
137
137
|
],
|
|
138
|
-
"
|
|
138
|
+
"workspaces2": [
|
|
139
139
|
{
|
|
140
140
|
"name": "appointments-form-workspace",
|
|
141
141
|
"component": "appointmentsFormWorkspace",
|
|
142
|
-
"
|
|
143
|
-
|
|
142
|
+
"window": "appointments-form-window"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"workspaceWindows2": [
|
|
146
|
+
{
|
|
147
|
+
"name": "appointments-form-window",
|
|
148
|
+
"group": "appointmentsFormWorkspaceGroup"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"workspaceGroups2": [
|
|
152
|
+
{
|
|
153
|
+
"name": "appointmentsFormWorkspaceGroup",
|
|
154
|
+
"overlay": false
|
|
144
155
|
}
|
|
145
156
|
]
|
|
146
157
|
}
|