Skip to content

Commit

Permalink
(refactor) Port modal registrations to use the modal system (#1344)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
denniskigen authored Oct 15, 2024
1 parent f0e6659 commit 6f337de
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 44 deletions.
26 changes: 11 additions & 15 deletions packages/esm-appointments-app/src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
"backendDependencies": {
"webservices.rest": "^2.2.0"
},
"modals": [
{
"name": "end-appointment-modal",
"component": "endAppointmentModal"
}
],
"extensions": [
{
"name": "home-appointments",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -111,10 +101,6 @@
"component": "patientUpcomingAppointmentsWidget",
"slot": "upcoming-appointment-slot"
},
{
"name": "patient-appointment-cancel-confirmation-dialog",
"component": "patientAppointmentsCancelConfirmationDialog"
},
{
"name": "edit-appointments-form",
"component": "appointmentsForm",
Expand Down Expand Up @@ -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"
}
]
}
61 changes: 32 additions & 29 deletions packages/esm-service-queues-app/src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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": [
Expand Down

0 comments on commit 6f337de

Please sign in to comment.