@openmrs/esm-appointments-app 5.2.2-pre.2415 → 5.2.2-pre.2421

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.
@@ -80,10 +80,10 @@
80
80
  "initial": true,
81
81
  "entry": true,
82
82
  "recorded": false,
83
- "size": 4537825,
83
+ "size": 4538078,
84
84
  "sizes": {
85
85
  "consume-shared": 252,
86
- "javascript": 4516903,
86
+ "javascript": 4517156,
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": "3956ac44d3a6d972",
103
+ "hash": "ac877b5a25301695",
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": 479378,
425
+ "size": 479631,
426
426
  "sizes": {
427
- "javascript": 479210,
427
+ "javascript": 479463,
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": "eccfc4d268aed3a9",
441
+ "hash": "0c64e7e60f0b9c51",
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.2415"}
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.2421"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-appointments-app",
3
- "version": "5.2.2-pre.2415",
3
+ "version": "5.2.2-pre.2421",
4
4
  "description": "Appointments front-end module for the OpenMRS SPA",
5
5
  "browser": "dist/openmrs-esm-appointments-app.js",
6
6
  "main": "src/index.ts",
@@ -69,10 +69,17 @@ const ScheduledAppointments: React.FC<ScheduledAppointmentsProps> = ({ visits, a
69
69
  }
70
70
  }, [allowedExtensions, currentTab]);
71
71
 
72
+ const panelsToShow = scheduledAppointmentPanels.filter(shouldShowPanel);
73
+
72
74
  return (
73
75
  <>
74
- <ContentSwitcher className={styles.switcher} size="sm" onChange={({ name }) => setCurrentTab(name)}>
75
- {scheduledAppointmentPanels.filter(shouldShowPanel).map((panel) => {
76
+ <ContentSwitcher
77
+ className={styles.switcher}
78
+ size="sm"
79
+ onChange={({ name }) => setCurrentTab(name)}
80
+ selectedIndex={panelsToShow.findIndex((panel) => panel.name == currentTab) ?? 0}
81
+ selectionMode="manual">
82
+ {panelsToShow.map((panel) => {
76
83
  return <Switch key={`panel-${panel.name}`} name={panel.name} text={t(panel.config.title)} />;
77
84
  })}
78
85
  </ContentSwitcher>