From 6f337de9387f32142ad256e3176fd851d5b582ac Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Tue, 15 Oct 2024 22:22:54 +0300 Subject: [PATCH] (refactor) Port modal registrations to use the modal system (#1344) This PR ports over some left over modal registrations to use the modal system instead of the legacy extension modal registry. It also removes an [unused](https://github.com/search?q=org:openmrs+check-in-appointment-modal&type=code) modal registration from the Appointments app routes registry. --- packages/esm-appointments-app/src/routes.json | 26 ++++---- .../esm-service-queues-app/src/routes.json | 61 ++++++++++--------- 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/packages/esm-appointments-app/src/routes.json b/packages/esm-appointments-app/src/routes.json index f9985d8dc..fbe5d8fac 100644 --- a/packages/esm-appointments-app/src/routes.json +++ b/packages/esm-appointments-app/src/routes.json @@ -3,12 +3,6 @@ "backendDependencies": { "webservices.rest": "^2.2.0" }, - "modals": [ - { - "name": "end-appointment-modal", - "component": "endAppointmentModal" - } - ], "extensions": [ { "name": "home-appointments", @@ -36,11 +30,7 @@ "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", @@ -111,10 +101,6 @@ "component": "patientUpcomingAppointmentsWidget", "slot": "upcoming-appointment-slot" }, - { - "name": "patient-appointment-cancel-confirmation-dialog", - "component": "patientAppointmentsCancelConfirmationDialog" - }, { "name": "edit-appointments-form", "component": "appointmentsForm", @@ -154,5 +140,15 @@ "slot": "home-metrics-tiles-slot", "component": "homeAppointmentsTile" } + ], + "modals": [ + { + "name": "end-appointment-modal", + "component": "endAppointmentModal" + }, + { + "name": "patient-appointment-cancel-confirmation-dialog", + "component": "patientAppointmentsCancelConfirmationDialog" + } ] } diff --git a/packages/esm-service-queues-app/src/routes.json b/packages/esm-service-queues-app/src/routes.json index d0e298751..4d92a7168 100644 --- a/packages/esm-service-queues-app/src/routes.json +++ b/packages/esm-service-queues-app/src/routes.json @@ -40,10 +40,6 @@ "name": "service-queues-dashboard", "slot": "service-queues-dashboard-slot" }, - { - "name": "edit-queue-entry-status-modal", - "component": "editQueueEntryStatusModal" - }, { "name": "patient-info-banner-slot", "component": "patientInfoBannerSlot" @@ -57,55 +53,62 @@ "component": "clearAllQueueEntries" }, { - "name": "add-visit-to-queue-modal", - "component": "addVisitToQueueModal" + "name": "previous-visit-summary-widget", + "component": "pastVisitSummary", + "slot": "previous-visit-summary-slot" }, + { - "name": "transition-queue-entry-status-modal", - "component": "transitionQueueEntryStatusModal" + "name": "active-visits-row-actions", + "component": "activeVisitsRowActions", + "slot": "queue-table-serve-patient-slot" }, { - "name": "previous-visit-summary-widget", - "component": "pastVisitSummary", - "slot": "previous-visit-summary-slot" + "name": "visit-form-queue-fields", + "component": "visitFormQueueFields", + "slot":"visit-form-queue-slot" + } + ], + "modals": [ + { + "name": "add-visit-to-queue-modal", + "component": "addVisitToQueueModal" }, { "name": "add-provider-to-room-modal", "component": "addProviderToRoomModal" }, { - "name": "transition-queue-entry-modal", - "component": "transitionQueueEntryModal" + "name": "edit-queue-entry-modal", + "component": "editQueueEntryModal" }, { - "name": "transition-patient-to-latest-queue-modal", - "component": "transitionPatientToLatestQueue" + "name": "edit-queue-entry-status-modal", + "component": "editQueueEntryStatusModal" }, { - "name": "edit-queue-entry-modal", - "component": "editQueueEntryModal" + "name": "end-queue-entry-modal", + "component": "endQueueEntryModal" }, { - "name": "undo-transition-queue-entry-modal", - "component": "undoTransitionQueueEntryModal" + "name": "transition-patient-to-latest-queue-modal", + "component": "transitionPatientToLatestQueue" }, { - "name": "void-queue-entry-modal", - "component": "voidQueueEntryModal" + "name": "transition-queue-entry-modal", + "component": "transitionQueueEntryModal" }, { - "name": "end-queue-entry-modal", - "component": "endQueueEntryModal" + "name": "transition-queue-entry-status-modal", + "component": "transitionQueueEntryStatusModal" }, { - "name": "active-visits-row-actions", - "component": "activeVisitsRowActions", - "slot": "queue-table-serve-patient-slot" + "name": "undo-transition-queue-entry-modal", + "component": "undoTransitionQueueEntryModal" }, { - "name": "visit-form-queue-fields", - "component": "visitFormQueueFields", - "slot":"visit-form-queue-slot" + "name": "void-queue-entry-modal", + "component": "voidQueueEntryModal" } ], "workspaces": [