feat: telephony overhaul + appointment availability + Force Ready

Telephony:
- Track UCID from SIP headers and ManualDial response
- Submit disposition to Ozonetel via Set Disposition API (ends ACW)
- Fix outboundPending flag lifecycle to prevent inbound poisoning
- Fix render order: post-call UI takes priority over active state
- Pre-select disposition when appointment booked during call

Appointment form:
- Convert from slideout to inline collapsible below call card
- Fetch real doctors from platform, filter by department
- Show time slot availability grid (booked slots greyed + strikethrough)
- Double-check availability before booking
- Support edit and cancel existing appointments

UI:
- Add Force Ready button to profile menu (logout+login to clear ACW)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-20 20:24:58 +05:30
parent f13decefc4
commit 99bca1e008
7 changed files with 1328 additions and 284 deletions

View File

@@ -5,6 +5,7 @@ import { cx } from '@/utils/cx';
interface DispositionFormProps {
onSubmit: (disposition: CallDisposition, notes: string) => void;
defaultDisposition?: CallDisposition | null;
}
const dispositionOptions: Array<{
@@ -51,8 +52,8 @@ const dispositionOptions: Array<{
},
];
export const DispositionForm = ({ onSubmit }: DispositionFormProps) => {
const [selected, setSelected] = useState<CallDisposition | null>(null);
export const DispositionForm = ({ onSubmit, defaultDisposition }: DispositionFormProps) => {
const [selected, setSelected] = useState<CallDisposition | null>(defaultDisposition ?? null);
const [notes, setNotes] = useState('');
const handleSubmit = () => {