}
/>
{filteredCalls.length === 0 ? (
No calls found
{search ? 'Try a different search term' : 'No call history available yet.'}
) : (
{(call) => {
const patientName = call.leadName ?? leadNameMap.get(call.leadId ?? '') ?? 'Unknown';
const phoneDisplay = formatPhoneDisplay(call);
const phoneRaw = call.callerNumber?.[0]?.number ?? '';
const dispositionCfg = call.disposition !== null ? dispositionConfig[call.disposition] : null;
return (
{patientName}
{phoneDisplay}
{formatDuration(call.durationSeconds)}
{dispositionCfg ? (
{dispositionCfg.label}
) : (
{'\u2014'}
)}
{(() => {
const sla = getCallSla(call);
if (!sla) return —;
return (
{sla.percent}%
);
})()}
{call.agentName ?? '\u2014'}
{call.recordingUrl ? (
) : (
{'\u2014'}
)}
{call.startedAt ? formatShortDate(call.startedAt) : '\u2014'}
{phoneRaw ? (
) : (
{'\u2014'}
)}
);
}}
)}
);
};