diff --git a/src/components/call-desk/active-call-card.tsx b/src/components/call-desk/active-call-card.tsx index dc1aa55..28e98e1 100644 --- a/src/components/call-desk/active-call-card.tsx +++ b/src/components/call-desk/active-call-card.tsx @@ -299,12 +299,15 @@ export const ActiveCallCard = ({ lead, callerPhone, missedCallId, onCallComplete + + { if (!open) setEditingAppointment(null); }} + callerNumber={callerPhone} + leadName={fullName} + leadId={lead?.id} + patientId={editingAppointment.patientId} + existingAppointment={{ + id: editingAppointment.id, + scheduledAt: editingAppointment.scheduledAt ?? '', + doctorName: editingAppointment.doctorName ?? '', + doctorId: editingAppointment.doctorId ?? undefined, + department: editingAppointment.department ?? '', + reasonForVisit: editingAppointment.reasonForVisit ?? undefined, + status: editingAppointment.appointmentStatus ?? 'SCHEDULED', + }} + onSaved={() => setEditingAppointment(null)} + /> + + ); + } + return (
{/* Lead header — always visible */} @@ -316,28 +353,6 @@ export const ContextPanel = ({ selectedLead, activities, calls, followUps, appoi
- - {/* Appointment edit form */} - {editingAppointment && ( - { if (!open) setEditingAppointment(null); }} - callerNumber={callerPhone} - leadName={fullName} - leadId={lead?.id} - patientId={editingAppointment.patientId} - existingAppointment={{ - id: editingAppointment.id, - scheduledAt: editingAppointment.scheduledAt ?? '', - doctorName: editingAppointment.doctorName ?? '', - doctorId: editingAppointment.doctorId ?? undefined, - department: editingAppointment.department ?? '', - reasonForVisit: editingAppointment.reasonForVisit ?? undefined, - status: editingAppointment.appointmentStatus ?? 'SCHEDULED', - }} - onSaved={() => setEditingAppointment(null)} - /> - )}
); }; diff --git a/src/components/call-desk/disposition-modal.tsx b/src/components/call-desk/disposition-modal.tsx index a0d01e3..eab8cff 100644 --- a/src/components/call-desk/disposition-modal.tsx +++ b/src/components/call-desk/disposition-modal.tsx @@ -102,6 +102,12 @@ const dispositionOptions: Array<{ activeClass: 'bg-utility-blue-600 text-white border-transparent', defaultClass: 'bg-utility-blue-50 text-utility-blue-700 border-utility-blue-200', }, + { + value: 'CALL_DROPPED', + label: 'Call Dropped', + activeClass: 'bg-secondary-solid text-white border-transparent', + defaultClass: 'bg-secondary text-secondary border-secondary', + }, ]; type DispositionModalProps = { diff --git a/src/components/call-desk/incoming-call-card.tsx b/src/components/call-desk/incoming-call-card.tsx index 36b6103..4eccb19 100644 --- a/src/components/call-desk/incoming-call-card.tsx +++ b/src/components/call-desk/incoming-call-card.tsx @@ -59,6 +59,7 @@ const dispositionLabels: Record = { WRONG_NUMBER: 'Wrong Number', NOT_INTERESTED: 'Not Interested', CALLBACK_REQUESTED: 'Callback Requested', + CALL_DROPPED: 'Call Dropped', }; export const IncomingCallCard = ({ callState, lead, activities, campaigns, onDisposition, completedDisposition }: IncomingCallCardProps) => { diff --git a/src/components/call-desk/worklist-panel.tsx b/src/components/call-desk/worklist-panel.tsx index 69138ca..0df08ca 100644 --- a/src/components/call-desk/worklist-panel.tsx +++ b/src/components/call-desk/worklist-panel.tsx @@ -289,7 +289,10 @@ const buildRows = (missedCalls: MissedCall[], followUps: WorklistFollowUp[], lea export const WorklistPanel = ({ missedCalls, followUps, leads, loading, onSelectLead, selectedLeadId, onDialMissedCall }: WorklistPanelProps) => { const [tab, setTab] = useState('all'); const [search, setSearch] = useState(''); - const [missedSubTab, setMissedSubTab] = useState('pending'); + // Missed tab always shows PENDING callbacks. Attempted/Completed/Invalid + // sub-tabs were removed per QA feedback — pending callbacks are the only + // ones agents need to act on from the worklist. + const missedSubTab: MissedSubTab = 'pending'; // Default SLA sort is ascending — the bucket-sorted result puts the // most-urgent rows at the top (overdue → oldest reactive → soonest due). const [sortDescriptor, setSortDescriptor] = useState({ column: 'sla', direction: 'ascending' }); @@ -439,30 +442,9 @@ export const WorklistPanel = ({ missedCalls, followUps, leads, loading, onSelect - {/* Missed call status sub-tabs */} - {tab === 'missed' && ( -
- {(['pending', 'attempted'] as MissedSubTab[]).map(sub => ( - - ))} -
- )} + {/* Missed-call sub-tabs removed per QA feedback — the Missed tab + now only shows pending callbacks. Attempted is redundant once + the worklist is the single source of truth. */} {filteredRows.length === 0 ? (
diff --git a/src/pages/agent-detail.tsx b/src/pages/agent-detail.tsx index 4bb44ab..dba6659 100644 --- a/src/pages/agent-detail.tsx +++ b/src/pages/agent-detail.tsx @@ -73,6 +73,7 @@ const dispositionConfig: Record { diff --git a/src/pages/call-history.tsx b/src/pages/call-history.tsx index a84be87..f9b646b 100644 --- a/src/pages/call-history.tsx +++ b/src/pages/call-history.tsx @@ -43,6 +43,7 @@ const dispositionConfig: Record { diff --git a/src/pages/my-performance.tsx b/src/pages/my-performance.tsx index 422ed1d..1d2be72 100644 --- a/src/pages/my-performance.tsx +++ b/src/pages/my-performance.tsx @@ -217,6 +217,7 @@ export const MyPerformancePage = () => { ], barWidth: '50%', itemStyle: { borderRadius: [4, 4, 0, 0] }, + label: { show: true, position: 'top', fontSize: 11, color: '#344054', fontWeight: 600 }, }], }} style={{ height: 240 }} @@ -244,8 +245,9 @@ export const MyPerformancePage = () => { type: 'pie', radius: ['45%', '70%'], center: ['35%', '50%'], - avoidLabelOverlap: false, - label: { show: false }, + avoidLabelOverlap: true, + label: { show: true, formatter: '{d}%', fontSize: 11, color: '#344054', fontWeight: 600 }, + labelLine: { show: true, length: 6, length2: 6 }, data: Object.entries(data.dispositions).map(([name, value], i) => ({ name, value, diff --git a/src/pages/patient-360.tsx b/src/pages/patient-360.tsx index 916bf55..be3a97a 100644 --- a/src/pages/patient-360.tsx +++ b/src/pages/patient-360.tsx @@ -59,6 +59,7 @@ const DISPOSITION_COLORS: Record { xAxis: { type: 'category', data: days }, yAxis: { type: 'value' }, series: [ - { name: 'Inbound', type: 'line', data: days.map(d => dayMap[d].inbound), smooth: true, color: '#2060A0' }, - { name: 'Outbound', type: 'line', data: days.map(d => dayMap[d].outbound), smooth: true, color: '#E88C30' }, + { name: 'Inbound', type: 'line', data: days.map(d => dayMap[d].inbound), smooth: true, color: '#2060A0', label: { show: true, fontSize: 10, color: '#344054', fontWeight: 600, position: 'top' } }, + { name: 'Outbound', type: 'line', data: days.map(d => dayMap[d].outbound), smooth: true, color: '#E88C30', label: { show: true, fontSize: 10, color: '#344054', fontWeight: 600, position: 'top' } }, ], }; }, [allCalls]); diff --git a/src/types/entities.ts b/src/types/entities.ts index 3261ee3..474648d 100644 --- a/src/types/entities.ts +++ b/src/types/entities.ts @@ -257,7 +257,8 @@ export type CallDisposition = | 'WRONG_NUMBER' | 'NO_ANSWER' | 'NOT_INTERESTED' - | 'CALLBACK_REQUESTED'; + | 'CALLBACK_REQUESTED' + | 'CALL_DROPPED'; export type Call = { id: string;