@openmrs/esm-appointments-app 9.2.1-pre.6862 → 9.2.1-pre.6871
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.
- package/.turbo/turbo-build.log +1 -1
- package/dist/1431.js +1 -1
- package/dist/1431.js.map +1 -1
- package/dist/4300.js +1 -1
- package/dist/4889.js +1 -1
- package/dist/4889.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-appointments-app.js +1 -1
- package/dist/openmrs-esm-appointments-app.js.buildmanifest.json +12 -12
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/form/appointments-form.test.tsx +21 -2
- package/src/form/appointments-form.workspace.tsx +19 -20
- package/src/header/appointments-header.component.tsx +1 -1
- package/src/header/appointments-header.scss +1 -2
- package/translations/en.json +2 -1
|
@@ -5,8 +5,6 @@ import { useTranslation } from 'react-i18next';
|
|
|
5
5
|
import {
|
|
6
6
|
Button,
|
|
7
7
|
ButtonSet,
|
|
8
|
-
DatePicker,
|
|
9
|
-
DatePickerInput,
|
|
10
8
|
Form,
|
|
11
9
|
InlineLoading,
|
|
12
10
|
MultiSelect,
|
|
@@ -636,7 +634,7 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
636
634
|
id="appointmentRecurringDateRangePicker"
|
|
637
635
|
data-testid="appointmentRecurringDateRangePicker"
|
|
638
636
|
labelText={t('dateRange', 'Set date range')}
|
|
639
|
-
invalid={
|
|
637
|
+
invalid={!!fieldState?.error?.message}
|
|
640
638
|
invalidText={fieldState?.error?.message}
|
|
641
639
|
isRequired
|
|
642
640
|
/>
|
|
@@ -738,21 +736,20 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
738
736
|
control={control}
|
|
739
737
|
render={({ field, fieldState }) => (
|
|
740
738
|
<OpenmrsDatePicker
|
|
741
|
-
|
|
742
|
-
|
|
739
|
+
data-testid="datePickerInput"
|
|
740
|
+
id="datePickerInput"
|
|
741
|
+
invalid={!!fieldState?.error?.message}
|
|
742
|
+
invalidText={fieldState?.error?.message}
|
|
743
|
+
labelText={t('date', 'Date')}
|
|
744
|
+
onBlur={field.onBlur}
|
|
743
745
|
onChange={(date) => {
|
|
744
746
|
field.onChange({
|
|
745
747
|
...field.value,
|
|
746
748
|
startDate: date,
|
|
747
749
|
});
|
|
748
750
|
}}
|
|
749
|
-
id="datePickerInput"
|
|
750
|
-
data-testid="datePickerInput"
|
|
751
|
-
labelText={t('date', 'Date')}
|
|
752
751
|
style={{ width: '100%' }}
|
|
753
|
-
|
|
754
|
-
invalidText={fieldState?.error?.message}
|
|
755
|
-
// minDate={new Date()}
|
|
752
|
+
value={field.value.startDate}
|
|
756
753
|
/>
|
|
757
754
|
)}
|
|
758
755
|
/>
|
|
@@ -791,10 +788,10 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
791
788
|
invalid={!!errors?.appointmentStatus}
|
|
792
789
|
invalidText={errors?.appointmentStatus?.message}
|
|
793
790
|
labelText={t('selectAppointmentStatus', 'Select status')}
|
|
791
|
+
onBlur={onBlur}
|
|
794
792
|
onChange={onChange}
|
|
795
|
-
value={value}
|
|
796
793
|
ref={ref}
|
|
797
|
-
|
|
794
|
+
value={value}>
|
|
798
795
|
<SelectItem text={t('selectAppointmentStatus', 'Select status')} value="" />
|
|
799
796
|
{appointmentStatuses?.length > 0 &&
|
|
800
797
|
appointmentStatuses.map((appointmentStatus, index) => (
|
|
@@ -822,8 +819,8 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
822
819
|
labelText={t('selectProvider', 'Select a provider')}
|
|
823
820
|
onChange={onChange}
|
|
824
821
|
onBlur={onBlur}
|
|
825
|
-
|
|
826
|
-
|
|
822
|
+
ref={ref}
|
|
823
|
+
value={value}>
|
|
827
824
|
<SelectItem text={t('chooseProvider', 'Choose a provider')} value="" />
|
|
828
825
|
{providers?.providers?.length > 0 &&
|
|
829
826
|
providers?.providers?.map((provider) => (
|
|
@@ -845,14 +842,16 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
845
842
|
render={({ field, fieldState }) => (
|
|
846
843
|
<div style={{ width: '100%' }}>
|
|
847
844
|
<OpenmrsDatePicker
|
|
848
|
-
|
|
849
|
-
|
|
845
|
+
data-testid="dateAppointmentScheduledPickerInput"
|
|
846
|
+
id="dateAppointmentScheduledPickerInput"
|
|
847
|
+
invalid={!!fieldState?.error?.message}
|
|
850
848
|
invalidText={fieldState?.error?.message}
|
|
849
|
+
labelText={t('dateAppointmentIssued', 'Date appointment issued')}
|
|
851
850
|
maxDate={new Date()}
|
|
852
|
-
id="dateAppointmentScheduledPickerInput"
|
|
853
|
-
data-testid="dateAppointmentScheduledPickerInput"
|
|
854
|
-
labelText={t('dateScheduledDetail', 'Date appointment issued')}
|
|
855
851
|
style={{ width: '100%' }}
|
|
852
|
+
onBlur={field.onBlur}
|
|
853
|
+
onChange={field.onChange}
|
|
854
|
+
value={field.value}
|
|
856
855
|
/>
|
|
857
856
|
</div>
|
|
858
857
|
)}
|
|
@@ -35,7 +35,7 @@ const AppointmentsHeader: React.FC<AppointmentHeaderProps> = ({ title, showServi
|
|
|
35
35
|
<OpenmrsDatePicker
|
|
36
36
|
data-testid="appointment-date-picker"
|
|
37
37
|
id="appointment-date-picker"
|
|
38
|
-
|
|
38
|
+
aria-label={t('appointmentDate', 'Appointment date')}
|
|
39
39
|
onChange={(date) => setSelectedDate(dayjs(date).startOf('day').format(omrsDateFormat))}
|
|
40
40
|
value={dayjs(selectedDate).toDate()}
|
|
41
41
|
/>
|
package/translations/en.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"appointmentCancelledSuccessfully": "Appointment cancelled successfully",
|
|
11
11
|
"appointmentCheckedIn": "Appointment Checked In",
|
|
12
12
|
"appointmentConflict": "Appointment conflict",
|
|
13
|
+
"appointmentDate": "Appointment date",
|
|
13
14
|
"appointmentEdited": "Appointment edited",
|
|
14
15
|
"appointmentEditError": "Error editing appointment",
|
|
15
16
|
"appointmentEnded": "Appointment ended",
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
"createNewAppointment": "Create new appointment",
|
|
59
60
|
"date": "Date",
|
|
60
61
|
"date&Time": "Date & time",
|
|
62
|
+
"dateAppointmentIssued": "Date appointment issued",
|
|
61
63
|
"dateAppointmentIssuedCannotBeAfterAppointmentDate": "Date appointment issued cannot be after the appointment date",
|
|
62
64
|
"dateOfBirth": "Date of birth",
|
|
63
65
|
"dateRange": "Set date range",
|
|
64
66
|
"dateScheduled": "Date appointment issued",
|
|
65
|
-
"dateScheduledDetail": "Date appointment issued",
|
|
66
67
|
"dateTime": "Date & Time",
|
|
67
68
|
"day": "Day",
|
|
68
69
|
"daysOfWeek": "Days of the week",
|