@openmrs/esm-appointments-app 5.2.2-pre.2421 → 5.2.2-pre.2430
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 +2 -2
- package/dist/755.js +1 -1
- package/dist/755.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-appointments-app.js.buildmanifest.json +6 -6
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/appointments/appointment-tabs.component.tsx +22 -14
- package/src/config-schema.ts +7 -0
- package/src/overlay.scss +0 -4
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"initial": true,
|
|
81
81
|
"entry": true,
|
|
82
82
|
"recorded": false,
|
|
83
|
-
"size":
|
|
83
|
+
"size": 4538674,
|
|
84
84
|
"sizes": {
|
|
85
85
|
"consume-shared": 252,
|
|
86
|
-
"javascript":
|
|
86
|
+
"javascript": 4517752,
|
|
87
87
|
"share-init": 252,
|
|
88
88
|
"runtime": 20418
|
|
89
89
|
},
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"auxiliaryFiles": [
|
|
101
101
|
"main.js.map"
|
|
102
102
|
],
|
|
103
|
-
"hash": "
|
|
103
|
+
"hash": "e2a5317e72ad4308",
|
|
104
104
|
"childrenByOrder": {}
|
|
105
105
|
},
|
|
106
106
|
{
|
|
@@ -422,9 +422,9 @@
|
|
|
422
422
|
"initial": false,
|
|
423
423
|
"entry": false,
|
|
424
424
|
"recorded": false,
|
|
425
|
-
"size":
|
|
425
|
+
"size": 480227,
|
|
426
426
|
"sizes": {
|
|
427
|
-
"javascript":
|
|
427
|
+
"javascript": 480059,
|
|
428
428
|
"consume-shared": 168
|
|
429
429
|
},
|
|
430
430
|
"names": [],
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
"auxiliaryFiles": [
|
|
439
439
|
"755.js.map"
|
|
440
440
|
],
|
|
441
|
-
"hash": "
|
|
441
|
+
"hash": "43422d9285aaa607",
|
|
442
442
|
"childrenByOrder": {}
|
|
443
443
|
},
|
|
444
444
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"}},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"early-appointments-panel","component":"earlyAppointments"}],"version":"5.2.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"}},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"early-appointments-panel","component":"earlyAppointments"}],"version":"5.2.2-pre.2430"}
|
package/package.json
CHANGED
|
@@ -6,6 +6,8 @@ import { useVisits } from '../hooks/useVisits';
|
|
|
6
6
|
import ScheduledAppointments from './scheduled/scheduled-appointments.component';
|
|
7
7
|
import UnscheduledAppointments from './unscheduled/unscheduled-appointments.component';
|
|
8
8
|
import styles from './appointment-tabs.scss';
|
|
9
|
+
import { ConfigObject } from '../config-schema';
|
|
10
|
+
import { useConfig } from '@openmrs/esm-framework';
|
|
9
11
|
|
|
10
12
|
interface AppointmentTabsProps {
|
|
11
13
|
appointmentServiceType: string;
|
|
@@ -17,26 +19,32 @@ const AppointmentTabs: React.FC<AppointmentTabsProps> = ({ appointmentServiceTyp
|
|
|
17
19
|
|
|
18
20
|
const { isLoading = false, visits = [], mutateVisit } = useVisits();
|
|
19
21
|
|
|
22
|
+
const { showUnscheduledAppointmentsTab } = useConfig<ConfigObject>();
|
|
23
|
+
|
|
20
24
|
const handleTabChange = ({ selectedIndex }: { selectedIndex: number }) => {
|
|
21
25
|
setActiveTabIndex(selectedIndex);
|
|
22
26
|
};
|
|
23
27
|
|
|
24
28
|
return (
|
|
25
29
|
<div className={styles.appointmentList} data-testid="appointment-list">
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
{showUnscheduledAppointmentsTab ? (
|
|
31
|
+
<Tabs selectedIndex={activeTabIndex} onChange={handleTabChange} className={styles.tabs}>
|
|
32
|
+
<TabList style={{ paddingLeft: '1rem' }} aria-label="Appointment tabs" contained>
|
|
33
|
+
<Tab className={styles.tab}>{t('scheduled', 'Scheduled')}</Tab>
|
|
34
|
+
<Tab className={styles.tab}>{t('unscheduled', 'Unscheduled')}</Tab>
|
|
35
|
+
</TabList>
|
|
36
|
+
<TabPanels>
|
|
37
|
+
<TabPanel className={styles.tabPanel}>
|
|
38
|
+
<ScheduledAppointments {...{ visits, isLoading, appointmentServiceType, mutateVisit }} />
|
|
39
|
+
</TabPanel>
|
|
40
|
+
<TabPanel className={styles.tabPanel}>
|
|
41
|
+
<UnscheduledAppointments />
|
|
42
|
+
</TabPanel>
|
|
43
|
+
</TabPanels>
|
|
44
|
+
</Tabs>
|
|
45
|
+
) : (
|
|
46
|
+
<ScheduledAppointments {...{ visits, isLoading, appointmentServiceType, mutateVisit }} />
|
|
47
|
+
)}
|
|
40
48
|
</div>
|
|
41
49
|
);
|
|
42
50
|
};
|
package/src/config-schema.ts
CHANGED
|
@@ -77,6 +77,12 @@ export const configSchema = {
|
|
|
77
77
|
_description: 'The name of the patient identifier type to be used for the patient identifier field',
|
|
78
78
|
_default: 'OpenMRS ID',
|
|
79
79
|
},
|
|
80
|
+
showUnscheduledAppointmentsTab: {
|
|
81
|
+
_type: Type.Boolean,
|
|
82
|
+
_description:
|
|
83
|
+
'Whether to show the Unscheduled Appointments tab. Note that configuring this to true requires a custom unscheduledAppointment endpoint not currently available',
|
|
84
|
+
_default: false,
|
|
85
|
+
},
|
|
80
86
|
};
|
|
81
87
|
|
|
82
88
|
export interface ConfigObject {
|
|
@@ -95,4 +101,5 @@ export interface ConfigObject {
|
|
|
95
101
|
defaultFacilityUrl: string;
|
|
96
102
|
customPatientChartUrl: string;
|
|
97
103
|
patientIdentifierType: string;
|
|
104
|
+
showUnscheduledAppointmentsTab: boolean;
|
|
98
105
|
}
|