|
|
@ -61,7 +61,7 @@ const DashboardBOD = (props) => { |
|
|
|
const [READY_TABLE_DETAIL_EXPENDITURE, SET_READY_TABLE_DETAIL_EXPENDITURE] = useState(false); |
|
|
|
const [READY_TABLE_DETAIL_EXPENDITURE, SET_READY_TABLE_DETAIL_EXPENDITURE] = useState(false); |
|
|
|
const [DATA_DETAIL_EXPENDITURE, SET_DATA_DETAIL_EXPENDITURE] = useState([]); |
|
|
|
const [DATA_DETAIL_EXPENDITURE, SET_DATA_DETAIL_EXPENDITURE] = useState([]); |
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
actualProgressProject(); |
|
|
|
// actualProgressProject();
|
|
|
|
getCompanyCashFlow(); // expenditure
|
|
|
|
getCompanyCashFlow(); // expenditure
|
|
|
|
getCompanyExpenditureColor(); // expenditure Color
|
|
|
|
getCompanyExpenditureColor(); // expenditure Color
|
|
|
|
getCompanyFinancialHealthColor(); // financial health Color
|
|
|
|
getCompanyFinancialHealthColor(); // financial health Color
|
|
|
@ -472,7 +472,34 @@ const DashboardBOD = (props) => { |
|
|
|
y: { |
|
|
|
y: { |
|
|
|
ticks: { |
|
|
|
ticks: { |
|
|
|
autoSkip: false, |
|
|
|
autoSkip: false, |
|
|
|
stepSize: 2 |
|
|
|
stepSize: 2, |
|
|
|
|
|
|
|
maxRotation: 0, |
|
|
|
|
|
|
|
minRotation: 0, |
|
|
|
|
|
|
|
callback: function (value) { |
|
|
|
|
|
|
|
const label = this.getLabelForValue(value); |
|
|
|
|
|
|
|
const maxLength = 30; |
|
|
|
|
|
|
|
const splitLabel = (label) => { |
|
|
|
|
|
|
|
if (label.length <= maxLength) { |
|
|
|
|
|
|
|
return [label]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const words = label.split(' '); |
|
|
|
|
|
|
|
let lines = []; |
|
|
|
|
|
|
|
let currentLine = ''; |
|
|
|
|
|
|
|
words.forEach((word) => { |
|
|
|
|
|
|
|
if (currentLine.length + word.length + 1 <= maxLength) { |
|
|
|
|
|
|
|
currentLine += word + ' '; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
lines.push(currentLine.trim()); |
|
|
|
|
|
|
|
currentLine = word + ' '; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (currentLine.length > 0) { |
|
|
|
|
|
|
|
lines.push(currentLine.trim()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return lines; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return splitLabel(label); |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -493,8 +520,8 @@ const DashboardBOD = (props) => { |
|
|
|
data={{ |
|
|
|
data={{ |
|
|
|
labels: [ |
|
|
|
labels: [ |
|
|
|
`Target Pendapatan ${moment().format('YYYY')}`, |
|
|
|
`Target Pendapatan ${moment().format('YYYY')}`, |
|
|
|
'Income Year', |
|
|
|
'Total Nilai Kontrak Yang Sedang Berjalan', |
|
|
|
'Total Nilai Proyek', |
|
|
|
'Target Pendapatan Berdasarkan Kontrak 2024' |
|
|
|
// 'Anggaran Biaya',
|
|
|
|
// 'Anggaran Biaya',
|
|
|
|
// 'Realisasi Anggaran Biaya',
|
|
|
|
// 'Realisasi Anggaran Biaya',
|
|
|
|
// 'Laba'
|
|
|
|
// 'Laba'
|
|
|
@ -510,8 +537,8 @@ const DashboardBOD = (props) => { |
|
|
|
// PROJECT_EXPENDITURE?.total_paid_invoice || 0,
|
|
|
|
// PROJECT_EXPENDITURE?.total_paid_invoice || 0,
|
|
|
|
// PROJECT_EXPENDITURE?.total_paid_invoice || 0
|
|
|
|
// PROJECT_EXPENDITURE?.total_paid_invoice || 0
|
|
|
|
98000000000, |
|
|
|
98000000000, |
|
|
|
PROJECT_EXPENDITURE?.total_income_year || 0, |
|
|
|
PROJECT_EXPENDITURE?.total_value_proyek || 0, |
|
|
|
PROJECT_EXPENDITURE?.total_value_proyek || 0 |
|
|
|
PROJECT_EXPENDITURE?.total_income_year || 0 |
|
|
|
], |
|
|
|
], |
|
|
|
borderColor: [ |
|
|
|
borderColor: [ |
|
|
|
PROJECT_EXPENDITURE_COLOR?.total_budget || '#480ca8', |
|
|
|
PROJECT_EXPENDITURE_COLOR?.total_budget || '#480ca8', |
|
|
@ -535,7 +562,6 @@ const DashboardBOD = (props) => { |
|
|
|
], |
|
|
|
], |
|
|
|
}} |
|
|
|
}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
: |
|
|
|
: |
|
|
|
<NoDataChart /> |
|
|
|
<NoDataChart /> |
|
|
|
: |
|
|
|
: |
|
|
|