mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-05-18 20:08:19 +00:00
Compare commits
3 Commits
feature/ba
...
c22d82f8c5
| Author | SHA1 | Date | |
|---|---|---|---|
| c22d82f8c5 | |||
| f52722086e | |||
| 3f551c6505 |
@@ -339,7 +339,9 @@ export const ActiveCallCard = ({ lead, callerPhone, missedCallId, onCallComplete
|
||||
<Button size="sm" color={appointmentOpen ? 'primary' : 'secondary'}
|
||||
iconLeading={({ className, ...rest }: any) => <FontAwesomeIcon icon={faCalendarPlus} className={className} {...rest} />}
|
||||
isDisabled={!wasAnsweredRef.current}
|
||||
onClick={() => { setAppointmentOpen(!appointmentOpen); setEnquiryOpen(false); setTransferOpen(false); }}>Book Appt</Button>
|
||||
onClick={() => { setAppointmentOpen(!appointmentOpen); setEnquiryOpen(false); setTransferOpen(false); }}>
|
||||
{leadAppointments.length > 0 ? 'New / Reschedule Appt' : 'New Appt'}
|
||||
</Button>
|
||||
<Button size="sm" color={enquiryOpen ? 'primary' : 'secondary'}
|
||||
iconLeading={({ className, ...rest }: any) => <FontAwesomeIcon icon={faClipboardQuestion} className={className} {...rest} />}
|
||||
isDisabled={!wasAnsweredRef.current}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Select } from '@/components/base/select/select';
|
||||
import { TextArea } from '@/components/base/textarea/textarea';
|
||||
import { Button } from '@/components/base/buttons/button';
|
||||
import { DatePicker } from '@/components/application/date-picker/date-picker';
|
||||
import { parseDate } from '@internationalized/date';
|
||||
import { parseDate, today, getLocalTimeZone } from '@internationalized/date';
|
||||
import { apiClient } from '@/lib/api-client';
|
||||
import { cx } from '@/utils/cx';
|
||||
import { notify } from '@/lib/toast';
|
||||
@@ -586,6 +586,11 @@ export const AppointmentForm = ({
|
||||
onChange={(val) => setDate(val ? val.toString() : '')}
|
||||
granularity="day"
|
||||
isDisabled={readOnly || !doctor}
|
||||
// Block past dates — appointments can't be booked or
|
||||
// rescheduled into the past. React Aria's DatePicker
|
||||
// honours minValue in both the calendar grid and the
|
||||
// typed-input fallback.
|
||||
minValue={today(getLocalTimeZone())}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -399,6 +399,9 @@ export const ClinicForm = ({ value, onChange }: ClinicFormProps) => {
|
||||
onChange={(dv: DateValue | null) =>
|
||||
updateHoliday(idx, { date: dv ? dv.toString() : '' })
|
||||
}
|
||||
// Holidays must be today or in the future — you
|
||||
// can't observe a holiday that already passed.
|
||||
minValue={today(getLocalTimeZone())}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
|
||||
Reference in New Issue
Block a user