fix(data): match subcontractor tasks to real projects; style On Hold status

This commit is contained in:
Satyam Rastogi
2026-05-29 04:22:30 +05:30
parent 2010ca080e
commit 2f43205854
3 changed files with 15 additions and 13 deletions
@@ -11,6 +11,7 @@ const PRIORITY_STYLES = {
const STATUS_STYLES = {
Assigned: 'bg-amber-100 text-amber-700 dark:bg-amber-500/20 dark:text-amber-400',
'In Progress': 'bg-blue-100 text-blue-700 dark:bg-blue-500/20 dark:text-blue-400',
'On Hold': 'bg-slate-100 text-slate-600 dark:bg-slate-500/20 dark:text-slate-400',
Completed: 'bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-400',
Cancelled: 'bg-zinc-200 text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300',
};
+13 -13
View File
@@ -5509,7 +5509,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
assignedBy: 'own_001',
assignedByName: 'Justin Johnson',
title: 'Emergency tarp — storm damage',
location: '4221 Magnolia Ln, Plano, TX 75023',
location: '2604 Dunwick Dr, Plano, TX 75023',
description: 'Hailstorm overnight; 34 ft section of decking exposed near chimney. Tarp ASAP to prevent further water intrusion. Permanent repair will be scheduled after insurance scope.',
dueDate: '2026-05-19',
priority: 'high',
@@ -5528,7 +5528,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
],
expenses: [],
fees: [],
projectId: 'proj_003',
projectId: 'proj_001',
paymentStatus: 'Unpaid',
paymentRequestedAt: null,
createdAt: '2026-05-18T22:40:00Z',
@@ -5547,7 +5547,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
assignedBy: 'a1',
assignedByName: 'Wade Hollis',
title: 'Inspect attic ventilation',
location: '5510 Custer Rd, Plano, TX 75023',
location: '6909 Custer Rd, Plano, TX 75023',
description: 'Customer reports unusually high attic temps. Check ridge vent, soffit airflow, and intake/exhaust balance. Recommend remediation.',
dueDate: '2026-05-30',
priority: 'medium',
@@ -5597,7 +5597,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
at: '2026-05-15T16:00:00Z',
},
],
projectId: 'proj_012',
projectId: 'proj_007',
paymentStatus: 'Unpaid',
paymentRequestedAt: '2026-05-14T13:00:00Z',
createdAt: '2026-05-12T10:00:00Z',
@@ -5616,7 +5616,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
assignedBy: 'own_001',
assignedByName: 'Justin Johnson',
title: 'Replace gutter on south elevation',
location: '8917 Elmwood Dr, Plano, TX 75025',
location: '7224 Independence Pkwy, Plano, TX 75025',
description: '30 ft section of K-style gutter — pulling away from fascia after storm. Replace with new 6" oversized gutter, match existing bronze color.',
dueDate: '2026-06-02',
priority: 'low',
@@ -5628,7 +5628,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
thread: [],
expenses: [],
fees: [],
projectId: 'proj_011',
projectId: 'proj_009',
paymentStatus: 'Unpaid',
paymentRequestedAt: null,
createdAt: '2026-05-17T14:00:00Z',
@@ -5647,7 +5647,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
assignedBy: 'a1',
assignedByName: 'Wade Hollis',
title: 'Roof deck repair — north slope',
location: '1408 Cedar Ridge, Allen, TX 75002',
location: '2604 Dunwick Dr, Plano, TX 75023',
description: 'Sheathing soft in two ~2x2 ft areas. Cut out, replace with matching OSB, re-felt and re-shingle.',
dueDate: '2026-05-08',
priority: 'high',
@@ -5671,7 +5671,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
fees: [
{ id: 'sct_007_f1', description: 'Labour — deck repair (2 days)', type: 'Labour / Service Fee', amount: 920, createdAt: '2026-05-07T16:50:00Z' },
],
projectId: 'proj_011',
projectId: 'proj_001',
paymentStatus: 'Paid',
paymentRequestedAt: '2026-05-07T16:50:00Z',
paidAt: '2026-05-12T14:00:00Z',
@@ -5691,7 +5691,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
assignedBy: 'a1',
assignedByName: 'Wade Hollis',
title: 'Install GFCI outlets — kitchen + bath',
location: '224 Greenfield Way, Frisco, TX 75033',
location: '2612 Dunwick Dr, Plano, TX 75023',
description: 'Replace 4 standard receptacles with GFCI: 2 kitchen counter outlets (left of sink + island), 1 master bath vanity, 1 powder room vanity. Code update required as part of insurance work. Use Leviton SmartlockPro 20A devices. Test all branches with plug-in tester before signing off.',
dueDate: '2026-05-26',
priority: 'medium',
@@ -5721,7 +5721,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
{ id: 'sct_008_e2', description: 'Wire nuts + electrical tape', category: 'Materials', amount: 11.5, notes: '', receiptUrl: '', createdAt: '2026-05-18T16:02:00Z' },
{ id: 'sct_008_e3', description: 'Childproof outlet covers (10-pack)', category: 'Materials', amount: 8.99, notes: 'Courtesy for homeowner.', receiptUrl: '', createdAt: '2026-05-18T16:05:00Z' },
{ id: 'sct_008_e4', description: 'Plug-in circuit tester', category: 'Equipment Rental', amount: 24.0, notes: 'Sperry Instruments GFCI tester.', receiptUrl: '', createdAt: '2026-05-18T16:10:00Z' },
{ id: 'sct_008_e5', description: 'Fuel — Frisco round trip', category: 'Travel / Fuel', amount: 22.4, notes: '', receiptUrl: '', createdAt: '2026-05-19T18:00:00Z' },
{ id: 'sct_008_e5', description: 'Fuel — Dunwick Dr round trip', category: 'Travel / Fuel', amount: 22.4, notes: '', receiptUrl: '', createdAt: '2026-05-19T18:00:00Z' },
],
fees: [
{ id: 'sct_008_f1', description: 'Labour — Kitchen GFCI install (2 outlets + island)', type: 'Labour / Service Fee', amount: 220, createdAt: '2026-05-19T12:35:00Z' },
@@ -5754,7 +5754,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
at: '2026-05-19T12:30:00Z',
},
],
projectId: 'proj_011',
projectId: 'proj_004',
paymentStatus: 'Unpaid',
paymentRequestedAt: '2026-05-19T12:35:00Z',
createdAt: '2026-05-16T13:00:00Z',
@@ -5773,7 +5773,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
assignedBy: 'own_001',
assignedByName: 'Justin Johnson',
title: 'Install EV charger circuit — garage',
location: '3917 Arizona Pl, Plano, TX 75023',
location: '3913 Arizona Pl, Plano, TX 75023',
description: 'Homeowner purchased a Tesla Wall Connector. Run a dedicated 60A 240V circuit from the main panel to the garage wall. Coordinate with homeowner for outage window. Permit required.',
dueDate: '2026-05-29',
priority: 'medium',
@@ -5791,7 +5791,7 @@ const MOCK_SUBCONTRACTOR_TASKS = [
expenses: [],
fees: [],
activities: [],
projectId: 'proj_011',
projectId: 'proj_006',
paymentStatus: 'Unpaid',
paymentRequestedAt: null,
createdAt: '2026-05-20T09:00:00Z',
@@ -119,6 +119,7 @@ const PRIORITY_STYLES = {
const STATUS_CONFIG = {
Assigned: { cls: 'bg-amber-100 text-amber-700 dark:bg-amber-500/20 dark:text-amber-400', icon: Clock },
'In Progress': { cls: 'bg-blue-100 text-blue-700 dark:bg-blue-500/20 dark:text-blue-400', icon: PauseCircle },
'On Hold': { cls: 'bg-slate-100 text-slate-600 dark:bg-slate-500/20 dark:text-slate-400', icon: PauseCircle },
Completed: { cls: 'bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-400', icon: CheckCircle },
Cancelled: { cls: 'bg-zinc-200 text-zinc-600 dark:bg-zinc-700 dark:text-zinc-300', icon: XCircle },
};