mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-12 02:38:15 +00:00
feat: post-call workflow — disposition, appointment booking, follow-up creation
ActiveCallCard now handles the full post-call flow: - Call ends → Disposition form appears (6 options + notes) - "Appointment Booked" → Opens appointment booking slideout - "Follow-up Needed" → Auto-creates follow-up in platform - Other dispositions → Logs call and returns to worklist - "Book Appt" button available during active call too - Creates Call record in platform on disposition submit - Removed auto-reset to idle (ActiveCallCard manages lifecycle) - "Back to Worklist" resets SIP state via Jotai atoms Also fixes: - All 7 GraphQL queries corrected (LINKS subfields, field renames) - Campaign edit button moved to bottom-right - Avg Response Time uses Math.abs for seed data edge case Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,8 @@ export const DashboardKpi = ({ calls, leads }: DashboardKpiProps) => {
|
||||
const leadsWithResponse = leads.filter((l) => l.createdAt && l.firstContactedAt);
|
||||
const avgResponseTime = leadsWithResponse.length > 0
|
||||
? Math.round(leadsWithResponse.reduce((sum, l) => {
|
||||
return sum + (new Date(l.firstContactedAt!).getTime() - new Date(l.createdAt!).getTime()) / 60000;
|
||||
const diff = Math.abs(new Date(l.firstContactedAt!).getTime() - new Date(l.createdAt!).getTime()) / 60000;
|
||||
return sum + diff;
|
||||
}, 0) / leadsWithResponse.length)
|
||||
: null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user