diff --git a/worklenz-frontend/src/features/finance/finance-drawer/finance-drawer.tsx b/worklenz-frontend/src/features/finance/finance-drawer/finance-drawer.tsx index 395cc99c..382c8c66 100644 --- a/worklenz-frontend/src/features/finance/finance-drawer/finance-drawer.tsx +++ b/worklenz-frontend/src/features/finance/finance-drawer/finance-drawer.tsx @@ -62,8 +62,8 @@ const FinanceDrawer = () => { } open={isDrawerOpen} onClose={handleClose} - destroyOnClose={true} - width={480} + destroyOnHidden={true} + width={640} >
{loading ? ( @@ -71,7 +71,71 @@ const FinanceDrawer = () => {
) : ( - + {/* Task Summary */} + {taskBreakdown?.task && ( +
+ + Task Overview + +
+
+ + Estimated Hours + + + {taskBreakdown.task.estimated_hours?.toFixed(2) || '0.00'} + +
+
+ + Total Logged Hours + + + {taskBreakdown.task.logged_hours?.toFixed(2) || '0.00'} + +
+
+ + Estimated Labor Cost ({currency}) + + + {taskBreakdown.task.estimated_labor_cost?.toFixed(2) || '0.00'} + +
+
+ + Actual Labor Cost ({currency}) + + + {taskBreakdown.task.actual_labor_cost?.toFixed(2) || '0.00'} + +
+
+ + Fixed Cost ({currency}) + + + {taskBreakdown.task.fixed_cost?.toFixed(2) || '0.00'} + +
+
+ + Total Actual Cost ({currency}) + + + {taskBreakdown.task.total_actual_cost?.toFixed(2) || '0.00'} + +
+
+
+ )} + + {/* Member Breakdown Table */} + + Member Time Logs & Costs + +
{ textAlign: 'left', padding: 8, }} - > - + + @@ -129,22 +203,34 @@ const FinanceDrawer = () => { }} className="border-b-[1px] font-semibold" > - + + {/* Member Rows */} @@ -168,7 +254,7 @@ const FinanceDrawer = () => { padding: 8, }} > - {member.estimated_hours?.toFixed(2) || '0.00'} + {member.logged_hours?.toFixed(2) || '0.00'} + ))} @@ -184,6 +278,7 @@ const FinanceDrawer = () => { ))}
- {t('labourHoursColumn')} + Role / Member { padding: 8, }} > - {t('costColumn')} ({currency}) + Logged Hours + + Hourly Rate ({currency}) + + Actual Cost ({currency})
{group.jobRole}{group.jobRole} - {group.estimated_hours?.toFixed(2) || '0.00'} + {group.logged_hours?.toFixed(2) || '0.00'} - {group.estimated_cost?.toFixed(2) || '0.00'} + - + + {group.actual_cost?.toFixed(2) || '0.00'}
{ padding: 8, }} > - {member.estimated_cost?.toFixed(2) || '0.00'} + {member.hourly_rate?.toFixed(2) || '0.00'} + + {member.actual_cost?.toFixed(2) || '0.00'}
+ )}