|
|
@@ -134,7 +134,7 @@ const ProjectResourceConsumptionRanking: React.FC = () => { |
|
|
|
for (let i = 0; i < teamProjectResult.length; i++){ |
|
|
|
teamProjectResult[i].color = color[i] |
|
|
|
console.log(teamProjectResult[i]) |
|
|
|
projectNo.push(teamProjectResult[i].projectCode + "(" + teamProjectResult[i].team + ")") |
|
|
|
projectNo.push(teamProjectResult[i].team + "(" + teamProjectResult[i].teamLead + ")") |
|
|
|
projectName.push(teamProjectResult[i].projectName) |
|
|
|
projectBudgetedManHour.push(teamProjectResult[i].budgetedManhour) |
|
|
|
projectSpentManHour.push(teamProjectResult[i].spentManhour) |
|
|
@@ -319,18 +319,6 @@ const ProjectResourceConsumptionRanking: React.FC = () => { |
|
|
|
}, |
|
|
|
flex: 0.1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "projectCode", |
|
|
|
field: "projectCode", |
|
|
|
headerName: "Project No", |
|
|
|
minWidth:100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "projectName", |
|
|
|
field: "projectName", |
|
|
|
headerName: "Project", |
|
|
|
minWidth:300 |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "team", |
|
|
|
field: "team", |
|
|
@@ -343,27 +331,6 @@ const ProjectResourceConsumptionRanking: React.FC = () => { |
|
|
|
headerName: "Team Leader", |
|
|
|
minWidth: 70 |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "expectedStage", |
|
|
|
field: "expectedStage", |
|
|
|
headerName: "Expected Stage", |
|
|
|
minWidth: 300, |
|
|
|
renderCell: (params: any) => { |
|
|
|
if (params.row.expectedStage != null){ |
|
|
|
const expectedStage = params.row.expectedStage; |
|
|
|
const lines = expectedStage.split(",").map((line:any, index:any) => ( |
|
|
|
<React.Fragment key={index}> |
|
|
|
{line.trim()} |
|
|
|
<br /> |
|
|
|
</React.Fragment> |
|
|
|
)); |
|
|
|
return <div>{lines}</div>; |
|
|
|
} else { |
|
|
|
return <div>-</div>; |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "budgetedManhour", |
|
|
|
field: "budgetedManhour", |
|
|
@@ -403,12 +370,6 @@ const ProjectResourceConsumptionRanking: React.FC = () => { |
|
|
|
}, |
|
|
|
minWidth: 70 |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "comingPaymentMilestone", |
|
|
|
field: "comingPaymentMilestone", |
|
|
|
headerName: "Coming Payment Milestone", |
|
|
|
minWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "alert", |
|
|
|
field: "alert", |
|
|
@@ -626,7 +587,7 @@ const ProjectResourceConsumptionRanking: React.FC = () => { |
|
|
|
if (i === selectedRowsData.length && i > 0) { |
|
|
|
projectArray.push("Remained"); |
|
|
|
} else if (selectedRowsData.length > 0) { |
|
|
|
projectArray.push(selectedRowsData[i].projectName); |
|
|
|
projectArray.push(selectedRowsData[i].team); |
|
|
|
totalBudgetManhour += Number(selectedRowsData[i].budgetedManhour); |
|
|
|
totalSpent += Number(selectedRowsData[i].spentManhour); |
|
|
|
pieChartColorArray.push(selectedRowsData[i].color); |
|
|
|