improvement: some improvement done for appointment and treatment shared components.
This commit is contained in:
@@ -203,13 +203,16 @@ export function AppointmentBookingModal({
|
||||
}
|
||||
|
||||
const now = new Date();
|
||||
if (isSameLocalCalendarDay(scheduleDate, now) && startAt.getTime() < now.getTime()) {
|
||||
if (
|
||||
!editingAppointment &&
|
||||
isSameLocalCalendarDay(scheduleDate, now) &&
|
||||
startAt.getTime() < now.getTime()
|
||||
) {
|
||||
setError(t('errorPastSchedule'));
|
||||
return;
|
||||
}
|
||||
|
||||
const today = new Date();
|
||||
if (compareLocalDayStart(scheduleDate, today) < 0) {
|
||||
if (!editingAppointment && compareLocalDayStart(scheduleDate, now) < 0) {
|
||||
setError(t('errorPastViewOnly'));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user