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:
@@ -254,7 +254,17 @@ const StormDetailDrawer = ({ storm, open, onClose, onFlyTo }) => {
|
||||
const dateLabel = new Date(storm.date).toLocaleDateString('en-US', { weekday: 'short', month: 'long', day: 'numeric', year: 'numeric' });
|
||||
|
||||
const handleCreateLead = () => {
|
||||
navigate('/emp/fa/leads/new');
|
||||
navigate('/emp/fa/leads/new', {
|
||||
state: {
|
||||
stormSource: {
|
||||
id: storm.id,
|
||||
date: storm.date,
|
||||
areaName: storm.areaName,
|
||||
maxHailSize: storm.maxHailSize,
|
||||
severity: storm.severity,
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const handleViewInDispatch = () => {
|
||||
|
||||
Reference in New Issue
Block a user