@openmrs/esm-appointments-app 5.2.2-pre.2472 → 5.2.2-pre.2476

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": 4540154,
83
+ "size": 4540397,
84
84
  "sizes": {
85
85
  "consume-shared": 252,
86
- "javascript": 4519232,
86
+ "javascript": 4519475,
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": "8db044c6c08fa3e0",
103
+ "hash": "117e8332ed2299b9",
104
104
  "childrenByOrder": {}
105
105
  },
106
106
  {
@@ -490,9 +490,9 @@
490
490
  "initial": false,
491
491
  "entry": false,
492
492
  "recorded": false,
493
- "size": 481707,
493
+ "size": 481950,
494
494
  "sizes": {
495
- "javascript": 481539,
495
+ "javascript": 481782,
496
496
  "consume-shared": 168
497
497
  },
498
498
  "names": [],
@@ -506,7 +506,7 @@
506
506
  "auxiliaryFiles": [
507
507
  "799.js.map"
508
508
  ],
509
- "hash": "670fa029277adced",
509
+ "hash": "8f3a6751323bfc34",
510
510
  "childrenByOrder": {}
511
511
  },
512
512
  {
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.2472"}
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.2476"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-appointments-app",
3
- "version": "5.2.2-pre.2472",
3
+ "version": "5.2.2-pre.2476",
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",
@@ -8,6 +8,7 @@ import { showNotification, showToast, useLocations } from '@openmrs/esm-framewor
8
8
  import type { AppointmentService } from '../../types';
9
9
  import { closeOverlay } from '../../hooks/useOverlay';
10
10
  import styles from './appointment-services.scss';
11
+ import { appointmentLocationTagName } from '../../constants';
11
12
 
12
13
  interface AppointmentServicesProps {}
13
14
 
@@ -15,7 +16,7 @@ const AppointmentServices: React.FC<AppointmentServicesProps> = () => {
15
16
  const { t } = useTranslation();
16
17
  const { appointmentServiceInitialValue, addNewAppointmentService } = useAppointmentServices();
17
18
 
18
- const locations = useLocations();
19
+ const locations = useLocations(appointmentLocationTagName);
19
20
  const handleSubmit = async (values: AppointmentService, helpers: FormikHelpers<AppointmentService>) => {
20
21
  const payload = {
21
22
  name: values.name,
@@ -28,7 +28,6 @@ import {
28
28
  Toggle,
29
29
  } from '@carbon/react';
30
30
  import {
31
- type ConfigObject,
32
31
  ExtensionSlot,
33
32
  showNotification,
34
33
  showToast,
@@ -55,6 +54,8 @@ import { useInitialAppointmentFormValue, type PatientAppointment } from '../useI
55
54
  import LocationSelectOption from '../../common-components/location-select-option.component';
56
55
  import WorkloadCard from '../workload.component';
57
56
  import styles from './appointments-form.scss';
57
+ import { appointmentLocationTagName } from '../../../constants';
58
+ import { type ConfigObject } from '../../../config-schema';
58
59
 
59
60
  interface AppointmentFormProps {
60
61
  appointment?: MappedAppointment;
@@ -67,7 +68,7 @@ const AppointmentForm: React.FC<AppointmentFormProps> = ({ appointment, patientU
67
68
  const { defaultFacility, isLoading: loadingDefaultFacility } = useDefaultLoginLocation();
68
69
  const { providers } = useProviders();
69
70
  const { services } = useServices();
70
- const locations = useLocations();
71
+ const locations = useLocations(appointmentLocationTagName);
71
72
  const sessionUser = useSession();
72
73
  const isTablet = useLayoutType() === 'tablet';
73
74
  const initialAppointmentFormValues = useInitialAppointmentFormValue(appointment, patientUuid);
package/src/constants.ts CHANGED
@@ -2,3 +2,4 @@ export const spaRoot = window['getOpenmrsSpaBase'];
2
2
  export const basePath = '/appointments';
3
3
  export const spaBasePath = `${window.spaBase}/home`;
4
4
  export const omrsDateFormat = 'YYYY-MM-DDTHH:mm:ss.SSSZZ';
5
+ export const appointmentLocationTagName = 'Appointment Location';
@@ -45,6 +45,7 @@ import { useAppointments } from '../../appointments/appointments-table.resource'
45
45
  import { useDefaultLoginLocation } from '../../hooks/useDefaultLocation';
46
46
  import { useVisits } from '../../hooks/useVisits';
47
47
  import styles from './visit-form.scss';
48
+ import { appointmentLocationTagName } from '../../constants';
48
49
 
49
50
  interface VisitFormProps {
50
51
  patientUuid: string;
@@ -56,7 +57,7 @@ const VisitForm: React.FC<VisitFormProps> = ({ patientUuid, appointment }) => {
56
57
  const { currentAppointmentDate } = useAppointmentDate();
57
58
  const isTablet = useLayoutType() === 'tablet';
58
59
  const sessionUser = useSession();
59
- const locations = useLocations();
60
+ const locations = useLocations(appointmentLocationTagName);
60
61
  const [isMissingVisitType, setIsMissingVisitType] = useState(false);
61
62
  const [isSubmitting, setIsSubmitting] = useState(false);
62
63
  const [selectedLocation, setSelectedLocation] = useState(sessionUser?.sessionLocation?.uuid ?? '');