diff --git a/src/pages/owner/OwnerProjectDetail.jsx b/src/pages/owner/OwnerProjectDetail.jsx index fe165bc..b82ffa9 100644 --- a/src/pages/owner/OwnerProjectDetail.jsx +++ b/src/pages/owner/OwnerProjectDetail.jsx @@ -141,6 +141,17 @@ const EXPENSE_TYPE_CONFIG = { const SUBCONTRACTOR_WORK_TYPES = ['Plumbing', 'Electrical', 'Painting', 'Roofing', 'Civil work', 'HVAC', 'Carpentry', 'Other']; +// Short labels for team cost types — shown inline in the Type badge (e.g. "Team Cost · Comm") +const COST_TYPE_ABBR = { + 'Commission': 'Comm', + 'Salary': 'Salary', + 'Bonus': 'Bonus', + 'Hourly Wage': 'Hourly', + 'Per Diem': 'Per Diem', + 'Referral Fee': 'Referral', + 'Overtime': 'OT', +}; + const inferExpenseType = (category = '') => { const c = (category || '').toLowerCase(); if (c.includes('material')) return 'material'; @@ -166,9 +177,9 @@ function seedExpenseRowsMock(project) { }); const seed = (project?.id || '').charCodeAt((project?.id || 'x').length - 1) % 3; const teamRows = [ - { id: 'exp_team_1', type: 'team', name: 'Jesus Gonzales', category: 'Sales Rep', allocated: 4200, actual: 4200, paid: true }, - { id: 'exp_team_2', type: 'team', name: 'Cody Tatum', category: 'Canvasser', allocated: 1500, actual: 1500, paid: false }, - { id: 'exp_team_3', type: 'team', name: 'Sarah Calloway', category: 'Estimator', allocated: 1200, actual: 0, paid: false }, + { id: 'exp_team_1', type: 'team', name: 'Jesus Gonzales', category: 'Sales Rep', costType: 'Commission', allocated: 4200, actual: 4200, paid: true }, + { id: 'exp_team_2', type: 'team', name: 'Cody Tatum', category: 'Canvasser', costType: 'Hourly Wage', allocated: 1500, actual: 1500, paid: false }, + { id: 'exp_team_3', type: 'team', name: 'Sarah Calloway', category: 'Estimator', costType: 'Salary', allocated: 1200, actual: 0, paid: false }, ].slice(0, 2 + seed).map(row => ({ ...row, paymentRequests: generateMockPaymentRequests(row.id, row.actual, row.paid, row.allocated) @@ -420,6 +431,7 @@ const OwnerProjectDetail = () => { type: type || data.type || 'other', name: data.name || '', category: data.category || '', + costType: data.costType || '', allocated: amt, actual: amt, paid: false, @@ -1171,7 +1183,7 @@ const OwnerProjectDetail = () => {