|
@@ -99,139 +99,29 @@ const ProjectFinancialSummary: React.FC = () => { |
|
|
}, |
|
|
}, |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
const rows0 = [ |
|
|
|
|
|
{ |
|
|
|
|
|
id: 1, |
|
|
|
|
|
projectCode: "M1201", |
|
|
|
|
|
projectName: "Consultancy Project C", |
|
|
|
|
|
team: "XXX", |
|
|
|
|
|
teamLeader: "XXX", |
|
|
|
|
|
startDate: "01/08/2022", |
|
|
|
|
|
targetEndDate: "01/05/2024", |
|
|
|
|
|
client: "Client A", |
|
|
|
|
|
subsidiary: "N/A", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 2, |
|
|
|
|
|
projectCode: "M1321", |
|
|
|
|
|
projectName: "Consultancy Project CCC", |
|
|
|
|
|
team: "XXX", |
|
|
|
|
|
teamLeader: "XXX", |
|
|
|
|
|
startDate: "01/08/2022", |
|
|
|
|
|
targetEndDate: "20/01/2024", |
|
|
|
|
|
client: "Client E", |
|
|
|
|
|
subsidiary: "Subsidiary B", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 3, |
|
|
|
|
|
projectCode: "M1001", |
|
|
|
|
|
projectName: "Consultancy Project A", |
|
|
|
|
|
team: "YYY", |
|
|
|
|
|
teamLeader: "YYY", |
|
|
|
|
|
startDate: "01/07/2022", |
|
|
|
|
|
targetEndDate: "01/04/2024", |
|
|
|
|
|
client: "Client B", |
|
|
|
|
|
subsidiary: "N/A", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 4, |
|
|
|
|
|
projectCode: "M1301", |
|
|
|
|
|
projectName: "Consultancy Project AAAA", |
|
|
|
|
|
team: "YYY", |
|
|
|
|
|
teamLeader: "YYY", |
|
|
|
|
|
startDate: "01/09/2022", |
|
|
|
|
|
targetEndDate: "20/02/2024", |
|
|
|
|
|
client: "Client C", |
|
|
|
|
|
subsidiary: "Subsidiary A", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 5, |
|
|
|
|
|
projectCode: "M1354", |
|
|
|
|
|
projectName: "Consultancy Project BBB", |
|
|
|
|
|
team: "YYY", |
|
|
|
|
|
teamLeader: "YYY", |
|
|
|
|
|
startDate: "01/02/2023", |
|
|
|
|
|
targetEndDate: "31/01/2024", |
|
|
|
|
|
client: "Client D", |
|
|
|
|
|
subsidiary: "Subsidiary C", |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
const rows0 = [{id: 1,projectCode:"M1201",projectName:"Consultancy Project C", team:"XXX", teamLeader:"XXX", startDate:"01/08/2022", targetEndDate: "01/05/2024", client:"Client A", subsidiary:"N/A"}, |
|
|
|
|
|
{id: 2,projectCode:"M1321",projectName:"Consultancy Project CCC", team:"XXX", teamLeader:"XXX", startDate:"01/08/2022", targetEndDate: "20/01/2024", client:"Client E", subsidiary:"Subsidiary B"}, |
|
|
|
|
|
{id: 3,projectCode:"M1001",projectName:"Consultancy Project A", team:"YYY", teamLeader:"YYY", startDate:"01/07/2022", targetEndDate: "01/04/2024", client:"Client B", subsidiary:"N/A"}, |
|
|
|
|
|
{id: 4,projectCode:"M1301",projectName:"Consultancy Project AAAA", team:"YYY", teamLeader:"YYY", startDate:"01/09/2022", targetEndDate: "20/02/2024", client:"Client C", subsidiary:"Subsidiary A"}, |
|
|
|
|
|
{id: 5,projectCode:"M1354",projectName:"Consultancy Project BBB", team:"YYY", teamLeader:"YYY", startDate:"01/02/2023", targetEndDate: "31/01/2024", client:"Client D", subsidiary:"Subsidiary C"} |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
const rows1 = [ |
|
|
|
|
|
{ |
|
|
|
|
|
id: 1, |
|
|
|
|
|
projectCode: "M1201", |
|
|
|
|
|
projectName: "Consultancy Project C", |
|
|
|
|
|
team: "XXX", |
|
|
|
|
|
teamLeader: "XXX", |
|
|
|
|
|
startDate: "01/08/2022", |
|
|
|
|
|
targetEndDate: "01/05/2024", |
|
|
|
|
|
client: "Client A", |
|
|
|
|
|
subsidiary: "N/A", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 2, |
|
|
|
|
|
projectCode: "M1321", |
|
|
|
|
|
projectName: "Consultancy Project CCC", |
|
|
|
|
|
team: "XXX", |
|
|
|
|
|
teamLeader: "XXX", |
|
|
|
|
|
startDate: "01/08/2022", |
|
|
|
|
|
targetEndDate: "20/01/2024", |
|
|
|
|
|
client: "Client E", |
|
|
|
|
|
subsidiary: "Subsidiary B", |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
const rows1 = [{id: 1,projectCode:"M1201",projectName:"Consultancy Project C", team:"XXX", teamLeader:"XXX", startDate:"01/08/2022", targetEndDate: "01/05/2024", client:"Client A", subsidiary:"N/A"}, |
|
|
|
|
|
{id: 2,projectCode:"M1321",projectName:"Consultancy Project CCC", team:"XXX", teamLeader:"XXX", startDate:"01/08/2022", targetEndDate: "20/01/2024", client:"Client E", subsidiary:"Subsidiary B"}, |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
const rows2 = [ |
|
|
|
|
|
{ |
|
|
|
|
|
id: 3, |
|
|
|
|
|
projectCode: "M1001", |
|
|
|
|
|
projectName: "Consultancy Project A", |
|
|
|
|
|
team: "YYY", |
|
|
|
|
|
teamLeader: "YYY", |
|
|
|
|
|
startDate: "01/07/2022", |
|
|
|
|
|
targetEndDate: "01/04/2024", |
|
|
|
|
|
client: "Client B", |
|
|
|
|
|
subsidiary: "N/A", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 4, |
|
|
|
|
|
projectCode: "M1301", |
|
|
|
|
|
projectName: "Consultancy Project AAAA", |
|
|
|
|
|
team: "YYY", |
|
|
|
|
|
teamLeader: "YYY", |
|
|
|
|
|
startDate: "01/09/2022", |
|
|
|
|
|
targetEndDate: "20/02/2024", |
|
|
|
|
|
client: "Client C", |
|
|
|
|
|
subsidiary: "Subsidiary A", |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 5, |
|
|
|
|
|
projectCode: "M1354", |
|
|
|
|
|
projectName: "Consultancy Project BBB", |
|
|
|
|
|
team: "YYY", |
|
|
|
|
|
teamLeader: "YYY", |
|
|
|
|
|
startDate: "01/02/2023", |
|
|
|
|
|
targetEndDate: "31/01/2024", |
|
|
|
|
|
client: "Client D", |
|
|
|
|
|
subsidiary: "Subsidiary C", |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
const rows2 = [{id: 3,projectCode:"M1001",projectName:"Consultancy Project A", team:"YYY", teamLeader:"YYY", startDate:"01/07/2022", targetEndDate: "01/04/2024", client:"Client B", subsidiary:"N/A"}, |
|
|
|
|
|
{id: 4,projectCode:"M1301",projectName:"Consultancy Project AAAA", team:"YYY", teamLeader:"YYY", startDate:"01/09/2022", targetEndDate: "20/02/2024", client:"Client C", subsidiary:"Subsidiary A"}, |
|
|
|
|
|
{id: 5,projectCode:"M1354",projectName:"Consultancy Project BBB", team:"YYY", teamLeader:"YYY", startDate:"01/02/2023", targetEndDate: "31/01/2024", client:"Client D", subsidiary:"Subsidiary C"} |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
const projectFinancialRows = [ |
|
|
|
|
|
{ |
|
|
|
|
|
id: 1, |
|
|
|
|
|
cashFlowStatus: "Positive", |
|
|
|
|
|
cpi: "1.25", |
|
|
|
|
|
totalFees: "500,000.00", |
|
|
|
|
|
totalBudget: "400,000.00", |
|
|
|
|
|
totalCumulativeExpenditure: "280,000.00", |
|
|
|
|
|
totalInvoicedAmount: "350,000.00", |
|
|
|
|
|
totalUnInvoicedAmount: "150,000.00", |
|
|
|
|
|
totalReceivedAmount: "350,000.00", |
|
|
|
|
|
totalUnReceivedAmount: "0.00", |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
const projectFinancialRows = [{id: 1,projectCode:"M1354",projectName:"Consultanct Project BBB",clientName:"Client D",cashFlowStatus:"Positive",cpi:"1.25", totalFees:"500,000.00", totalBudget:"400,000.00", totalCumulativeExpenditure:"280,000.00", totalInvoicedAmount: "350,000.00", totalUnInvoicedAmount:"150,000.00", totalReceivedAmount:"350,000.00"} |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
const clientFinancialRows =[{id: 1,clientCode:"Cust-02",clientName:"Client B",totalProjectInvolved:"1",cashFlowStatus:"Positive",cpi:"1.25", totalFees:"500,000.00", totalBudget:"400,000.00", totalCumulativeExpenditure:"280,000.00", totalInvoicedAmount: "350,000.00", totalUnInvoicedAmount:"150,000.00", totalReceivedAmount:"350,000.00"}, |
|
|
|
|
|
{id: 2,clientCode:"Cust-03",clientName:"Client C",totalProjectInvolved:"1",cashFlowStatus:"Positive",cpi:"1.25", totalFees:"500,000.00", totalBudget:"400,000.00", totalCumulativeExpenditure:"280,000.00", totalInvoicedAmount: "350,000.00", totalUnInvoicedAmount:"150,000.00", totalReceivedAmount:"350,000.00"}, |
|
|
|
|
|
{id: 3,clientCode:"Cust-04",clientName:"Client D",totalProjectInvolved:"4",cashFlowStatus:"Positive",cpi:"1.25", totalFees:"500,000.00", totalBudget:"400,000.00", totalCumulativeExpenditure:"280,000.00", totalInvoicedAmount: "350,000.00", totalUnInvoicedAmount:"150,000.00", totalReceivedAmount:"350,000.00"} |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
const [isCardClickedIndex, setIsCardClickedIndex] = React.useState(0); |
|
|
const [isCardClickedIndex, setIsCardClickedIndex] = React.useState(0); |
|
|
|
|
|
|
|
@@ -250,73 +140,210 @@ const ProjectFinancialSummary: React.FC = () => { |
|
|
|
|
|
|
|
|
const columns = [ |
|
|
const columns = [ |
|
|
{ |
|
|
{ |
|
|
id: "projectCode", |
|
|
|
|
|
field: "projectCode", |
|
|
|
|
|
headerName: "Project Code", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "projectName", |
|
|
|
|
|
field: "projectName", |
|
|
|
|
|
headerName: "Project Name", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "team", |
|
|
|
|
|
field: "team", |
|
|
|
|
|
headerName: "Team", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "teamLeader", |
|
|
|
|
|
field: "teamLeader", |
|
|
|
|
|
headerName: "Team Leader", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "startDate", |
|
|
|
|
|
field: "startDate", |
|
|
|
|
|
headerName: "Start Date", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "targetEndDate", |
|
|
|
|
|
field: "targetEndDate", |
|
|
|
|
|
headerName: "Target End Date", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
|
|
|
id: 'clientCode', |
|
|
|
|
|
field: 'clientCode', |
|
|
|
|
|
headerName: "Client Code", |
|
|
|
|
|
flex: 0.7, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
id: "client", |
|
|
|
|
|
field: "client", |
|
|
|
|
|
headerName: "Client", |
|
|
|
|
|
|
|
|
id: 'clientName', |
|
|
|
|
|
field: 'clientName', |
|
|
|
|
|
headerName: "Client Name", |
|
|
flex: 1, |
|
|
flex: 1, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
id: "subsidiary", |
|
|
|
|
|
field: "subsidiary", |
|
|
|
|
|
headerName: "Subsidiary", |
|
|
|
|
|
|
|
|
id: 'totalProjectInvolved', |
|
|
|
|
|
field: 'totalProjectInvolved', |
|
|
|
|
|
headerName: "Total Project Involved", |
|
|
flex: 1, |
|
|
flex: 1, |
|
|
}, |
|
|
}, |
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const columns2 = [ |
|
|
|
|
|
{ |
|
|
{ |
|
|
id: "cashFlowStatus", |
|
|
|
|
|
field: "cashFlowStatus", |
|
|
|
|
|
|
|
|
id: 'cashFlowStatus', |
|
|
|
|
|
field: 'cashFlowStatus', |
|
|
headerName: "Cash Flow Status", |
|
|
headerName: "Cash Flow Status", |
|
|
flex: 1, |
|
|
flex: 1, |
|
|
renderCell: (params: any) => { |
|
|
|
|
|
|
|
|
renderCell: (params:any) => { |
|
|
if (params.row.cashFlowStatus === "Positive") { |
|
|
if (params.row.cashFlowStatus === "Positive") { |
|
|
return ( |
|
|
return ( |
|
|
<span className="text-lime-500">{params.row.cashFlowStatus}</span> |
|
|
<span className="text-lime-500">{params.row.cashFlowStatus}</span> |
|
|
); |
|
|
|
|
|
|
|
|
) |
|
|
} else if (params.row.cashFlowStatus === "Negative") { |
|
|
} else if (params.row.cashFlowStatus === "Negative") { |
|
|
return ( |
|
|
return ( |
|
|
<span className="text-red-500">{params.row.cashFlowStatus}</span> |
|
|
<span className="text-red-500">{params.row.cashFlowStatus}</span> |
|
|
); |
|
|
|
|
|
|
|
|
) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'cpi', |
|
|
|
|
|
field: 'cpi', |
|
|
|
|
|
headerName: "CPI", |
|
|
|
|
|
flex: 0.7, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
if (params.row.cpi >= 1) { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span className="text-lime-500">{params.row.cpi}</span> |
|
|
|
|
|
) |
|
|
|
|
|
} else if (params.row.cpi < 1) { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span className="text-red-500">{params.row.cpi}</span> |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalFees', |
|
|
|
|
|
field: 'totalFees', |
|
|
|
|
|
headerName: "Total Fees (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalFees}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalBudget', |
|
|
|
|
|
field: 'totalBudget', |
|
|
|
|
|
headerName: "Total Budget (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalBudget}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalCumulativeExpenditure', |
|
|
|
|
|
field: 'totalCumulativeExpenditure', |
|
|
|
|
|
headerName: "Total Cumulative Expenditure (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalCumulativeExpenditure}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalInvoicedAmount', |
|
|
|
|
|
field: 'totalInvoicedAmount', |
|
|
|
|
|
headerName: "Total Invoiced Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalInvoicedAmount}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalUnInvoicedAmount', |
|
|
|
|
|
field: 'totalUnInvoicedAmount', |
|
|
|
|
|
headerName: "Total Un-invoiced Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalUnInvoicedAmount}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalReceivedAmount', |
|
|
|
|
|
field: 'totalReceivedAmount', |
|
|
|
|
|
headerName: "Total Received Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalReceivedAmount}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// { |
|
|
|
|
|
// id: 'projectCode', |
|
|
|
|
|
// field: 'projectCode', |
|
|
|
|
|
// headerName: "Project Code", |
|
|
|
|
|
// flex: 1, |
|
|
|
|
|
// }, |
|
|
|
|
|
// { |
|
|
|
|
|
// id: 'projectName', |
|
|
|
|
|
// field: 'projectName', |
|
|
|
|
|
// headerName: "Project Name", |
|
|
|
|
|
// flex: 1, |
|
|
|
|
|
// }, |
|
|
|
|
|
// { |
|
|
|
|
|
// id: 'team', |
|
|
|
|
|
// field: 'team', |
|
|
|
|
|
// headerName: "Team", |
|
|
|
|
|
// flex: 1, |
|
|
|
|
|
// }, |
|
|
|
|
|
// { |
|
|
|
|
|
// id: 'teamLeader', |
|
|
|
|
|
// field: 'teamLeader', |
|
|
|
|
|
// headerName: "Team Leader", |
|
|
|
|
|
// flex: 1, |
|
|
|
|
|
// }, |
|
|
|
|
|
// { |
|
|
|
|
|
// id: 'startDate', |
|
|
|
|
|
// field: 'startDate', |
|
|
|
|
|
// headerName: "Start Date", |
|
|
|
|
|
// flex: 1, |
|
|
|
|
|
// }, |
|
|
|
|
|
// { |
|
|
|
|
|
// id: 'targetEndDate', |
|
|
|
|
|
// field: 'targetEndDate', |
|
|
|
|
|
// headerName: "Target End Date", |
|
|
|
|
|
// flex: 1, |
|
|
|
|
|
// }, |
|
|
|
|
|
// { |
|
|
|
|
|
// id: 'client', |
|
|
|
|
|
// field: 'client', |
|
|
|
|
|
// headerName: "Client", |
|
|
|
|
|
// flex: 1, |
|
|
|
|
|
// }, |
|
|
|
|
|
// { |
|
|
|
|
|
// id: 'subsidiary', |
|
|
|
|
|
// field: 'subsidiary', |
|
|
|
|
|
// headerName: "Subsidiary", |
|
|
|
|
|
// flex: 1, |
|
|
|
|
|
// }, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const columns2 = [ |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'projectCode', |
|
|
|
|
|
field: 'projectCode', |
|
|
|
|
|
headerName: "Project Code", |
|
|
|
|
|
flex: 0.7, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'projectName', |
|
|
|
|
|
field: 'projectName', |
|
|
|
|
|
headerName: "Project Name", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'clientName', |
|
|
|
|
|
field: 'clientName', |
|
|
|
|
|
headerName: "Client Name", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'cashFlowStatus', |
|
|
|
|
|
field: 'cashFlowStatus', |
|
|
|
|
|
headerName: "Cash Flow Status", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
if (params.row.cashFlowStatus === "Positive") { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span className="text-lime-500">{params.row.cashFlowStatus}</span> |
|
|
|
|
|
) |
|
|
|
|
|
} else if (params.row.cashFlowStatus === "Negative") { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span className="text-red-500">{params.row.cashFlowStatus}</span> |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
id: "cpi", |
|
|
id: "cpi", |
|
|
field: "cpi", |
|
|
field: "cpi", |
|
@@ -330,70 +357,74 @@ const ProjectFinancialSummary: React.FC = () => { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
id: "totalFees", |
|
|
|
|
|
field: "totalFees", |
|
|
|
|
|
headerName: "Total Fees (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params: any) => { |
|
|
|
|
|
return <span>${params.row.totalFees}</span>; |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "totalBudget", |
|
|
|
|
|
field: "totalBudget", |
|
|
|
|
|
headerName: "Total Budget (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params: any) => { |
|
|
|
|
|
return <span>${params.row.totalBudget}</span>; |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "totalCumulativeExpenditure", |
|
|
|
|
|
field: "totalCumulativeExpenditure", |
|
|
|
|
|
headerName: "Total Cumulative Expenditure (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params: any) => { |
|
|
|
|
|
return <span>${params.row.totalCumulativeExpenditure}</span>; |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "totalInvoicedAmount", |
|
|
|
|
|
field: "totalInvoicedAmount", |
|
|
|
|
|
headerName: "Total Invoiced Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params: any) => { |
|
|
|
|
|
return <span>${params.row.totalInvoicedAmount}</span>; |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "totalUnInvoicedAmount", |
|
|
|
|
|
field: "totalUnInvoicedAmount", |
|
|
|
|
|
headerName: "Total Un-invoiced Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params: any) => { |
|
|
|
|
|
return <span>${params.row.totalUnInvoicedAmount}</span>; |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "totalReceivedAmount", |
|
|
|
|
|
field: "totalReceivedAmount", |
|
|
|
|
|
headerName: "Total Received Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params: any) => { |
|
|
|
|
|
return <span>${params.row.totalReceivedAmount}</span>; |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: "totalUnReceivedAmount", |
|
|
|
|
|
field: "totalUnReceivedAmount", |
|
|
|
|
|
headerName: "Total Un-received Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params: any) => { |
|
|
|
|
|
return <span>${params.row.totalUnReceivedAmount}</span>; |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalFees', |
|
|
|
|
|
field: 'totalFees', |
|
|
|
|
|
headerName: "Total Fees (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalFees}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalBudget', |
|
|
|
|
|
field: 'totalBudget', |
|
|
|
|
|
headerName: "Total Budget (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalBudget}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalCumulativeExpenditure', |
|
|
|
|
|
field: 'totalCumulativeExpenditure', |
|
|
|
|
|
headerName: "Total Cumulative Expenditure (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalCumulativeExpenditure}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalInvoicedAmount', |
|
|
|
|
|
field: 'totalInvoicedAmount', |
|
|
|
|
|
headerName: "Total Invoiced Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalInvoicedAmount}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalUnInvoicedAmount', |
|
|
|
|
|
field: 'totalUnInvoicedAmount', |
|
|
|
|
|
headerName: "Total Un-invoiced Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalUnInvoicedAmount}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 'totalReceivedAmount', |
|
|
|
|
|
field: 'totalReceivedAmount', |
|
|
|
|
|
headerName: "Total Received Amount (HKD)", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
renderCell: (params:any) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<span>${params.row.totalReceivedAmount}</span> |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
const handleSelectionChange = (newSelectionModel: GridRowSelectionModel) => { |
|
|
const handleSelectionChange = (newSelectionModel: GridRowSelectionModel) => { |
|
|
const selectedRowsData = selectedTeamData.filter((row: any) => |
|
|
const selectedRowsData = selectedTeamData.filter((row: any) => |
|
@@ -403,71 +434,31 @@ const ProjectFinancialSummary: React.FC = () => { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<Grid item sm> |
|
|
|
|
|
<Card> |
|
|
|
|
|
<CardHeader |
|
|
|
|
|
className="text-slate-500" |
|
|
|
|
|
title="Active Project Financial Status" |
|
|
|
|
|
/> |
|
|
|
|
|
<div |
|
|
|
|
|
className="ml-10 mr-10" |
|
|
|
|
|
style={{ display: "flex", flexWrap: "wrap", justifyContent: "start" }} |
|
|
|
|
|
> |
|
|
|
|
|
{projectFinancialData.map((record, index) => ( |
|
|
|
|
|
<div |
|
|
|
|
|
className="hover:cursor-pointer ml-4 mt-5 mb-4 inline-block" |
|
|
|
|
|
key={index} |
|
|
|
|
|
onClick={(r) => handleCardClick(index)} |
|
|
|
|
|
> |
|
|
|
|
|
<ProjectFinancialCard |
|
|
|
|
|
Title={record.title} |
|
|
|
|
|
TotalActiveProjectNumber={record.activeProject} |
|
|
|
|
|
TotalFees={record.fees} |
|
|
|
|
|
TotalBudget={record.budget} |
|
|
|
|
|
TotalCumulative={record.cumulativeExpenditure} |
|
|
|
|
|
TotalInvoicedAmount={record.invoicedAmount} |
|
|
|
|
|
TotalReceivedAmount={record.receivedAmount} |
|
|
|
|
|
CashFlowStatus={record.cashFlowStatus} |
|
|
|
|
|
CostPerformanceIndex={record.CPI} |
|
|
|
|
|
ClickedIndex={isCardClickedIndex} |
|
|
|
|
|
Index={index} |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
))} |
|
|
|
|
|
</div> |
|
|
|
|
|
</Card> |
|
|
|
|
|
<Card className="mt-5"> |
|
|
|
|
|
<CardHeader |
|
|
|
|
|
className="text-slate-500" |
|
|
|
|
|
title="Selected Team's Project" |
|
|
|
|
|
/> |
|
|
|
|
|
<div style={{ display: "inline-block", width: "99%", marginLeft: 10 }}> |
|
|
|
|
|
<CustomDatagrid |
|
|
|
|
|
rows={selectedTeamData} |
|
|
|
|
|
columns={columns} |
|
|
|
|
|
columnWidth={200} |
|
|
|
|
|
dataGridHeight={300} |
|
|
|
|
|
checkboxSelection={true} |
|
|
|
|
|
onRowSelectionModelChange={handleSelectionChange} |
|
|
|
|
|
selectionModel={selectionModel} |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</Card> |
|
|
|
|
|
<Card className="mt-5"> |
|
|
|
|
|
<CardHeader |
|
|
|
|
|
className="text-slate-500" |
|
|
|
|
|
title="Individual Project Financial Status" |
|
|
|
|
|
/> |
|
|
|
|
|
<div style={{ display: "inline-block", width: "99%", marginLeft: 10 }}> |
|
|
|
|
|
<CustomDatagrid |
|
|
|
|
|
rows={projectFinancialRows} |
|
|
|
|
|
columns={columns2} |
|
|
|
|
|
columnWidth={200} |
|
|
|
|
|
dataGridHeight={300} |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</Card> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
<Grid item sm> |
|
|
|
|
|
<Card> |
|
|
|
|
|
<CardHeader className="text-slate-500" title="Active Project Financial Status"/> |
|
|
|
|
|
<div className="ml-10 mr-10" style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'start'}}> |
|
|
|
|
|
{projectFinancialData.map((record, index) => ( |
|
|
|
|
|
<div className="hover:cursor-pointer ml-4 mt-5 mb-4 inline-block" key={index} onClick={(r) => handleCardClick(index)}> |
|
|
|
|
|
<ProjectFinancialCard Title={record.title} TotalActiveProjectNumber={record.activeProject} TotalFees={record.fees} TotalBudget={record.budget} TotalCumulative={record.cumulativeExpenditure} TotalInvoicedAmount={record.invoicedAmount} TotalReceivedAmount={record.receivedAmount} CashFlowStatus={record.cashFlowStatus} CostPerformanceIndex={record.CPI} ClickedIndex={isCardClickedIndex} Index={index}/> |
|
|
|
|
|
</div> |
|
|
|
|
|
))} |
|
|
|
|
|
</div> |
|
|
|
|
|
</Card> |
|
|
|
|
|
<Card className="mt-5"> |
|
|
|
|
|
<CardHeader className="text-slate-500" title="Selected Team's Project"/> |
|
|
|
|
|
<div style={{display:"inline-block",width:"99%",marginLeft:10}}> |
|
|
|
|
|
{/* <CustomDatagrid rows={clientFinancialRows} columns={columns} columnWidth={200} dataGridHeight={300} checkboxSelection={true} onRowSelectionModelChange={handleSelectionChange} selectionModel={selectionModel}/> */} |
|
|
|
|
|
<CustomDatagrid rows={clientFinancialRows} columns={columns} columnWidth={200} dataGridHeight={300}/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</Card> |
|
|
|
|
|
<Card className="mt-5"> |
|
|
|
|
|
<CardHeader className="text-slate-500" title="Financial Status (by Project)"/> |
|
|
|
|
|
<div style={{display:"inline-block",width:"99%",marginLeft:10}}> |
|
|
|
|
|
<CustomDatagrid rows={projectFinancialRows} columns={columns2} columnWidth={200} dataGridHeight={300}/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</Card> |
|
|
|
|
|
</Grid> |
|
|
); |
|
|
); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|