fix(kanban): responsive layout, drag-drop offset, and project view enhancements

Kanban pipeline board:
- Fix h-full flex-col layout so board fills viewport height on all screen sizes
- KanbanColumn drop zone: flex-1 min-h-0 so it expands to fill full column height
- KanbanCard: extract KanbanCardDisplay as named export for DragOverlay rendering above overflow containers
- KanbanPage: lift DndContext to page root; add "Add Stage" shortcut to page header
- PageTransition: remove slide-in-from-bottom-4 transform — the CSS transform ancestor was creating a containing block for position:fixed DragOverlay, causing drag ghost to render at a viewport offset
- Migrate fireCampaignToast to toast.custom() Sonner v2 API with explicit card styling

Project & lead views:
- LeadProjectPage: enrich project detail with richer info sections aligned with project stage
- OwnerProjectDetail: expand construction project detail with additional data panels
- OwnerProjectList: project list view improvements
- mockStore: extend lead/project data to support richer project detail rendering
This commit is contained in:
Satyam-Rastogi
2026-04-08 23:40:45 +05:30
parent b1ece35ac8
commit c584d918ac
8 changed files with 2290 additions and 384 deletions
+523
View File
@@ -4319,6 +4319,528 @@ const KANBAN_LEADS_INITIAL = [
},
];
// Enriched project data for signed/in-progress/complete leads
// Keyed by lead ID. Only present for leads that have become active jobs.
const KANBAN_PROJECT_DATA = {
// SIGNED LEADS
kl_023: {
estimatedAmount: 18200, actualCost: 0, variancePercent: 0, completionPct: 25, healthScore: 88,
contractorName: 'Plano Roofing Crew A', contractorPhone: '(972) 555-9001',
budgetBreakdown: [
{ category: 'Materials', allocated: 9800, committed: 9800, actual: 0 },
{ category: 'Labor', allocated: 6200, committed: 6200, actual: 0 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 0 },
{ category: 'Contingency',allocated: 1600, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-03-22', notes: 'Deposit received.' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-03-24', notes: 'GAF Timberline HDZ — Charcoal ordered.' },
{ id: 'm3', name: 'Permits Pulled', status: 'in_progress',date: '2026-04-05', notes: 'City permit submitted, pending approval.' },
{ id: 'm4', name: 'Tear-off & Decking', status: 'pending', date: null, notes: '' },
{ id: 'm5', name: 'Roofing Install', status: 'pending', date: null, notes: '' },
{ id: 'm6', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 30%', amount: 5460, status: 'paid', dueDate: '2026-03-22', paidDate: '2026-03-22' },
{ id: 'inv2', description: 'Progress — 40%', amount: 7280, status: 'pending', dueDate: '2026-04-14', paidDate: null },
{ id: 'inv3', description: 'Final — 30%', amount: 5460, status: 'pending', dueDate: '2026-04-15', paidDate: null },
],
workTimeline: [
{ date: '2026-03-22', action: 'Contract Executed', user: 'Felicity Fast', details: 'Client signed. 30% deposit collected.' },
{ date: '2026-03-24', action: 'Materials Ordered', user: 'Adam Admin', details: 'GAF Timberline HDZ Charcoal — 24 squares ordered.' },
{ date: '2026-04-05', action: 'Permit Submitted', user: 'Adam Admin', details: 'Plano city permit application filed.' },
],
},
kl_024: {
estimatedAmount: 31500, actualCost: 0, variancePercent: 0, completionPct: 20, healthScore: 85,
contractorName: 'Plano Siding Crew', contractorPhone: '(972) 555-9002',
budgetBreakdown: [
{ category: 'Materials', allocated: 17000, committed: 17000, actual: 0 },
{ category: 'Labor', allocated: 11500, committed: 11500, actual: 0 },
{ category: 'Permits', allocated: 800, committed: 800, actual: 0 },
{ category: 'Contingency',allocated: 2200, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-03-20', notes: 'Insurance approved full scope.' },
{ id: 'm2', name: 'Materials Ordered',status: 'completed', date: '2026-03-23', notes: 'James Hardie Board & Batten ordered.' },
{ id: 'm3', name: 'Permit Pulled', status: 'pending', date: null, notes: '' },
{ id: 'm4', name: 'Prep & Demo', status: 'pending', date: null, notes: '' },
{ id: 'm5', name: 'Siding Install', status: 'pending', date: null, notes: '' },
{ id: 'm6', name: 'Trim & Caulk', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm8', name: 'Invoice & Payment',status: 'pending', date: null, notes: '' },
],
changeOrders: [],
rfis: [
{ id: 'rfi1', subject: 'HOA Color Approval', status: 'open', submittedBy: 'Fiona Field', openedDate: '2026-03-25', closedDate: null, description: 'Need written HOA approval for Cobblestone color before install.' },
],
invoices: [
{ id: 'inv1', description: 'Deposit — 25%', amount: 7875, status: 'paid', dueDate: '2026-03-20', paidDate: '2026-03-20' },
{ id: 'inv2', description: 'Progress — 50%', amount: 15750,status: 'pending', dueDate: '2026-04-25', paidDate: null },
{ id: 'inv3', description: 'Final — 25%', amount: 7875, status: 'pending', dueDate: '2026-05-01', paidDate: null },
],
workTimeline: [
{ date: '2026-03-20', action: 'Contract Executed', user: 'Fiona Field', details: 'Insurance-approved scope. Full 2,400 sq ft siding.' },
{ date: '2026-03-23', action: 'Materials Ordered', user: 'Adam Admin', details: 'James Hardie Board & Batten — Cobblestone, 2,400 sq ft.' },
{ date: '2026-03-25', action: 'RFI Opened', user: 'Fiona Field', details: 'HOA color approval required before start.' },
],
},
kl_025: {
estimatedAmount: 27800, actualCost: 0, variancePercent: 0, completionPct: 28, healthScore: 92,
contractorName: 'Plano Roofing Crew B', contractorPhone: '(972) 555-9003',
budgetBreakdown: [
{ category: 'Materials', allocated: 15200, committed: 15200, actual: 0 },
{ category: 'Labor', allocated: 9800, committed: 9800, actual: 0 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 0 },
{ category: 'Contingency',allocated: 2200, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-03-11', notes: '50% deposit received.' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-03-12', notes: 'Owens Corning TruDefinition — Driftwood.' },
{ id: 'm3', name: 'Permits Pulled', status: 'completed', date: '2026-03-20', notes: 'Permit approved.' },
{ id: 'm4', name: 'Tear-off & Decking', status: 'pending', date: null, notes: '' },
{ id: 'm5', name: 'Roofing Install', status: 'pending', date: null, notes: '' },
{ id: 'm6', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 50%', amount: 13900, status: 'paid', dueDate: '2026-03-11', paidDate: '2026-03-11' },
{ id: 'inv2', description: 'Final — 50%', amount: 13900, status: 'pending', dueDate: '2026-04-20', paidDate: null },
],
workTimeline: [
{ date: '2026-03-11', action: 'Contract Executed', user: 'Frank Agent', details: 'Cash client. 50% deposit paid same day.' },
{ date: '2026-03-12', action: 'Materials Ordered', user: 'Adam Admin', details: 'Owens Corning TruDefinition Duration — 28 squares.' },
{ date: '2026-03-20', action: 'Permit Approved', user: 'Adam Admin', details: 'City of Plano residential roofing permit #RFP-2026-1148.' },
],
},
kl_026: {
estimatedAmount: 22400, actualCost: 0, variancePercent: 0, completionPct: 22, healthScore: 86,
contractorName: 'Plano Roofing Crew A', contractorPhone: '(972) 555-9001',
budgetBreakdown: [
{ category: 'Roofing Materials', allocated: 10800, committed: 10800, actual: 0 },
{ category: 'Gutter Materials', allocated: 3400, committed: 3400, actual: 0 },
{ category: 'Labor', allocated: 6400, committed: 6400, actual: 0 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 0 },
{ category: 'Contingency', allocated: 1200, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-03-25', notes: 'Install Apr 18.' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-03-27', notes: 'Roofing + gutters ordered.' },
{ id: 'm3', name: 'Permits Pulled', status: 'pending', date: null, notes: '' },
{ id: 'm4', name: 'Roofing Install', status: 'pending', date: null, notes: '' },
{ id: 'm5', name: 'Gutter Install', status: 'pending', date: null, notes: '' },
{ id: 'm6', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 30%', amount: 6720, status: 'paid', dueDate: '2026-03-25', paidDate: '2026-03-25' },
{ id: 'inv2', description: 'Progress — 40%', amount: 8960, status: 'pending', dueDate: '2026-04-18', paidDate: null },
{ id: 'inv3', description: 'Final — 30%', amount: 6720, status: 'pending', dueDate: '2026-04-22', paidDate: null },
],
workTimeline: [
{ date: '2026-03-25', action: 'Contract Executed', user: 'Felix Fixer', details: 'Insurance approved full roof + gutter scope.' },
{ date: '2026-03-27', action: 'Materials Ordered', user: 'Adam Admin', details: 'GAF shingles + K-style 6" gutters ordered.' },
],
},
kl_027: {
estimatedAmount: 19600, actualCost: 0, variancePercent: 0, completionPct: 24, healthScore: 80,
contractorName: 'Plano Roofing Crew C', contractorPhone: '(972) 555-9004',
budgetBreakdown: [
{ category: 'Materials', allocated: 10500, committed: 10500, actual: 0 },
{ category: 'Labor', allocated: 7000, committed: 7000, actual: 0 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 0 },
{ category: 'Contingency',allocated: 1500, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-03-28', notes: 'Supplement approved after adjuster re-inspection.' },
{ id: 'm2', name: 'Materials Ordered', status: 'in_progress',date: '2026-04-02', notes: 'Waiting on special color availability.' },
{ id: 'm3', name: 'Permits Pulled', status: 'pending', date: null, notes: '' },
{ id: 'm4', name: 'Tear-off & Decking',status: 'pending', date: null, notes: '' },
{ id: 'm5', name: 'Roofing Install', status: 'pending', date: null, notes: '' },
{ id: 'm6', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [
{ id: 'co1', title: 'Supplemental — Ice & Water Barrier', amount: 1800, status: 'approved', requestedBy: 'Felicity Fast', date: '2026-03-10', description: 'Insurance adjuster agreed to add ice/water shield on all valleys and eaves.' },
],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 30%', amount: 5880, status: 'paid', dueDate: '2026-03-28', paidDate: '2026-03-28' },
{ id: 'inv2', description: 'Progress — 40%', amount: 7840, status: 'pending', dueDate: '2026-04-25', paidDate: null },
{ id: 'inv3', description: 'Final — 30%', amount: 5880, status: 'pending', dueDate: '2026-04-28', paidDate: null },
],
workTimeline: [
{ date: '2026-03-28', action: 'Contract Executed', user: 'Felicity Fast', details: 'Signed after 6-week negotiation on supplement items.' },
{ date: '2026-04-02', action: 'Materials Ordered', user: 'Adam Admin', details: 'Special color availability causing 1-week delay.' },
],
},
// IN PROGRESS LEADS
kl_028: {
estimatedAmount: 16800, actualCost: 9200, variancePercent: -3.6, completionPct: 65, healthScore: 82,
contractorName: 'Plano Roofing Crew A', contractorPhone: '(972) 555-9001',
budgetBreakdown: [
{ category: 'Materials', allocated: 9000, committed: 9000, actual: 8600 },
{ category: 'Labor', allocated: 5800, committed: 5800, actual: 600 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 600 },
{ category: 'Contingency',allocated: 1400, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-02-28', notes: '' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-03-02', notes: '' },
{ id: 'm3', name: 'Permits Pulled', status: 'completed', date: '2026-03-10', notes: '' },
{ id: 'm4', name: 'Tear-off & Decking', status: 'completed', date: '2026-03-18', notes: 'Tear-off complete. Two rotted deck boards replaced.' },
{ id: 'm5', name: 'Roofing Install', status: 'in_progress',date: '2026-04-07', notes: 'New decking being installed today.' },
{ id: 'm6', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [
{ id: 'co1', title: 'Decking Replacement — 2 Sheets', amount: 480, status: 'approved', requestedBy: 'Frank Agent', date: '2026-03-18', description: 'Two rotted OSB sheets discovered during tear-off. Replaced at cost.' },
],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 30%', amount: 5040, status: 'paid', dueDate: '2026-02-28', paidDate: '2026-02-28' },
{ id: 'inv2', description: 'Progress — 40%', amount: 6720, status: 'paid', dueDate: '2026-03-20', paidDate: '2026-03-20' },
{ id: 'inv3', description: 'Final — 30%', amount: 5040, status: 'pending', dueDate: '2026-04-10', paidDate: null },
],
workTimeline: [
{ date: '2026-02-28', action: 'Contract Executed', user: 'Frank Agent', details: 'Signed. Production team notified.' },
{ date: '2026-03-18', action: 'Production Started', user: 'Adam Admin', details: 'Tear-off crew on site. Two rotted deck boards found and replaced.' },
{ date: '2026-03-20', action: 'Progress Invoice Paid', user: 'Adam Admin', details: 'Client paid progress invoice on time.' },
{ date: '2026-04-07', action: 'Decking Install', user: 'Adam Admin', details: 'New decking going on today. Roofing shingles start tomorrow.' },
],
},
kl_029: {
estimatedAmount: 28500, actualCost: 14800, variancePercent: 1.4, completionPct: 55, healthScore: 78,
contractorName: 'Plano Siding Crew', contractorPhone: '(972) 555-9002',
budgetBreakdown: [
{ category: 'Materials', allocated: 15400, committed: 15400, actual: 14200 },
{ category: 'Labor', allocated: 10400, committed: 10400, actual: 600 },
{ category: 'Permits', allocated: 800, committed: 800, actual: 800 },
{ category: 'Contingency', allocated: 1900, committed: 400, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-02-25', notes: '' },
{ id: 'm2', name: 'Materials Ordered',status: 'completed', date: '2026-02-27', notes: '' },
{ id: 'm3', name: 'Permit Pulled', status: 'completed', date: '2026-03-05', notes: '' },
{ id: 'm4', name: 'Prep & Demo', status: 'completed', date: '2026-03-25', notes: 'Old siding removed. Minor rot on 2 panels fixed.' },
{ id: 'm5', name: 'Siding Install', status: 'in_progress',date: '2026-04-05', notes: 'Day 3 of install. On track.' },
{ id: 'm6', name: 'Trim & Caulk', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm8', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [
{ id: 'co1', title: 'Rot Repair — 2 Panels', amount: 380, status: 'approved', requestedBy: 'Fiona Field', date: '2026-03-25', description: 'Two panels of rotted OSB substrate discovered during demo. Repaired.' },
],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 25%', amount: 7125, status: 'paid', dueDate: '2026-02-25', paidDate: '2026-02-25' },
{ id: 'inv2', description: 'Progress — 50%', amount: 14250,status: 'pending', dueDate: '2026-04-08', paidDate: null },
{ id: 'inv3', description: 'Final — 25%', amount: 7125, status: 'pending', dueDate: '2026-04-15', paidDate: null },
],
workTimeline: [
{ date: '2026-02-25', action: 'Contract Executed', user: 'Fiona Field', details: 'Insurance approved full scope.' },
{ date: '2026-03-25', action: 'Production Started', user: 'Adam Admin', details: 'Demo complete. Minor rot on 2 panels — change order raised.' },
{ date: '2026-04-05', action: 'Install Underway', user: 'Adam Admin', details: 'Siding install Day 3. On track for Friday completion.' },
],
},
kl_030: {
estimatedAmount: 21200, actualCost: 16100, variancePercent: -4.2, completionPct: 78, healthScore: 88,
contractorName: 'Plano Roofing Crew B', contractorPhone: '(972) 555-9003',
budgetBreakdown: [
{ category: 'Roofing Materials', allocated: 10200, committed: 10200, actual: 9800 },
{ category: 'Gutter Materials', allocated: 3200, committed: 3200, actual: 3100 },
{ category: 'Labor', allocated: 6000, committed: 6000, actual: 3200 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 600 },
{ category: 'Contingency', allocated: 1200, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-02-24', notes: '' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-02-26', notes: '' },
{ id: 'm3', name: 'Permits Pulled', status: 'completed', date: '2026-03-05', notes: '' },
{ id: 'm4', name: 'Tear-off & Decking',status: 'completed', date: '2026-03-20', notes: 'Clean tear-off. No deck issues.' },
{ id: 'm5', name: 'Roofing Install', status: 'completed', date: '2026-03-22', notes: 'Roofing complete.' },
{ id: 'm6', name: 'Gutter Install', status: 'in_progress',date: '2026-04-07', notes: 'Gutter crew arriving today.' },
{ id: 'm7', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm8', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 30%', amount: 6360, status: 'paid', dueDate: '2026-02-24', paidDate: '2026-02-24' },
{ id: 'inv2', description: 'Progress — 40%', amount: 8480, status: 'paid', dueDate: '2026-03-22', paidDate: '2026-03-22' },
{ id: 'inv3', description: 'Final — 30%', amount: 6360, status: 'pending', dueDate: '2026-04-10', paidDate: null },
],
workTimeline: [
{ date: '2026-02-24', action: 'Contract Executed', user: 'Felicity Fast', details: '' },
{ date: '2026-03-20', action: 'Roofing Started', user: 'Amanda Manager', details: 'Production underway — roofing crew Day 1.' },
{ date: '2026-03-22', action: 'Roofing Complete', user: 'Amanda Manager', details: 'Roof done. Progress invoice sent.' },
{ date: '2026-04-07', action: 'Gutter Install', user: 'Amanda Manager', details: 'Gutter crew arriving today for 1-day install.' },
],
},
kl_031: {
estimatedAmount: 34500, actualCost: 22000, variancePercent: 2.9, completionPct: 60, healthScore: 90,
contractorName: 'Plano Roofing Crew C', contractorPhone: '(972) 555-9004',
budgetBreakdown: [
{ category: 'Premium Materials', allocated: 19200, committed: 19200, actual: 18800 },
{ category: 'Labor', allocated: 12000, committed: 12000, actual: 3200 },
{ category: 'Permits', allocated: 700, committed: 700, actual: 700 },
{ category: 'Contingency', allocated: 2600, committed: 1000, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-03-03', notes: 'Cash client. Barkwood color selected.' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-03-05', notes: 'Special order — GAF Timberline HDZ Barkwood. 3-week lead time.' },
{ id: 'm3', name: 'Permits Pulled', status: 'completed', date: '2026-03-12', notes: '' },
{ id: 'm4', name: 'Tear-off & Decking', status: 'completed', date: '2026-03-28', notes: 'Premium deck prep complete. No issues.' },
{ id: 'm5', name: 'Roofing Install', status: 'in_progress',date: '2026-03-28', notes: 'Premium HDZ install underway.' },
{ id: 'm6', name: 'Ridge & Detail', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm8', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [],
rfis: [
{ id: 'rfi1', subject: 'Lifetime Warranty Registration', status: 'open', submittedBy: 'Felix Fixer', openedDate: '2026-03-05', closedDate: null, description: 'GAF factory warranty registration requires installer certification — need to confirm with crew.' },
],
invoices: [
{ id: 'inv1', description: 'Deposit — 100%', amount: 34500, status: 'paid', dueDate: '2026-03-03', paidDate: '2026-03-03' },
],
workTimeline: [
{ date: '2026-03-03', action: 'Contract Executed', user: 'Felix Fixer', details: 'Cash client — full payment upfront.' },
{ date: '2026-03-28', action: 'Production Started', user: 'Amanda Manager',details: 'Materials arrived. Premium install started.' },
],
},
kl_032: {
estimatedAmount: 9400, actualCost: 6200, variancePercent: -1.1, completionPct: 70, healthScore: 84,
contractorName: 'Plano Siding Crew', contractorPhone: '(972) 555-9002',
budgetBreakdown: [
{ category: 'Materials', allocated: 4800, committed: 4800, actual: 4600 },
{ category: 'Labor', allocated: 3600, committed: 3600, actual: 1600 },
{ category: 'Permits', allocated: 500, committed: 500, actual: 500 },
{ category: 'Contingency',allocated: 500, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-03-07', notes: '' },
{ id: 'm2', name: 'Materials Ordered',status: 'completed', date: '2026-03-09', notes: '' },
{ id: 'm3', name: 'Permit Pulled', status: 'completed', date: '2026-03-20', notes: '' },
{ id: 'm4', name: 'South Face', status: 'completed', date: '2026-04-01', notes: 'South face complete.' },
{ id: 'm5', name: 'West Face', status: 'in_progress',date: '2026-04-06', notes: '2 days remaining.' },
{ id: 'm6', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Invoice & Payment',status: 'pending', date: null, notes: '' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 40%', amount: 3760, status: 'paid', dueDate: '2026-03-07', paidDate: '2026-03-07' },
{ id: 'inv2', description: 'Progress — 30%', amount: 2820, status: 'paid', dueDate: '2026-04-01', paidDate: '2026-04-02' },
{ id: 'inv3', description: 'Final — 30%', amount: 2820, status: 'pending', dueDate: '2026-04-10', paidDate: null },
],
workTimeline: [
{ date: '2026-03-07', action: 'Contract Executed', user: 'Frank Agent', details: 'Partial repair — south and west faces only.' },
{ date: '2026-04-01', action: 'South Face Done', user: 'Adam Admin', details: 'South face siding complete. Starting west face.' },
],
},
kl_033: {
estimatedAmount: 42000, actualCost: 18000, variancePercent: 0.8, completionPct: 45, healthScore: 74,
contractorName: 'Plano Roofing Crew A', contractorPhone: '(972) 555-9001',
budgetBreakdown: [
{ category: 'Materials', allocated: 22000, committed: 22000, actual: 17200 },
{ category: 'Labor', allocated: 15500, committed: 15500, actual: 800 },
{ category: 'Permits', allocated: 900, committed: 900, actual: 900 },
{ category: 'Contingency', allocated: 3600, committed: 2000, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-02-15', notes: 'Largest job this quarter.' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-02-18', notes: '3 pallets — 36 squares.' },
{ id: 'm3', name: 'Permits Pulled', status: 'completed', date: '2026-03-01', notes: '' },
{ id: 'm4', name: 'Tear-off & Decking', status: 'in_progress',date: '2026-04-05', notes: 'Day 1 of 3. Two crews deployed.' },
{ id: 'm5', name: 'Roofing Install', status: 'pending', date: null, notes: '' },
{ id: 'm6', name: 'Final Inspection', status: 'pending', date: null, notes: '' },
{ id: 'm7', name: 'Invoice & Payment', status: 'pending', date: null, notes: '' },
],
changeOrders: [],
rfis: [
{ id: 'rfi1', subject: 'Structural Load — Chimney Flashing', status: 'open', submittedBy: 'Fiona Field', openedDate: '2026-04-05', closedDate: null, description: 'Large chimney requires custom step flashing — need architect sign-off for load specs.' },
],
invoices: [
{ id: 'inv1', description: 'Deposit — 25%', amount: 10500, status: 'paid', dueDate: '2026-02-15', paidDate: '2026-02-15' },
{ id: 'inv2', description: 'Progress — 50%', amount: 21000, status: 'pending', dueDate: '2026-04-08', paidDate: null },
{ id: 'inv3', description: 'Final — 25%', amount: 10500, status: 'pending', dueDate: '2026-04-15', paidDate: null },
],
workTimeline: [
{ date: '2026-02-15', action: 'Contract Executed', user: 'Fiona Field', details: 'Largest job this quarter — $42,000, 3,600 sq ft.' },
{ date: '2026-04-05', action: 'Production Started', user: 'Adam Admin', details: 'Day 1 of 3-day job. Two crews on site.' },
{ date: '2026-04-05', action: 'RFI Opened', user: 'Fiona Field', details: 'Custom chimney flashing — architect sign-off required.' },
],
},
// COMPLETE LEADS
kl_034: {
estimatedAmount: 17200, actualCost: 16950, variancePercent: -1.5, completionPct: 100, healthScore: 95,
contractorName: 'Plano Roofing Crew B', contractorPhone: '(972) 555-9003',
budgetBreakdown: [
{ category: 'Materials', allocated: 9200, committed: 9200, actual: 8980 },
{ category: 'Labor', allocated: 6000, committed: 6000, actual: 6000 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 600 },
{ category: 'Contingency', allocated: 1400, committed: 400, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-02-01', notes: '' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-02-03', notes: '' },
{ id: 'm3', name: 'Permits Pulled', status: 'completed', date: '2026-02-12', notes: '' },
{ id: 'm4', name: 'Tear-off & Decking', status: 'completed', date: '2026-02-20', notes: 'Clean tear-off.' },
{ id: 'm5', name: 'Roofing Install', status: 'completed', date: '2026-02-21', notes: 'Install complete in 1 day.' },
{ id: 'm6', name: 'Final Inspection', status: 'completed', date: '2026-02-28', notes: 'Passed. Client gave 5-star review.' },
{ id: 'm7', name: 'Invoice & Payment', status: 'completed', date: '2026-03-01', notes: 'Full payment received.' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 30%', amount: 5160, status: 'paid', dueDate: '2026-02-01', paidDate: '2026-02-01' },
{ id: 'inv2', description: 'Progress — 40%', amount: 6880, status: 'paid', dueDate: '2026-02-21', paidDate: '2026-02-22' },
{ id: 'inv3', description: 'Final — 30%', amount: 5160, status: 'paid', dueDate: '2026-03-01', paidDate: '2026-03-01' },
],
workTimeline: [
{ date: '2026-02-01', action: 'Contract Executed', user: 'Frank Agent', details: '' },
{ date: '2026-02-20', action: 'Production Started', user: 'Adam Admin', details: 'Tear-off crew on site.' },
{ date: '2026-02-21', action: 'Install Complete', user: 'Adam Admin', details: 'Full install done in 1 day.' },
{ date: '2026-02-28', action: 'Final Inspection', user: 'Adam Admin', details: 'Passed. Client extremely happy. 5-star review.' },
{ date: '2026-03-01', action: 'Project Closed', user: 'Adam Admin', details: 'Final payment received. File closed.' },
],
},
kl_035: {
estimatedAmount: 26400, actualCost: 26100, variancePercent: -1.1, completionPct: 100, healthScore: 93,
contractorName: 'Plano Siding Crew', contractorPhone: '(972) 555-9002',
budgetBreakdown: [
{ category: 'Materials', allocated: 14200, committed: 14200, actual: 13900 },
{ category: 'Labor', allocated: 9600, committed: 9600, actual: 9600 },
{ category: 'Permits', allocated: 800, committed: 800, actual: 800 },
{ category: 'Contingency', allocated: 1800, committed: 200, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-01-28', notes: '' },
{ id: 'm2', name: 'Materials Ordered',status: 'completed', date: '2026-01-30', notes: '' },
{ id: 'm3', name: 'Permit Pulled', status: 'completed', date: '2026-02-05', notes: '' },
{ id: 'm4', name: 'Prep & Demo', status: 'completed', date: '2026-02-15', notes: 'Old siding removed cleanly.' },
{ id: 'm5', name: 'Siding Install', status: 'completed', date: '2026-02-19', notes: '' },
{ id: 'm6', name: 'Trim & Caulk', status: 'completed', date: '2026-02-20', notes: '' },
{ id: 'm7', name: 'Final Inspection', status: 'completed', date: '2026-02-21', notes: 'Insurance proceeds released.' },
{ id: 'm8', name: 'Invoice & Payment',status: 'completed', date: '2026-02-22', notes: 'Full payment received.' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 25%', amount: 6600, status: 'paid', dueDate: '2026-01-28', paidDate: '2026-01-28' },
{ id: 'inv2', description: 'Progress — 50%', amount: 13200,status: 'paid', dueDate: '2026-02-19', paidDate: '2026-02-19' },
{ id: 'inv3', description: 'Final — 25%', amount: 6600, status: 'paid', dueDate: '2026-02-22', paidDate: '2026-02-22' },
],
workTimeline: [
{ date: '2026-01-28', action: 'Contract Executed', user: 'Felicity Fast', details: '' },
{ date: '2026-02-15', action: 'Production Started', user: 'Amanda Manager', details: 'Demo and install started same day.' },
{ date: '2026-02-22', action: 'Project Closed', user: 'Amanda Manager', details: 'Insurance check received and deposited. File closed.' },
],
},
kl_036: {
estimatedAmount: 22100, actualCost: 21800, variancePercent: -1.4, completionPct: 100, healthScore: 97,
contractorName: 'Plano Roofing Crew C', contractorPhone: '(972) 555-9004',
budgetBreakdown: [
{ category: 'Materials', allocated: 12000, committed: 12000, actual: 11800 },
{ category: 'Labor', allocated: 7800, committed: 7800, actual: 7800 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 600 },
{ category: 'Contingency', allocated: 1700, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-01-30', notes: 'Full payment upfront.' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-01-31', notes: '' },
{ id: 'm3', name: 'Permits Pulled', status: 'completed', date: '2026-02-07', notes: '' },
{ id: 'm4', name: 'Tear-off & Decking', status: 'completed', date: '2026-02-18', notes: 'Clean. No deck issues.' },
{ id: 'm5', name: 'Roofing Install', status: 'completed', date: '2026-02-19', notes: '2-day install complete.' },
{ id: 'm6', name: 'Final Inspection', status: 'completed', date: '2026-02-20', notes: 'Outstanding quality noted.' },
{ id: 'm7', name: 'Invoice & Payment', status: 'completed', date: '2026-01-30', notes: 'Pre-paid.' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Full Payment — 100%', amount: 22100, status: 'paid', dueDate: '2026-01-30', paidDate: '2026-01-30' },
],
workTimeline: [
{ date: '2026-01-30', action: 'Contract Executed', user: 'Fiona Field', details: 'Cash client. Full payment upfront.' },
{ date: '2026-02-18', action: 'Production Started', user: 'Adam Admin', details: 'Tear-off started.' },
{ date: '2026-02-20', action: 'Project Closed', user: 'Adam Admin', details: 'Outstanding quality. Referral bonus owed per agreement.' },
],
},
kl_037: {
estimatedAmount: 8900, actualCost: 8650, variancePercent: -2.8, completionPct: 100, healthScore: 96,
contractorName: 'Plano Roofing Crew A', contractorPhone: '(972) 555-9001',
budgetBreakdown: [
{ category: 'Gutter Materials', allocated: 3800, committed: 3800, actual: 3600 },
{ category: 'Fascia Materials', allocated: 1800, committed: 1800, actual: 1800 },
{ category: 'Labor', allocated: 2600, committed: 2600, actual: 2600 },
{ category: 'Permits', allocated: 400, committed: 400, actual: 400 },
{ category: 'Contingency', allocated: 300, committed: 0, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-02-10', notes: '' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-02-12', notes: '' },
{ id: 'm3', name: 'Fascia Repair', status: 'completed', date: '2026-02-28', notes: 'Fascia replaced on all 4 sides.' },
{ id: 'm4', name: 'Gutter Install', status: 'completed', date: '2026-03-01', notes: '1-day install.' },
{ id: 'm5', name: 'Final Walkthrough', status: 'completed', date: '2026-03-02', notes: 'Customer gave 3 referral cards.' },
{ id: 'm6', name: 'Invoice & Payment', status: 'completed', date: '2026-03-02', notes: '' },
],
changeOrders: [],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 50%', amount: 4450, status: 'paid', dueDate: '2026-02-10', paidDate: '2026-02-10' },
{ id: 'inv2', description: 'Final — 50%', amount: 4450, status: 'paid', dueDate: '2026-03-02', paidDate: '2026-03-02' },
],
workTimeline: [
{ date: '2026-02-10', action: 'Contract Executed', user: 'Felix Fixer', details: '' },
{ date: '2026-02-28', action: 'Production Started', user: 'Adam Admin', details: 'Fascia repair started.' },
{ date: '2026-03-02', action: 'Project Closed', user: 'Adam Admin', details: 'Complete. Customer gave referral cards to 3 neighbors.' },
],
},
kl_038: {
estimatedAmount: 19400, actualCost: 20100, variancePercent: 3.6, completionPct: 100, healthScore: 87,
contractorName: 'Plano Roofing Crew B', contractorPhone: '(972) 555-9003',
budgetBreakdown: [
{ category: 'Materials', allocated: 10400, committed: 10400, actual: 11200 },
{ category: 'Labor', allocated: 6800, committed: 6800, actual: 6800 },
{ category: 'Permits', allocated: 600, committed: 600, actual: 600 },
{ category: 'Contingency', allocated: 1600, committed: 1600, actual: 0 },
],
milestones: [
{ id: 'm1', name: 'Contract Signed', status: 'completed', date: '2026-02-04', notes: '' },
{ id: 'm2', name: 'Materials Ordered', status: 'completed', date: '2026-02-06', notes: '' },
{ id: 'm3', name: 'Permits Pulled', status: 'completed', date: '2026-02-15', notes: '' },
{ id: 'm4', name: 'Tear-off & Decking', status: 'completed', date: '2026-03-10', notes: '3 rotted deck sheets replaced — CO raised.' },
{ id: 'm5', name: 'Roofing Install', status: 'completed', date: '2026-03-12', notes: '' },
{ id: 'm6', name: 'Final Inspection', status: 'completed', date: '2026-03-18', notes: '' },
{ id: 'm7', name: 'Invoice & Payment', status: 'completed', date: '2026-03-20', notes: 'Complex insurance supplemental took 2 extra weeks.' },
],
changeOrders: [
{ id: 'co1', title: 'Decking Replacement — 3 Sheets', amount: 720, status: 'approved', requestedBy: 'Felicity Fast', date: '2026-03-10', description: 'Three rotted OSB sheets discovered during tear-off. Replaced.' },
],
rfis: [],
invoices: [
{ id: 'inv1', description: 'Deposit — 30%', amount: 5820, status: 'paid', dueDate: '2026-02-04', paidDate: '2026-02-04' },
{ id: 'inv2', description: 'Progress — 40%', amount: 7760, status: 'paid', dueDate: '2026-03-12', paidDate: '2026-03-14' },
{ id: 'inv3', description: 'Final — 30%', amount: 5820, status: 'paid', dueDate: '2026-03-20', paidDate: '2026-03-20' },
],
workTimeline: [
{ date: '2026-02-04', action: 'Contract Executed', user: 'Felicity Fast', details: '' },
{ date: '2026-03-10', action: 'Production Started', user: 'Adam Admin', details: 'Tear-off found 3 rotted deck sheets. CO raised.' },
{ date: '2026-03-12', action: 'Install Complete', user: 'Adam Admin', details: 'Roofing complete.' },
{ date: '2026-03-20', action: 'Project Closed', user: 'Adam Admin', details: 'Longest close — 7 weeks due to complex insurance supplemental.' },
],
},
};
// --- CONTEXT SETUP ---
const MockStoreContext = createContext();
@@ -4501,6 +5023,7 @@ export const MockStoreProvider = ({ children }) => {
updateKanbanLead: (id, data) => {
setKanbanLeads(prev => prev.map(l => l.id === id ? { ...l, ...data } : l));
},
kanbanProjectData: KANBAN_PROJECT_DATA,
// Estimates
estimates,