feat(project-finance): enhance project finance view and calculations
- Added a new SQL view `project_finance_view` to aggregate project financial data. - Updated `project-finance-controller.ts` to fetch and group tasks by status, priority, or phases, including financial calculations for estimated costs, actual costs, and variances. - Enhanced frontend components to display total time logged, estimated costs, and fixed costs in the finance table. - Introduced new utility functions for formatting hours and calculating totals. - Updated localization files to include new financial columns in English, Spanish, and Portuguese. - Implemented Redux slice for managing project finance state and actions for updating task costs.
This commit is contained in:
@@ -3,55 +3,68 @@ type FinanceTableColumnsType = {
|
||||
name: string;
|
||||
width: number;
|
||||
type: 'string' | 'hours' | 'currency';
|
||||
render?: (value: any) => React.ReactNode;
|
||||
};
|
||||
|
||||
// finance table columns
|
||||
export const financeTableColumns: FinanceTableColumnsType[] = [
|
||||
{
|
||||
key: 'task',
|
||||
name: 'task',
|
||||
name: 'taskColumn',
|
||||
width: 240,
|
||||
type: 'string',
|
||||
},
|
||||
{
|
||||
key: 'members',
|
||||
name: 'members',
|
||||
name: 'membersColumn',
|
||||
width: 160,
|
||||
type: 'string',
|
||||
},
|
||||
{
|
||||
key: 'hours',
|
||||
name: 'hours',
|
||||
name: 'hoursColumn',
|
||||
width: 80,
|
||||
type: 'hours',
|
||||
},
|
||||
{
|
||||
key: 'total_time_logged',
|
||||
name: 'totalTimeLoggedColumn',
|
||||
width: 120,
|
||||
type: 'hours',
|
||||
},
|
||||
{
|
||||
key: 'estimated_cost',
|
||||
name: 'estimatedCostColumn',
|
||||
width: 120,
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'cost',
|
||||
name: 'cost',
|
||||
name: 'costColumn',
|
||||
width: 120,
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'fixedCost',
|
||||
name: 'fixedCost',
|
||||
name: 'fixedCostColumn',
|
||||
width: 120,
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'totalBudget',
|
||||
name: 'totalBudgetedCost',
|
||||
name: 'totalBudgetedCostColumn',
|
||||
width: 120,
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'totalActual',
|
||||
name: 'totalActualCost',
|
||||
name: 'totalActualCostColumn',
|
||||
width: 120,
|
||||
type: 'currency',
|
||||
},
|
||||
{
|
||||
key: 'variance',
|
||||
name: 'variance',
|
||||
name: 'varianceColumn',
|
||||
width: 120,
|
||||
type: 'currency',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user