fix(data): correct pendingInvoiceCount and align cost-invoice vendors to breakdown

This commit is contained in:
Satyam Rastogi
2026-05-29 15:39:36 +05:30
parent 2b741dd0b5
commit d5ea0935b4
+9 -9
View File
@@ -3395,7 +3395,7 @@ const MOCK_PROJECTS = [
healthScore: 82, healthScore: 82,
openRFIs: 0, openRFIs: 0,
changeOrderCount: 1, changeOrderCount: 1,
pendingInvoiceCount: 1, pendingInvoiceCount: 0,
budgetBreakdown: [ budgetBreakdown: [
{ name: 'ABC Supply Co.', category: 'Materials', allocated: 9000, committed: 9000, actual: 8600 }, { name: 'ABC Supply Co.', category: 'Materials', allocated: 9000, committed: 9000, actual: 8600 },
{ name: 'Plano Roofing Crew A', category: 'Labor', allocated: 5800, committed: 5800, actual: 600 }, { name: 'Plano Roofing Crew A', category: 'Labor', allocated: 5800, committed: 5800, actual: 600 },
@@ -3476,7 +3476,7 @@ const MOCK_PROJECTS = [
healthScore: 78, healthScore: 78,
openRFIs: 0, openRFIs: 0,
changeOrderCount: 1, changeOrderCount: 1,
pendingInvoiceCount: 1, pendingInvoiceCount: 0,
budgetBreakdown: [ budgetBreakdown: [
{ name: 'Owens Corning', category: 'Materials', allocated: 15400, committed: 15400, actual: 14200 }, { name: 'Owens Corning', category: 'Materials', allocated: 15400, committed: 15400, actual: 14200 },
{ name: 'Plano Siding Crew', category: 'Labor', allocated: 10400, committed: 10400, actual: 600 }, { name: 'Plano Siding Crew', category: 'Labor', allocated: 10400, committed: 10400, actual: 600 },
@@ -3557,7 +3557,7 @@ const MOCK_PROJECTS = [
healthScore: 88, healthScore: 88,
openRFIs: 0, openRFIs: 0,
changeOrderCount: 0, changeOrderCount: 0,
pendingInvoiceCount: 1, pendingInvoiceCount: 0,
budgetBreakdown: [ budgetBreakdown: [
{ name: 'ABC Supply Co.', category: 'Roofing Materials', allocated: 10200, committed: 10200, actual: 9800 }, { name: 'ABC Supply Co.', category: 'Roofing Materials', allocated: 10200, committed: 10200, actual: 9800 },
{ name: 'LeafGuard DFW', category: 'Gutter Materials', allocated: 3200, committed: 3200, actual: 3100 }, { name: 'LeafGuard DFW', category: 'Gutter Materials', allocated: 3200, committed: 3200, actual: 3100 },
@@ -3721,7 +3721,7 @@ const MOCK_PROJECTS = [
healthScore: 84, healthScore: 84,
openRFIs: 0, openRFIs: 0,
changeOrderCount: 0, changeOrderCount: 0,
pendingInvoiceCount: 1, pendingInvoiceCount: 0,
budgetBreakdown: [ budgetBreakdown: [
{ name: 'James Hardie', category: 'Materials', allocated: 4800, committed: 4800, actual: 4600 }, { name: 'James Hardie', category: 'Materials', allocated: 4800, committed: 4800, actual: 4600 },
{ name: 'Plano Siding Crew', category: 'Labor', allocated: 3600, committed: 3600, actual: 1600 }, { name: 'Plano Siding Crew', category: 'Labor', allocated: 3600, committed: 3600, actual: 1600 },
@@ -3738,7 +3738,7 @@ const MOCK_PROJECTS = [
{ id: 'ps_022_3', milestone: 'Final — 30%', amount: 2820, dueDate: '2026-04-10', status: 'pending' }, { id: 'ps_022_3', milestone: 'Final — 30%', amount: 2820, dueDate: '2026-04-10', status: 'pending' },
], ],
invoices: [ invoices: [
{ id: 'inv_022_1', amount: 4600, submittedBy: 'GAF Materials', status: 'paid', dueDate: '2026-03-20', datePaid: '2026-03-21' }, { id: 'inv_022_1', amount: 4600, submittedBy: 'James Hardie', status: 'paid', dueDate: '2026-03-20', datePaid: '2026-03-21' },
{ id: 'inv_022_2', amount: 1600, submittedBy: 'Plano Siding Crew', status: 'paid', dueDate: '2026-04-01', datePaid: '2026-04-02' }, { id: 'inv_022_2', amount: 1600, submittedBy: 'Plano Siding Crew', status: 'paid', dueDate: '2026-04-01', datePaid: '2026-04-02' },
{ id: 'inv_022_3', amount: 500, submittedBy: 'City of Plano', status: 'paid', dueDate: '2026-03-20', datePaid: '2026-03-20' }, { id: 'inv_022_3', amount: 500, submittedBy: 'City of Plano', status: 'paid', dueDate: '2026-03-20', datePaid: '2026-03-20' },
], ],
@@ -3798,7 +3798,7 @@ const MOCK_PROJECTS = [
healthScore: 74, healthScore: 74,
openRFIs: 1, openRFIs: 1,
changeOrderCount: 0, changeOrderCount: 0,
pendingInvoiceCount: 1, pendingInvoiceCount: 0,
budgetBreakdown: [ budgetBreakdown: [
{ name: 'Owens Corning', category: 'Materials', allocated: 22000, committed: 22000, actual: 17200 }, { name: 'Owens Corning', category: 'Materials', allocated: 22000, committed: 22000, actual: 17200 },
{ name: 'Plano Roofing Crew A', category: 'Labor', allocated: 15500, committed: 15500, actual: 800 }, { name: 'Plano Roofing Crew A', category: 'Labor', allocated: 15500, committed: 15500, actual: 800 },
@@ -3817,7 +3817,7 @@ const MOCK_PROJECTS = [
{ id: 'ps_023_3', milestone: 'Final — 25%', amount: 10500, dueDate: '2026-04-15', status: 'pending' }, { id: 'ps_023_3', milestone: 'Final — 25%', amount: 10500, dueDate: '2026-04-15', status: 'pending' },
], ],
invoices: [ invoices: [
{ id: 'inv_023_1', amount: 17200, submittedBy: 'James Hardie', status: 'paid', dueDate: '2026-04-05', datePaid: '2026-04-06' }, { id: 'inv_023_1', amount: 17200, submittedBy: 'Owens Corning', status: 'paid', dueDate: '2026-04-05', datePaid: '2026-04-06' },
{ id: 'inv_023_2', amount: 800, submittedBy: 'Plano Roofing Crew A', status: 'paid', dueDate: '2026-04-05', datePaid: '2026-04-06' }, { id: 'inv_023_2', amount: 800, submittedBy: 'Plano Roofing Crew A', status: 'paid', dueDate: '2026-04-05', datePaid: '2026-04-06' },
{ id: 'inv_023_3', amount: 900, submittedBy: 'City of Plano', status: 'paid', dueDate: '2026-03-01', datePaid: '2026-03-01' }, { id: 'inv_023_3', amount: 900, submittedBy: 'City of Plano', status: 'paid', dueDate: '2026-03-01', datePaid: '2026-03-01' },
], ],
@@ -4193,7 +4193,7 @@ const MOCK_PROJECTS = [
changeOrderCount: 1, changeOrderCount: 1,
pendingInvoiceCount: 0, pendingInvoiceCount: 0,
budgetBreakdown: [ budgetBreakdown: [
{ name: 'James Hardie', category: 'Materials', allocated: 10400, committed: 10400, actual: 11200 }, { name: 'Owens Corning', category: 'Materials', allocated: 10400, committed: 10400, actual: 11200 },
{ name: 'Plano Roofing Crew B', category: 'Labor', allocated: 6800, committed: 6800, actual: 6800 }, { name: 'Plano Roofing Crew B', category: 'Labor', allocated: 6800, committed: 6800, actual: 6800 },
{ name: 'City of Plano', category: 'Permits', allocated: 600, committed: 600, actual: 600 }, { name: 'City of Plano', category: 'Permits', allocated: 600, committed: 600, actual: 600 },
{ name: 'Reserve Fund', category: 'Contingency', allocated: 1600, committed: 1600, actual: 0 }, { name: 'Reserve Fund', category: 'Contingency', allocated: 1600, committed: 1600, actual: 0 },
@@ -4210,7 +4210,7 @@ const MOCK_PROJECTS = [
{ id: 'ps_028_3', milestone: 'Final — 30%', amount: 5820, dueDate: '2026-03-20', status: 'paid', paidDate: '2026-03-20' }, { id: 'ps_028_3', milestone: 'Final — 30%', amount: 5820, dueDate: '2026-03-20', status: 'paid', paidDate: '2026-03-20' },
], ],
invoices: [ invoices: [
{ id: 'inv_028_1', amount: 11200, submittedBy: 'James Hardie', status: 'paid', dueDate: '2026-03-10', datePaid: '2026-03-11' }, { id: 'inv_028_1', amount: 11200, submittedBy: 'Owens Corning', status: 'paid', dueDate: '2026-03-10', datePaid: '2026-03-11' },
{ id: 'inv_028_2', amount: 6800, submittedBy: 'Plano Roofing Crew B', status: 'paid', dueDate: '2026-03-12', datePaid: '2026-03-13' }, { id: 'inv_028_2', amount: 6800, submittedBy: 'Plano Roofing Crew B', status: 'paid', dueDate: '2026-03-12', datePaid: '2026-03-13' },
{ id: 'inv_028_3', amount: 600, submittedBy: 'City of Plano', status: 'paid', dueDate: '2026-02-15', datePaid: '2026-02-15' }, { id: 'inv_028_3', amount: 600, submittedBy: 'City of Plano', status: 'paid', dueDate: '2026-02-15', datePaid: '2026-02-15' },
], ],