Преглед на файлове

update dashboard

tags/Baseline_30082024_FRONTEND_UAT
Mac\David преди 1 година
родител
ревизия
c0ea395ae1
променени са 4 файла, в които са добавени 33 реда и са изтрити 10 реда
  1. +7
    -0
      src/components/CompanyTeamCashFlow/CompanyTeamCashFlow.tsx
  2. +8
    -5
      src/components/ProgressByClient/ProgressByClient.tsx
  3. +8
    -5
      src/components/ProgressByTeam/ProgressByTeam.tsx
  4. +10
    -0
      src/components/ProjectCashFlow/ProjectCashFlow.tsx

+ 7
- 0
src/components/CompanyTeamCashFlow/CompanyTeamCashFlow.tsx Целия файл

@@ -178,6 +178,13 @@ const CompanyTeamCashFlow: React.FC = () => {
]; ];


const options: ApexOptions = { const options: ApexOptions = {
tooltip: {
y: {
formatter: function(val) {
return val.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}
}
},
chart: { chart: {
height: 350, height: 350,
type: "line", type: "line",


+ 8
- 5
src/components/ProgressByClient/ProgressByClient.tsx Целия файл

@@ -246,7 +246,10 @@ const ProgressByClient: React.FC<Props> = () => {
id: "budgetedManhour", id: "budgetedManhour",
field: "budgetedManhour", field: "budgetedManhour",
headerName: "Budgeted Manhour", headerName: "Budgeted Manhour",
minWidth: 70
minWidth: 70,
renderCell: (params: any) => {
return <span>{params.row.budgetedManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span>;
}
}, },
{ {
id: "spentManhour", id: "spentManhour",
@@ -255,11 +258,11 @@ const ProgressByClient: React.FC<Props> = () => {
renderCell: (params: any) => { renderCell: (params: any) => {
if (params.row.budgetedManhour - params.row.spentManhour <= 0) { if (params.row.budgetedManhour - params.row.spentManhour <= 0) {
return ( return (
<span className="text-red-300">{params.row.spentManhour}</span>
<span className="text-red-300">{params.row.spentManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span>
); );
} else { } else {
console.log(params) console.log(params)
return <span>{params.row.spentManhour}</span>;
return <span>{params.row.spentManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span>;
} }
}, },
minWidth: 70 minWidth: 70
@@ -271,10 +274,10 @@ const ProgressByClient: React.FC<Props> = () => {
renderCell: (params: any) => { renderCell: (params: any) => {
if (params.row.budgetedManhour - params.row.spentManhour <= 0) { if (params.row.budgetedManhour - params.row.spentManhour <= 0) {
return ( return (
<span className="text-red-300">({params.row.remainedManhour})</span>
<span className="text-red-300">({params.row.remainedManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })})</span>
); );
} else { } else {
return <span>{params.row.remainedManhour}</span>;
return <span>{params.row.remainedManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span>;
} }
}, },
minWidth: 70 minWidth: 70


+ 8
- 5
src/components/ProgressByTeam/ProgressByTeam.tsx Целия файл

@@ -277,7 +277,10 @@ const ProgressByTeam: React.FC = () => {
id: "budgetedManhour", id: "budgetedManhour",
field: "budgetedManhour", field: "budgetedManhour",
headerName: "Budgeted Manhour", headerName: "Budgeted Manhour",
minWidth: 70
minWidth: 70,
renderCell: (params: any) => {
return <span>{params.row.budgetedManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span>;
}
}, },
{ {
id: "spentManhour", id: "spentManhour",
@@ -286,10 +289,10 @@ const ProgressByTeam: React.FC = () => {
renderCell: (params: any) => { renderCell: (params: any) => {
if (params.row.budgetedManhour - params.row.spentManhour <= 0) { if (params.row.budgetedManhour - params.row.spentManhour <= 0) {
return ( return (
<span className="text-red-300">{params.row.spentManhour}</span>
<span className="text-red-300">{params.row.spentManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span>
); );
} else { } else {
return <span>{params.row.spentManhour}</span>;
return <span>{params.row.spentManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span>;
} }
}, },
minWidth: 70 minWidth: 70
@@ -301,10 +304,10 @@ const ProgressByTeam: React.FC = () => {
renderCell: (params: any) => { renderCell: (params: any) => {
if (params.row.budgetedManhour - params.row.spentManhour <= 0) { if (params.row.budgetedManhour - params.row.spentManhour <= 0) {
return ( return (
<span className="text-red-300">({params.row.remainedManhour})</span>
<span className="text-red-300">({params.row.remainedManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })})</span>
); );
} else { } else {
return <span>{params.row.remainedManhour}</span>;
return <span>{params.row.remainedManhour.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</span>;
} }
}, },
minWidth: 70 minWidth: 70


+ 10
- 0
src/components/ProjectCashFlow/ProjectCashFlow.tsx Целия файл

@@ -146,6 +146,7 @@ const ProjectCashFlow: React.FC = () => {
setMonthlyAnticipateExpenditureList([0,0,0,0,0,0,0,0,0,0,0,0]) setMonthlyAnticipateExpenditureList([0,0,0,0,0,0,0,0,0,0,0,0])
} }
setMonthlyAnticipateIncomeList(monthlyAnticipateIncome) setMonthlyAnticipateIncomeList(monthlyAnticipateIncome)
console.log(cashFlowAnticipateData)
if(cashFlowAnticipateData.length !== 0){ if(cashFlowAnticipateData.length !== 0){
if (cashFlowAnticipateData[0].anticipateExpenditureList.length !== 0) { if (cashFlowAnticipateData[0].anticipateExpenditureList.length !== 0) {
const anticipateExpenditureList = [] const anticipateExpenditureList = []
@@ -157,6 +158,7 @@ const ProjectCashFlow: React.FC = () => {
for (var j = 1; j < 13; j++){ for (var j = 1; j < 13; j++){
if (month === j && duration > 0) { if (month === j && duration > 0) {
subAnticipateExpenditure.push(anticipateExpenditure) subAnticipateExpenditure.push(anticipateExpenditure)
month = month + 1
duration = duration - 1 duration = duration - 1
} else { } else {
subAnticipateExpenditure.push(0) subAnticipateExpenditure.push(0)
@@ -164,6 +166,7 @@ const ProjectCashFlow: React.FC = () => {
} }
anticipateExpenditureList.push(subAnticipateExpenditure) anticipateExpenditureList.push(subAnticipateExpenditure)
} }
console.log(anticipateExpenditureList)
const result = new Array(anticipateExpenditureList[0].length).fill(0); const result = new Array(anticipateExpenditureList[0].length).fill(0);
for (const arr of anticipateExpenditureList) { for (const arr of anticipateExpenditureList) {
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
@@ -306,6 +309,13 @@ const ProjectCashFlow: React.FC = () => {
]; ];


const options: ApexOptions = { const options: ApexOptions = {
tooltip: {
y: {
formatter: function(val) {
return val.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}
}
},
chart: { chart: {
height: 350, height: 350,
type: "line", type: "line",


Зареждане…
Отказ
Запис