@openmrs/esm-appointments-app 9.2.1-pre.6888 → 9.2.1-pre.6891
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 +5 -5
- package/dist/1119.js +1 -1
- package/dist/1197.js +1 -1
- package/dist/2146.js +1 -1
- package/dist/2690.js +1 -1
- package/dist/3099.js +1 -1
- package/dist/3584.js +1 -1
- package/dist/4055.js +1 -1
- package/dist/4132.js +1 -1
- package/dist/4335.js +1 -1
- package/dist/4618.js +1 -1
- package/dist/4652.js +1 -1
- package/dist/4889.js +1 -1
- package/dist/4889.js.map +1 -1
- package/dist/4944.js +1 -1
- package/dist/5173.js +1 -1
- package/dist/5241.js +1 -1
- package/dist/5442.js +1 -1
- package/dist/5661.js +1 -1
- package/dist/5666.js +1 -0
- package/dist/5666.js.map +1 -0
- package/dist/6022.js +1 -1
- package/dist/6468.js +1 -1
- package/dist/6679.js +1 -1
- package/dist/6840.js +1 -1
- package/dist/6859.js +1 -1
- package/dist/6886.js +1 -1
- package/dist/7097.js +1 -1
- package/dist/7159.js +1 -1
- package/dist/723.js +1 -1
- package/dist/7617.js +1 -1
- package/dist/795.js +1 -1
- package/dist/8163.js +1 -1
- package/dist/8349.js +1 -1
- package/dist/8618.js +1 -1
- package/dist/890.js +1 -1
- package/dist/9214.js +1 -1
- package/dist/9538.js +1 -1
- package/dist/9569.js +1 -1
- package/dist/986.js +1 -1
- package/dist/9879.js +1 -1
- package/dist/9895.js +1 -1
- package/dist/9900.js +1 -1
- package/dist/9913.js +1 -1
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-appointments-app.js.buildmanifest.json +146 -146
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/form/appointments-form.test.tsx +120 -0
- package/src/form/appointments-form.workspace.tsx +46 -25
- package/translations/am.json +2 -2
- package/translations/ar.json +2 -2
- package/translations/ar_SY.json +2 -2
- package/translations/bn.json +2 -2
- package/translations/de.json +2 -2
- package/translations/en_US.json +2 -2
- package/translations/es.json +2 -2
- package/translations/es_MX.json +2 -2
- package/translations/fr.json +2 -2
- package/translations/he.json +2 -2
- package/translations/hi.json +2 -2
- package/translations/hi_IN.json +2 -2
- package/translations/id.json +2 -2
- package/translations/it.json +2 -2
- package/translations/ka.json +2 -2
- package/translations/km.json +2 -2
- package/translations/ku.json +2 -2
- package/translations/ky.json +2 -2
- package/translations/lg.json +2 -2
- package/translations/ne.json +2 -2
- package/translations/pl.json +2 -2
- package/translations/pt.json +2 -2
- package/translations/pt_BR.json +2 -2
- package/translations/qu.json +2 -2
- package/translations/ro_RO.json +2 -2
- package/translations/ru_RU.json +2 -2
- package/translations/si.json +2 -2
- package/translations/sw.json +2 -2
- package/translations/sw_KE.json +2 -2
- package/translations/tr.json +2 -2
- package/translations/tr_TR.json +2 -2
- package/translations/uk.json +2 -2
- package/translations/uz.json +2 -2
- package/translations/uz@Latn.json +2 -2
- package/translations/uz_UZ.json +2 -2
- package/translations/vi.json +2 -2
- package/translations/zh.json +2 -2
- package/translations/zh_CN.json +2 -2
- package/dist/7420.js +0 -1
- package/dist/7420.js.map +0 -1
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"},"order":2},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-dashboard","slot":"appointments-dashboard-slot","component":"appointmentsDashboard"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"early-appointments-panel","component":"earlyAppointments"},{"name":"patient-appointments-summary-dashboard","component":"patientAppointmentsSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"hideDashboardTitle":true,"path":"Appointments","slot":"patient-chart-appointments-dashboard-slot","title":"Appointments"}},{"name":"appointments-details-widget","component":"patientAppointmentsDetailedSummary","slot":"patient-chart-appointments-dashboard-slot","meta":{"columnSpan":1}},{"name":"patient-upcoming-appointment-widget","component":"patientUpcomingAppointmentsWidget","slot":"visit-form-top-slot"},{"name":"search-patient","component":"searchPatient"},{"name":"home-appointments-tile","slot":"home-metrics-tiles-slot","component":"homeAppointmentsTile"},{"name":"metrics-card-scheduled-appointments","component":"metricsCardScheduledAppointments","slot":"appointments-metrics-slot","order":1},{"name":"metrics-card-highest-volume-service","component":"metricsCardHighestVolumeService","slot":"appointments-metrics-slot","order":2},{"name":"metrics-card-providers-booked","component":"metricsCardProvidersBooked","slot":"appointments-metrics-slot","order":3}],"modals":[{"name":"end-appointment-modal","component":"endAppointmentModal"},{"name":"cancel-appointment-modal","component":"cancelAppointmentModal"}],"workspaces":[{"name":"appointments-form-workspace","component":"appointmentsFormWorkspace","title":"createNewAppointment","type":"form"}],"version":"9.2.1-pre.
|
|
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"},"order":2},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-dashboard","slot":"appointments-dashboard-slot","component":"appointmentsDashboard"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsList"},{"name":"early-appointments-panel","component":"earlyAppointments"},{"name":"patient-appointments-summary-dashboard","component":"patientAppointmentsSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"hideDashboardTitle":true,"path":"Appointments","slot":"patient-chart-appointments-dashboard-slot","title":"Appointments"}},{"name":"appointments-details-widget","component":"patientAppointmentsDetailedSummary","slot":"patient-chart-appointments-dashboard-slot","meta":{"columnSpan":1}},{"name":"patient-upcoming-appointment-widget","component":"patientUpcomingAppointmentsWidget","slot":"visit-form-top-slot"},{"name":"search-patient","component":"searchPatient"},{"name":"home-appointments-tile","slot":"home-metrics-tiles-slot","component":"homeAppointmentsTile"},{"name":"metrics-card-scheduled-appointments","component":"metricsCardScheduledAppointments","slot":"appointments-metrics-slot","order":1},{"name":"metrics-card-highest-volume-service","component":"metricsCardHighestVolumeService","slot":"appointments-metrics-slot","order":2},{"name":"metrics-card-providers-booked","component":"metricsCardProvidersBooked","slot":"appointments-metrics-slot","order":3}],"modals":[{"name":"end-appointment-modal","component":"endAppointmentModal"},{"name":"cancel-appointment-modal","component":"cancelAppointmentModal"}],"workspaces":[{"name":"appointments-form-workspace","component":"appointmentsFormWorkspace","title":"createNewAppointment","type":"form"}],"version":"9.2.1-pre.6891"}
|
package/package.json
CHANGED
|
@@ -72,6 +72,10 @@ describe('AppointmentForm', () => {
|
|
|
72
72
|
isValidating: false,
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
|
+
const getAllDayToggle = () => {
|
|
76
|
+
const toggles = screen.queryAllByRole('switch');
|
|
77
|
+
return toggles.find((toggle) => toggle.getAttribute('id') === 'allDayToggle');
|
|
78
|
+
};
|
|
75
79
|
|
|
76
80
|
it('renders the appointments form', async () => {
|
|
77
81
|
mockOpenmrsFetch.mockResolvedValue(mockUseAppointmentServiceData as unknown as FetchResponse);
|
|
@@ -260,4 +264,120 @@ describe('AppointmentForm', () => {
|
|
|
260
264
|
title: 'Error scheduling appointment',
|
|
261
265
|
});
|
|
262
266
|
});
|
|
267
|
+
|
|
268
|
+
it('renders all-day toggle when allowAllDayAppointments is enabled', async () => {
|
|
269
|
+
mockUseConfig.mockReturnValue({
|
|
270
|
+
...getDefaultsFromConfigSchema(configSchema),
|
|
271
|
+
appointmentTypes: ['Scheduled', 'WalkIn'],
|
|
272
|
+
allowAllDayAppointments: true,
|
|
273
|
+
});
|
|
274
|
+
mockOpenmrsFetch.mockResolvedValue(mockUseAppointmentServiceData as unknown as FetchResponse);
|
|
275
|
+
|
|
276
|
+
renderWithSwr(<AppointmentForm {...defaultProps} />);
|
|
277
|
+
|
|
278
|
+
await waitForLoadingToFinish();
|
|
279
|
+
|
|
280
|
+
const allDayToggle = getAllDayToggle();
|
|
281
|
+
expect(allDayToggle).toBeDefined();
|
|
282
|
+
expect(allDayToggle).toBeInTheDocument();
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
it('does not render all-day toggle when allowAllDayAppointments is disabled', async () => {
|
|
286
|
+
mockUseConfig.mockReturnValue({
|
|
287
|
+
...getDefaultsFromConfigSchema(configSchema),
|
|
288
|
+
appointmentTypes: ['Scheduled', 'WalkIn'],
|
|
289
|
+
allowAllDayAppointments: false,
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
mockOpenmrsFetch.mockResolvedValue(mockUseAppointmentServiceData as unknown as FetchResponse);
|
|
293
|
+
|
|
294
|
+
renderWithSwr(<AppointmentForm {...defaultProps} />);
|
|
295
|
+
|
|
296
|
+
await waitForLoadingToFinish();
|
|
297
|
+
|
|
298
|
+
// Query by test ID since the toggle might not be present
|
|
299
|
+
const allDayToggles = screen.queryAllByRole('switch');
|
|
300
|
+
const allDayToggle = allDayToggles.find((toggle) => toggle.getAttribute('id') === 'allDayToggle');
|
|
301
|
+
|
|
302
|
+
expect(allDayToggle).toBeUndefined();
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
it('hides time and duration fields when all-day toggle is enabled', async () => {
|
|
306
|
+
mockUseConfig.mockReturnValue({
|
|
307
|
+
...getDefaultsFromConfigSchema(configSchema),
|
|
308
|
+
appointmentTypes: ['Scheduled', 'WalkIn'],
|
|
309
|
+
allowAllDayAppointments: true,
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
const user = userEvent.setup();
|
|
313
|
+
mockOpenmrsFetch.mockResolvedValue(mockUseAppointmentServiceData as unknown as FetchResponse);
|
|
314
|
+
|
|
315
|
+
renderWithSwr(<AppointmentForm {...defaultProps} />);
|
|
316
|
+
|
|
317
|
+
await waitForLoadingToFinish();
|
|
318
|
+
|
|
319
|
+
// When allowAllDayAppointments is true, the toggle starts as ON (toggled)
|
|
320
|
+
// So time and duration fields should already be hidden initially
|
|
321
|
+
const allDayToggle = getAllDayToggle();
|
|
322
|
+
expect(allDayToggle).toBeChecked(); // Verify it's already toggled on
|
|
323
|
+
|
|
324
|
+
// Time and duration fields should already be hidden
|
|
325
|
+
expect(screen.queryByRole('textbox', { name: /time/i })).not.toBeInTheDocument();
|
|
326
|
+
expect(screen.queryByRole('spinbutton', { name: /duration \(minutes\)/i })).not.toBeInTheDocument();
|
|
327
|
+
|
|
328
|
+
// Now toggle it OFF to show the fields
|
|
329
|
+
await user.click(allDayToggle);
|
|
330
|
+
|
|
331
|
+
// After toggling OFF, time and duration fields should now be visible
|
|
332
|
+
expect(screen.getByRole('textbox', { name: /time/i })).toBeInTheDocument();
|
|
333
|
+
expect(screen.getByRole('spinbutton', { name: /duration \(minutes\)/i })).toBeInTheDocument();
|
|
334
|
+
|
|
335
|
+
// Toggle it back ON to hide them again
|
|
336
|
+
await user.click(allDayToggle);
|
|
337
|
+
|
|
338
|
+
// Fields should be hidden again
|
|
339
|
+
expect(screen.queryByRole('textbox', { name: /time/i })).not.toBeInTheDocument();
|
|
340
|
+
expect(screen.queryByRole('spinbutton', { name: /duration \(minutes\)/i })).not.toBeInTheDocument();
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
it('does not require duration validation for all-day appointments', async () => {
|
|
344
|
+
const user = userEvent.setup();
|
|
345
|
+
|
|
346
|
+
mockOpenmrsFetch.mockResolvedValue({ data: mockUseAppointmentServiceData } as unknown as FetchResponse);
|
|
347
|
+
mockSaveAppointment.mockResolvedValue({ status: 200, statusText: 'Ok' } as FetchResponse);
|
|
348
|
+
|
|
349
|
+
renderWithSwr(<AppointmentForm {...defaultProps} />);
|
|
350
|
+
|
|
351
|
+
await waitForLoadingToFinish();
|
|
352
|
+
|
|
353
|
+
const locationSelect = screen.getByRole('combobox', { name: /select a location/i });
|
|
354
|
+
const serviceSelect = screen.getByRole('combobox', { name: /select a service/i });
|
|
355
|
+
const appointmentTypeSelect = screen.getByRole('combobox', { name: /select the type of appointment/i });
|
|
356
|
+
const providerSelect = screen.getByRole('combobox', { name: /select a provider/i });
|
|
357
|
+
const dateInput = screen.getByRole('textbox', { name: /^date$/i });
|
|
358
|
+
const dateAppointmentIssuedInput = screen.getByRole('textbox', { name: /date appointment issued/i });
|
|
359
|
+
const allDayToggle = getAllDayToggle();
|
|
360
|
+
const saveButton = screen.getByRole('button', { name: /save and close/i });
|
|
361
|
+
|
|
362
|
+
await user.selectOptions(locationSelect, ['Inpatient Ward']);
|
|
363
|
+
await user.selectOptions(serviceSelect, ['Outpatient']);
|
|
364
|
+
await user.selectOptions(appointmentTypeSelect, ['Scheduled']);
|
|
365
|
+
await user.selectOptions(providerSelect, ['doctor - James Cook']);
|
|
366
|
+
|
|
367
|
+
const date = '2024-01-04';
|
|
368
|
+
|
|
369
|
+
fireEvent.change(dateInput, { target: { value: date } });
|
|
370
|
+
await user.click(dateAppointmentIssuedInput);
|
|
371
|
+
fireEvent.change(dateAppointmentIssuedInput, { target: { value: date } });
|
|
372
|
+
|
|
373
|
+
// Enable all-day appointment
|
|
374
|
+
await user.click(allDayToggle);
|
|
375
|
+
|
|
376
|
+
await user.click(saveButton);
|
|
377
|
+
|
|
378
|
+
// Should not show duration error message
|
|
379
|
+
expect(screen.queryByText(/duration should be greater than zero/i)).not.toBeInTheDocument();
|
|
380
|
+
|
|
381
|
+
expect(mockSaveAppointment).toHaveBeenCalledTimes(1);
|
|
382
|
+
});
|
|
263
383
|
});
|
|
@@ -95,7 +95,6 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
95
95
|
const { appointmentStatuses, appointmentTypes, allowAllDayAppointments } = useConfig<ConfigObject>();
|
|
96
96
|
|
|
97
97
|
const [isRecurringAppointment, setIsRecurringAppointment] = useState(false);
|
|
98
|
-
const [isAllDayAppointment, setIsAllDayAppointment] = useState(false);
|
|
99
98
|
const defaultRecurringPatternType = recurringPattern?.type || 'DAY';
|
|
100
99
|
const defaultRecurringPatternPeriod = recurringPattern?.period || 1;
|
|
101
100
|
const defaultRecurringPatternDaysOfWeek = recurringPattern?.daysOfWeek || [];
|
|
@@ -130,12 +129,8 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
130
129
|
// t('durationErrorMessage', 'Duration should be greater than zero')
|
|
131
130
|
const appointmentsFormSchema = z
|
|
132
131
|
.object({
|
|
133
|
-
duration: z
|
|
134
|
-
|
|
135
|
-
.nullable()
|
|
136
|
-
.refine((duration) => (isAllDayAppointment ? true : duration > 0), {
|
|
137
|
-
message: translateFrom(moduleName, 'durationErrorMessage', 'Duration should be greater than zero'),
|
|
138
|
-
}),
|
|
132
|
+
duration: z.union([z.number(), z.null()]).optional(),
|
|
133
|
+
isAllDayAppointment: z.boolean(),
|
|
139
134
|
location: z.string().refine((value) => value !== '', {
|
|
140
135
|
message: translateFrom(moduleName, 'locationRequired', 'Location is required'),
|
|
141
136
|
}),
|
|
@@ -205,7 +200,17 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
205
200
|
'Date appointment issued cannot be after the appointment date',
|
|
206
201
|
),
|
|
207
202
|
},
|
|
208
|
-
)
|
|
203
|
+
)
|
|
204
|
+
.superRefine((data, ctx) => {
|
|
205
|
+
// If not all-day, duration must be > 0
|
|
206
|
+
if (!data.isAllDayAppointment && (!data.duration || data.duration <= 0)) {
|
|
207
|
+
ctx.addIssue({
|
|
208
|
+
path: ['duration'],
|
|
209
|
+
code: z.ZodIssueCode.custom,
|
|
210
|
+
message: translateFrom(moduleName, 'durationErrorMessage', 'Duration should be greater than zero'),
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
});
|
|
209
214
|
|
|
210
215
|
type AppointmentFormData = z.infer<typeof appointmentsFormSchema>;
|
|
211
216
|
|
|
@@ -248,6 +253,7 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
248
253
|
},
|
|
249
254
|
formIsRecurringAppointment: isRecurringAppointment,
|
|
250
255
|
dateAppointmentScheduled: defaultDateAppointmentScheduled,
|
|
256
|
+
isAllDayAppointment: allowAllDayAppointments,
|
|
251
257
|
},
|
|
252
258
|
});
|
|
253
259
|
|
|
@@ -417,6 +423,7 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
417
423
|
appointmentNote,
|
|
418
424
|
appointmentStatus,
|
|
419
425
|
dateAppointmentScheduled,
|
|
426
|
+
isAllDayAppointment,
|
|
420
427
|
} = data;
|
|
421
428
|
|
|
422
429
|
const serviceUuid = services?.find((service) => service.name === selectedService)?.uuid;
|
|
@@ -424,7 +431,9 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
424
431
|
const hours = (hoursAndMinutes[0] % 12) + (timeFormat === 'PM' ? 12 : 0);
|
|
425
432
|
const minutes = hoursAndMinutes[1];
|
|
426
433
|
const startDatetime = startDate.setHours(hours, minutes);
|
|
427
|
-
const endDatetime =
|
|
434
|
+
const endDatetime = isAllDayAppointment
|
|
435
|
+
? dayjs(startDate).endOf('day').toDate()
|
|
436
|
+
: dayjs(startDatetime).add(duration, 'minutes').toDate();
|
|
428
437
|
|
|
429
438
|
return {
|
|
430
439
|
appointmentKind: selectedAppointmentType,
|
|
@@ -599,13 +608,19 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
599
608
|
{isRecurringAppointment && (
|
|
600
609
|
<div className={styles.inputContainer}>
|
|
601
610
|
{allowAllDayAppointments && (
|
|
602
|
-
<
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
611
|
+
<Controller
|
|
612
|
+
name="isAllDayAppointment"
|
|
613
|
+
control={control}
|
|
614
|
+
render={({ field: { value, onChange } }) => (
|
|
615
|
+
<Toggle
|
|
616
|
+
id="allDayToggle"
|
|
617
|
+
labelA={t('no', 'No')}
|
|
618
|
+
labelB={t('yes', 'Yes')}
|
|
619
|
+
labelText={t('allDay', 'All day')}
|
|
620
|
+
toggled={value}
|
|
621
|
+
onToggle={onChange}
|
|
622
|
+
/>
|
|
623
|
+
)}
|
|
609
624
|
/>
|
|
610
625
|
)}
|
|
611
626
|
<ResponsiveWrapper>
|
|
@@ -642,7 +657,7 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
642
657
|
/>
|
|
643
658
|
</ResponsiveWrapper>
|
|
644
659
|
|
|
645
|
-
{!isAllDayAppointment && (
|
|
660
|
+
{!watch('isAllDayAppointment') && (
|
|
646
661
|
<TimeAndDuration control={control} errors={errors} services={services} watch={watch} t={t} />
|
|
647
662
|
)}
|
|
648
663
|
|
|
@@ -721,13 +736,19 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
721
736
|
{!isRecurringAppointment && (
|
|
722
737
|
<div className={styles.inputContainer}>
|
|
723
738
|
{allowAllDayAppointments && (
|
|
724
|
-
<
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
739
|
+
<Controller
|
|
740
|
+
name="isAllDayAppointment"
|
|
741
|
+
control={control}
|
|
742
|
+
render={({ field: { value, onChange } }) => (
|
|
743
|
+
<Toggle
|
|
744
|
+
id="allDayToggle"
|
|
745
|
+
labelA={t('no', 'No')}
|
|
746
|
+
labelB={t('yes', 'Yes')}
|
|
747
|
+
labelText={t('allDay', 'All day')}
|
|
748
|
+
toggled={value}
|
|
749
|
+
onToggle={onChange}
|
|
750
|
+
/>
|
|
751
|
+
)}
|
|
731
752
|
/>
|
|
732
753
|
)}
|
|
733
754
|
<ResponsiveWrapper>
|
|
@@ -755,7 +776,7 @@ const AppointmentsForm: React.FC<AppointmentsFormProps & DefaultWorkspaceProps>
|
|
|
755
776
|
/>
|
|
756
777
|
</ResponsiveWrapper>
|
|
757
778
|
|
|
758
|
-
{!isAllDayAppointment && (
|
|
779
|
+
{!watch('isAllDayAppointment') && (
|
|
759
780
|
<TimeAndDuration control={control} services={services} watch={watch} t={t} errors={errors} />
|
|
760
781
|
)}
|
|
761
782
|
</div>
|
package/translations/am.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",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Select a location",
|
|
137
138
|
"selectAppointmentStatus": "Select status",
|
|
138
139
|
"selectAppointmentType": "Select an appointment type",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Select an option",
|
|
141
141
|
"selectProvider": "Select a provider",
|
|
142
142
|
"selectService": "Select a service",
|
package/translations/ar.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"appointmentCancelledSuccessfully": "تم إلغاء الموعد بنجاح",
|
|
11
11
|
"appointmentCheckedIn": "Appointment Checked In",
|
|
12
12
|
"appointmentConflict": "تعارض بالمواعيد",
|
|
13
|
+
"appointmentDate": "Appointment date",
|
|
13
14
|
"appointmentEdited": "تم تعديل الموعد",
|
|
14
15
|
"appointmentEditError": "خطأ في تعديل الموعد",
|
|
15
16
|
"appointmentEnded": "انتهى الموعد",
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
"createNewAppointment": "إنشاء موعد جديد",
|
|
59
60
|
"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": "تاريخ الميلاد",
|
|
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",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Select a location",
|
|
137
138
|
"selectAppointmentStatus": "اختر الحالة",
|
|
138
139
|
"selectAppointmentType": "اختر نوع الموعد",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "اختر خيارًا",
|
|
141
141
|
"selectProvider": "Select a provider",
|
|
142
142
|
"selectService": "اختر الخدمة",
|
package/translations/ar_SY.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",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Select a location",
|
|
137
138
|
"selectAppointmentStatus": "Select status",
|
|
138
139
|
"selectAppointmentType": "Select an appointment type",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Select an option",
|
|
141
141
|
"selectProvider": "Select a provider",
|
|
142
142
|
"selectService": "Select a service",
|
package/translations/bn.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"appointmentCancelledSuccessfully": "সাক্ষাৎ সফলভাবে বাতিল হয়েছে",
|
|
11
11
|
"appointmentCheckedIn": "Appointment Checked In",
|
|
12
12
|
"appointmentConflict": "Appointment conflict",
|
|
13
|
+
"appointmentDate": "Appointment date",
|
|
13
14
|
"appointmentEdited": "সাক্ষাৎ পরিবর্তিত হয়েছে",
|
|
14
15
|
"appointmentEditError": "Error editing appointment",
|
|
15
16
|
"appointmentEnded": "সাক্ষাৎ সমাপ্ত",
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
"createNewAppointment": "Create new appointment",
|
|
59
60
|
"date": "তারিখ",
|
|
60
61
|
"date&Time": "তারিখ ও সময়",
|
|
62
|
+
"dateAppointmentIssued": "Date appointment issued",
|
|
61
63
|
"dateAppointmentIssuedCannotBeAfterAppointmentDate": "Date appointment issued cannot be after the appointment date",
|
|
62
64
|
"dateOfBirth": "জন্মতারিখ",
|
|
63
65
|
"dateRange": "Set date range",
|
|
64
66
|
"dateScheduled": "Date appointment issued",
|
|
65
|
-
"dateScheduledDetail": "Date appointment issued",
|
|
66
67
|
"dateTime": "তারিখ ও সময়",
|
|
67
68
|
"day": "দিন",
|
|
68
69
|
"daysOfWeek": "সপ্তাহের দিনসমূহ",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Select a location",
|
|
137
138
|
"selectAppointmentStatus": "Select status",
|
|
138
139
|
"selectAppointmentType": "Select an appointment type",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Select an option",
|
|
141
141
|
"selectProvider": "Select a provider",
|
|
142
142
|
"selectService": "Select a service",
|
package/translations/de.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",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Select a location",
|
|
137
138
|
"selectAppointmentStatus": "Select status",
|
|
138
139
|
"selectAppointmentType": "Select an appointment type",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Select an option",
|
|
141
141
|
"selectProvider": "Select a provider",
|
|
142
142
|
"selectService": "Select a service",
|
package/translations/en_US.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",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Select a location",
|
|
137
138
|
"selectAppointmentStatus": "Select status",
|
|
138
139
|
"selectAppointmentType": "Select an appointment type",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Select an option",
|
|
141
141
|
"selectProvider": "Select a provider",
|
|
142
142
|
"selectService": "Select a service",
|
package/translations/es.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"appointmentCancelledSuccessfully": "Cita cancelada con éxito",
|
|
11
11
|
"appointmentCheckedIn": "Llegada a la cita registrada",
|
|
12
12
|
"appointmentConflict": "Conflicto en las citas",
|
|
13
|
+
"appointmentDate": "Appointment date",
|
|
13
14
|
"appointmentEdited": "Cita editada",
|
|
14
15
|
"appointmentEditError": "Error al editar la cita",
|
|
15
16
|
"appointmentEnded": "Cita finalizada",
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
"createNewAppointment": "Crear nueva cita",
|
|
59
60
|
"date": "Fecha",
|
|
60
61
|
"date&Time": "Fecha y hora",
|
|
62
|
+
"dateAppointmentIssued": "Date appointment issued",
|
|
61
63
|
"dateAppointmentIssuedCannotBeAfterAppointmentDate": "La fecha de emisión de la cita no puede ser posterior a la fecha de la cita",
|
|
62
64
|
"dateOfBirth": "Fecha de nacimiento",
|
|
63
65
|
"dateRange": "Set date range",
|
|
64
66
|
"dateScheduled": "Fecha de emisión de la cita",
|
|
65
|
-
"dateScheduledDetail": "Fecha de emisión de la cita",
|
|
66
67
|
"dateTime": "Fecha y Hora",
|
|
67
68
|
"day": "Día",
|
|
68
69
|
"daysOfWeek": "Días de la semana",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Seleccionar una ubicación",
|
|
137
138
|
"selectAppointmentStatus": "Seleccionar estado",
|
|
138
139
|
"selectAppointmentType": "Seleccione un tipo de cita",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Seleccione una opción",
|
|
141
141
|
"selectProvider": "Seleccione un proveedor de la salud",
|
|
142
142
|
"selectService": "Seleccione un servicio",
|
package/translations/es_MX.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",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Select a location",
|
|
137
138
|
"selectAppointmentStatus": "Select status",
|
|
138
139
|
"selectAppointmentType": "Select an appointment type",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Select an option",
|
|
141
141
|
"selectProvider": "Select a provider",
|
|
142
142
|
"selectService": "Select a service",
|
package/translations/fr.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"appointmentCancelledSuccessfully": "Rendez-vous annulé avec succès",
|
|
11
11
|
"appointmentCheckedIn": "Patient arrivé pour le rendez-vous",
|
|
12
12
|
"appointmentConflict": "Conflit du rendez-vous",
|
|
13
|
+
"appointmentDate": "Appointment date",
|
|
13
14
|
"appointmentEdited": "Rendez-vous modifié",
|
|
14
15
|
"appointmentEditError": "Erreur de modification du rendez-vous",
|
|
15
16
|
"appointmentEnded": "Rendez-vous terminé",
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
"createNewAppointment": "Créer un nouveau rendez-vous",
|
|
59
60
|
"date": "Date",
|
|
60
61
|
"date&Time": "Date et heure",
|
|
62
|
+
"dateAppointmentIssued": "Date appointment issued",
|
|
61
63
|
"dateAppointmentIssuedCannotBeAfterAppointmentDate": "La date du rendez-vous ne peut pas être postérieure à la date du rendez-vous",
|
|
62
64
|
"dateOfBirth": "Date de naissance",
|
|
63
65
|
"dateRange": "Set date range",
|
|
64
66
|
"dateScheduled": "Date de rendez vous émise",
|
|
65
|
-
"dateScheduledDetail": "Date de rendez vous émise",
|
|
66
67
|
"dateTime": "Date et heure",
|
|
67
68
|
"day": "Jour",
|
|
68
69
|
"daysOfWeek": "Jours de la semaine",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Sélectionner un emplacement",
|
|
137
138
|
"selectAppointmentStatus": "Sélectionner le statut",
|
|
138
139
|
"selectAppointmentType": "Sélectionnez un type de rendez-vous",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Sélectionner une option",
|
|
141
141
|
"selectProvider": "Sélectionnez un prestataire",
|
|
142
142
|
"selectService": "Sélectionner un service",
|
package/translations/he.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"appointmentCancelledSuccessfully": "התור בוטל בהצלחה",
|
|
11
11
|
"appointmentCheckedIn": "Appointment Checked In",
|
|
12
12
|
"appointmentConflict": "סתירת תורים",
|
|
13
|
+
"appointmentDate": "Appointment date",
|
|
13
14
|
"appointmentEdited": "התור נערך",
|
|
14
15
|
"appointmentEditError": "שגיאה בעריכת תור",
|
|
15
16
|
"appointmentEnded": "התור הסתיים",
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
"createNewAppointment": "יצירת תור חדש",
|
|
59
60
|
"date": "תאריך",
|
|
60
61
|
"date&Time": "תאריך ושעה",
|
|
62
|
+
"dateAppointmentIssued": "Date appointment issued",
|
|
61
63
|
"dateAppointmentIssuedCannotBeAfterAppointmentDate": "תאריך התור שהונפק לא יכול להיות אחרי תאריך התור",
|
|
62
64
|
"dateOfBirth": "תאריך לידה",
|
|
63
65
|
"dateRange": "Set date range",
|
|
64
66
|
"dateScheduled": "הונפק תאריך לתור",
|
|
65
|
-
"dateScheduledDetail": "הונפק תאריך לתור",
|
|
66
67
|
"dateTime": "תאריך ושעה",
|
|
67
68
|
"day": "יום",
|
|
68
69
|
"daysOfWeek": "ימי השבוע",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "בחירת מקום",
|
|
137
138
|
"selectAppointmentStatus": "בחירת מצב",
|
|
138
139
|
"selectAppointmentType": "בחירת סוג תור",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "בחירת אפשרות",
|
|
141
141
|
"selectProvider": "בחירת ספק",
|
|
142
142
|
"selectService": "בחירת שירות",
|
package/translations/hi.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",
|
|
@@ -136,7 +137,6 @@
|
|
|
136
137
|
"selectALocation": "Select a location",
|
|
137
138
|
"selectAppointmentStatus": "Select status",
|
|
138
139
|
"selectAppointmentType": "Select an appointment type",
|
|
139
|
-
"selectDate": "Select date",
|
|
140
140
|
"selectOption": "Select an option",
|
|
141
141
|
"selectProvider": "Select a provider",
|
|
142
142
|
"selectService": "Select a service",
|