From 4835921ff9649320ffb65059974edbcdccc54411 Mon Sep 17 00:00:00 2001 From: "Mac\\David" Date: Fri, 24 May 2024 14:50:58 +0800 Subject: [PATCH] update dashboard --- .../ProgressByClient/ProgressByClient.tsx | 2 +- .../ProgressByTeam/ProgressByTeam.tsx | 34 +++++++------- .../ProjectFinancialSummary.tsx | 44 +++++++++---------- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/components/ProgressByClient/ProgressByClient.tsx b/src/components/ProgressByClient/ProgressByClient.tsx index 8961472..3fd7d59 100644 --- a/src/components/ProgressByClient/ProgressByClient.tsx +++ b/src/components/ProgressByClient/ProgressByClient.tsx @@ -511,7 +511,7 @@ const ProgressByClient: React.FC = () => { */}
{ flex: 0.1, }, { - id: "project", - field: "project", + id: "projectName", + field: "projectName", headerName: "Project", - flex: 1, + minWidth:300 }, { id: "team", field: "team", headerName: "Team", - flex: 0.8, + minWidth:50 }, { - id: "teamLeader", - field: "teamLeader", + id: "teamLead", + field: "teamLead", headerName: "Team Leader", - flex: 0.8, + minWidth: 70 }, { - id: "currentStage", - field: "currentStage", - headerName: "Current Stage", - flex: 1, + id: "expectedStage", + field: "expectedStage", + headerName: "Expected Stage", + minWidth: 300 }, { id: "budgetedManhour", field: "budgetedManhour", headerName: "Budgeted Manhour", - flex: 0.8, + minWidth: 70 }, { id: "spentManhour", @@ -292,7 +292,7 @@ const ProgressByTeam: React.FC = () => { return {params.row.spentManhour}; } }, - flex: 0.8, + minWidth: 70 }, { id: "remainedManhour", @@ -307,13 +307,13 @@ const ProgressByTeam: React.FC = () => { return {params.row.remainedManhour}; } }, - flex: 1, + minWidth: 70 }, { id: "comingPaymentMilestone", field: "comingPaymentMilestone", headerName: "Coming Payment Milestone", - flex: 1, + minWidth: 100 }, { id: "alert", @@ -330,7 +330,7 @@ const ProgressByTeam: React.FC = () => { return ; } }, - flex: 0.2, + flex: 0.1, }, ]; @@ -585,7 +585,7 @@ const ProgressByTeam: React.FC = () => {
*/}
{ id: 'customerCode', field: 'customerCode', headerName: "Client Code", - flex: 0.7, + minWidth:50 }, { id: 'customerName', field: 'customerName', headerName: "Client Name", - flex: 1, + minWidth:80 }, { id: 'projectNo', field: 'projectNo', headerName: "Total Project Involved", - flex: 1, + minWidth:80 }, { id: 'cashFlowStatus', field: 'cashFlowStatus', headerName: "Cash Flow Status", - flex: 1, + minWidth:100, renderCell: (params:any) => { console.log(params.row) if (params.row.cashFlowStatus === "Positive") { @@ -120,7 +120,7 @@ const ProjectFinancialSummary: React.FC = () => { id: 'cpi', field: 'cpi', headerName: "CPI", - flex: 0.7, + minWidth:50, renderCell: (params:any) => { if (params.row.cpi >= 1) { return ( @@ -137,7 +137,7 @@ const ProjectFinancialSummary: React.FC = () => { id: 'totalFee', field: 'totalFee', headerName: "Total Fees (HKD)", - flex: 1, + minWidth:50, renderCell: (params:any) => { return ( ${params.row.totalFee} @@ -148,7 +148,7 @@ const ProjectFinancialSummary: React.FC = () => { id: 'totalBudget', field: 'totalBudget', headerName: "Total Budget (HKD)", - flex: 1, + minWidth:50, renderCell: (params:any) => { return ( ${params.row.totalBudget} @@ -159,7 +159,7 @@ const ProjectFinancialSummary: React.FC = () => { id: 'cumulativeExpenditure', field: 'cumulativeExpenditure', headerName: "Total Cumulative Expenditure (HKD)", - flex: 1, + minWidth:280, renderCell: (params:any) => { return ( ${params.row.cumulativeExpenditure} @@ -170,7 +170,7 @@ const ProjectFinancialSummary: React.FC = () => { id: 'totalInvoiced', field: 'totalInvoiced', headerName: "Total Invoiced Amount (HKD)", - flex: 1, + minWidth:250, renderCell: (params:any) => { return ( ${params.row.totalInvoiced} @@ -181,7 +181,7 @@ const ProjectFinancialSummary: React.FC = () => { id: 'totalUnInvoiced', field: 'totalUnInvoiced', headerName: "Total Un-invoiced Amount (HKD)", - flex: 1, + minWidth:250, renderCell: (params:any) => { return ( ${params.row.totalUninvoiced} @@ -192,7 +192,7 @@ const ProjectFinancialSummary: React.FC = () => { id: 'totalReceived', field: 'totalReceived', headerName: "Total Received Amount (HKD)", - flex: 1, + minWidth:250, renderCell: (params:any) => { return ( ${params.row.totalReceived} @@ -255,25 +255,25 @@ const columns2 = [ id: 'projectCode', field: 'projectCode', headerName: "Project Code", - flex: 0.7, + minWidth:50, }, { id: 'projectName', field: 'projectName', headerName: "Project Name", - flex: 1, + minWidth:50, }, { id: 'customerName', field: 'customerName', headerName: "Client Name", - flex: 1, + minWidth:50, }, { id: 'cashFlowStatus', field: 'cashFlowStatus', headerName: "Cash Flow Status", - flex: 1, + minWidth:80, renderCell: (params:any) => { if (params.row.cashFlowStatus === "Positive") { return ( @@ -290,7 +290,7 @@ const columns2 = [ id: "cpi", field: "cpi", headerName: "CPI", - flex: 0.7, + minWidth:50, renderCell: (params: any) => { if (params.row.cpi >= 1) { return {params.row.cpi}; @@ -304,7 +304,7 @@ const columns2 = [ id: 'totalFees', field: 'totalFees', headerName: "Total Fees (HKD)", - flex: 1, + minWidth:50, renderCell: (params:any) => { return ( ${params.row.totalFee} @@ -315,7 +315,7 @@ const columns2 = [ id: 'totalBudget', field: 'totalBudget', headerName: "Total Budget (HKD)", - flex: 1, + minWidth:50, renderCell: (params:any) => { return ( ${params.row.totalBudget} @@ -326,7 +326,7 @@ const columns2 = [ id: 'totalCumulativeExpenditure', field: 'totalCumulativeExpenditure', headerName: "Total Cumulative Expenditure (HKD)", - flex: 1, + minWidth:250, renderCell: (params:any) => { return ( ${params.row.cumulativeExpenditure} @@ -337,7 +337,7 @@ const columns2 = [ id: 'totalInvoicedAmount', field: 'totalInvoicedAmount', headerName: "Total Invoiced Amount (HKD)", - flex: 1, + minWidth:250, renderCell: (params:any) => { return ( ${params.row.totalInvoiced} @@ -348,7 +348,7 @@ const columns2 = [ id: 'totalUnInvoicedAmount', field: 'totalUnInvoicedAmount', headerName: "Total Un-invoiced Amount (HKD)", - flex: 1, + minWidth:250, renderCell: (params:any) => { return ( ${params.row.totalUninvoiced} @@ -359,7 +359,7 @@ const columns2 = [ id: 'totalReceivedAmount', field: 'totalReceivedAmount', headerName: "Total Received Amount (HKD)", - flex: 1, + minWidth:250, renderCell: (params:any) => { return ( ${params.row.totalReceived}