feat(storm-intel): Phase 2 — storm-sourced lead generation flow

When a canvasser taps "Create Lead from Zone" in the Storm Intel detail drawer,
router state carries the storm context into CreateLeadPage:

- CreateLeadPage reads stormSource from location.state; initialises the form with
  city=Plano, state=TX, leadSource=Door Knock, urgency=high for significant/severe
  storms, and a pre-filled notes field with zone name, hail size, and date
- Amber storm banner renders below the page header showing zone name, hail size,
  and a note that urgency was auto-set; dismissible with X
- stormSource is saved on the lead object via the existing addLead spread
- LeadsListPage LeadCard shows an amber "Storm Zone" badge when lead.stormSource exists
- KanbanCard footer shows a compact amber "Storm" label for storm-sourced leads
This commit is contained in:
Satyam-Rastogi
2026-05-18 17:06:04 +05:30
parent 2e797c89f6
commit 4cface49da
4 changed files with 101 additions and 9 deletions
+12 -4
View File
@@ -1,7 +1,7 @@
import React from 'react';
import { useDraggable } from '@dnd-kit/core';
import { CSS } from '@dnd-kit/utilities';
import { MapPin, User, Clock } from 'lucide-react';
import { MapPin, User, Clock, CloudLightning } from 'lucide-react';
function getInitials(name) {
return (name || '').split(' ').map(w => w[0]).join('').slice(0, 2).toUpperCase();
@@ -93,9 +93,17 @@ export function KanbanCardDisplay({ lead, columnColor, isOverlay = false, onClic
{lead.assignedAgentName ?? 'Unassigned'}
</span>
</div>
<div className="flex items-center gap-1 shrink-0">
<Clock size={10} className="text-zinc-400" />
<span className="text-[11px] text-zinc-400 dark:text-zinc-500">{days}d</span>
<div className="flex items-center gap-1.5 shrink-0">
{lead.stormSource && (
<span className="flex items-center gap-0.5 text-[10px] font-bold text-amber-600 dark:text-amber-400">
<CloudLightning size={9} />
Storm
</span>
)}
<div className="flex items-center gap-1">
<Clock size={10} className="text-zinc-400" />
<span className="text-[11px] text-zinc-400 dark:text-zinc-500">{days}d</span>
</div>
</div>
</div>
</div>