From 266ab0b2e68036e05f035e3c3ca041d0936e7bde Mon Sep 17 00:00:00 2001 From: Mark Goodrich Date: Wed, 21 Feb 2024 16:19:14 -0500 Subject: [PATCH 1/3] O3-2859: Appointments: Change Patient Appointments to use Appointment Form from Appointments ESM (fix title) --- packages/esm-appointments-app/src/routes.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/esm-appointments-app/src/routes.json b/packages/esm-appointments-app/src/routes.json index 3cc645749..6f9b44cca 100644 --- a/packages/esm-appointments-app/src/routes.json +++ b/packages/esm-appointments-app/src/routes.json @@ -71,7 +71,13 @@ }, { "name": "appointments-form-workspace", - "component": "appointmentsFormWorkspace" + "component": "appointmentsFormWorkspace", + "meta": { + "title": { + "key": "createNewAppointment", + "default": "Create new appointment" + } + } } ] } From acae629fca111a5ee210ba55165fed86eed99c0b Mon Sep 17 00:00:00 2001 From: Himanshu Malviya <76220055+himanshu-malviya15@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:53:49 +0530 Subject: [PATCH 2/3] (fix) O3 2804: Reuse ResponsiveWrapper component from esm-framework (#985) * fix:Removed instances of ResponsiveWrapper with the component from the framework * Bump esm-framework and openmrs tooling * Refactor some more occurences --------- Co-authored-by: Dennis Kigen --- .../src/form/appointments-form.component.tsx | 44 +++-- .../visit-form-queue-fields.component.tsx | 10 +- .../visit-form/visit-form.component.tsx | 8 +- yarn.lock | 186 +++++++++--------- 4 files changed, 121 insertions(+), 127 deletions(-) diff --git a/packages/esm-appointments-app/src/form/appointments-form.component.tsx b/packages/esm-appointments-app/src/form/appointments-form.component.tsx index 6e4a67b41..43a0db867 100644 --- a/packages/esm-appointments-app/src/form/appointments-form.component.tsx +++ b/packages/esm-appointments-app/src/form/appointments-form.component.tsx @@ -8,7 +8,6 @@ import { DatePicker, Form, InlineLoading, - Layer, MultiSelect, NumberInput, Select, @@ -24,7 +23,14 @@ import { import { Controller, useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; import { z } from 'zod'; -import { useLocations, useSession, showSnackbar, useLayoutType, useConfig } from '@openmrs/esm-framework'; +import { + useLocations, + useSession, + showSnackbar, + useLayoutType, + useConfig, + ResponsiveWrapper, +} from '@openmrs/esm-framework'; import { convertTime12to24 } from '@openmrs/esm-patient-common-lib'; import { saveAppointment, @@ -302,7 +308,7 @@ const AppointmentsForm: React.FC = ({
{t('location', 'Location')}
- + = ({
{t('service', 'Service')} - + = ({
{t('appointmentType_title', 'Appointment Type')} - + = ({ toggled={isAllDayAppointment} /> )} - + ( - + = ({ )} - + = ({ /> - + = ({ toggled={isAllDayAppointment} /> )} - + = ({ {getValues('selectedService') && (
- + = ({ {context !== 'creating' ? (
{t('appointmentStatus', 'Appointment Status')} - + = ({ name="appointmentNote" control={control} render={({ field: { onChange, onBlur, value, ref } }) => ( - +