@ -318,11 +318,12 @@ const DashboardBOD = () => {
tableData . push ( {
tableData . push ( {
"id" : item . id ,
"id" : item . id ,
"last_gantt_id" : item . lastGanttId ? . last _gantt _id ,
"last_gantt_id" : item . lastGanttId ? . last _gantt _id ,
"kode_sortname" : item . kode _sortname ? . kode _sortname ? item . kode _sortname : "-" ,
"project_name" : item . nama ,
"project_name" : item . nama ,
"project_manager" : item . pm ? . name ,
"project_manager" : item . pm ? . name ,
"planned_interval" : ` ${ item . mulai _proyek ? moment ( item . mulai _proyek ) . format ( 'DD/MM/YYYY' ) : '-' } - ${ item . akhir _proyek ? moment ( item . akhir _proyek ) . format ( 'DD/MM/YYYY' ) : '-' } ` ,
"planned_interval" : ` ${ item . mulai _proyek ? moment ( item . mulai _proyek ) . format ( 'DD/MM/YYYY' ) : '-' } - ${ item . akhir _proyek ? moment ( item . akhir _proyek ) . format ( 'DD/MM/YYYY' ) : '-' } ` ,
"manpower" : ` ${ item . manPowers } / ${ total _manpowers } ` ,
"manpower" : ` ${ item . manPowers } / ${ total _manpowers } ` ,
"project_budget" : item . rencana _biaya ? toRupiah ( item . rencana _biaya ) : '-' ,
"project_budget" : item . rencana _biaya ? toRupiah ( item . rencana _biaya ) : '-' ,
"invoice" : item . invoice ? . invoiced ? toRupiah ( item . invoice . invoiced ) : '-' ,
"invoice" : item . invoice ? . invoiced ? toRupiah ( item . invoice . invoiced ) : '-' ,
"cash_in" : item . invoice ? . paid ? toRupiah ( item . invoice . paid ) : '-' ,
"cash_in" : item . invoice ? . paid ? toRupiah ( item . invoice . paid ) : '-' ,
"outstanding_balance" : outstanding _balance ,
"outstanding_balance" : outstanding _balance ,
@ -344,6 +345,7 @@ const DashboardBOD = () => {
isReady = { READY _TABLE _DETAIL _EXPENDITURE }
isReady = { READY _TABLE _DETAIL _EXPENDITURE }
title = "Detail Project Expenditure"
title = "Detail Project Expenditure"
tableHeader = { [
tableHeader = { [
{ title : "Project Code" , key : "kode_sortname" } ,
{ title : "Project Name" , key : "project_name" } ,
{ title : "Project Name" , key : "project_name" } ,
{ title : "Project Manager" , key : "project_manager" } ,
{ title : "Project Manager" , key : "project_manager" } ,
{ title : "Planned Interval" , key : "planned_interval" } ,
{ title : "Planned Interval" , key : "planned_interval" } ,
@ -366,7 +368,7 @@ const DashboardBOD = () => {
const FloatingFilter = ( ) => {
const FloatingFilter = ( ) => {
return (
return (
< div style = { { position : 'absolute' , float : 'right' } } >
< div style = { { position : 'absolute' , float : 'right' } } >
< Icon icon = "ion:filter" width = { 30 } height = { 30 } color = "#FFFFFF" / >
< Icon icon = "ion:filter" width = { 30 } height = { 30 } color = "#FFFFFF" / >
< / d i v >
< / d i v >
)
)
@ -403,9 +405,9 @@ const DashboardBOD = () => {
< div style = { { position : 'relative' , height : '25vh' , margin : 'auto' , paddingBottom : 10 , justifyContent : 'center' } } >
< div style = { { position : 'relative' , height : '25vh' , margin : 'auto' , paddingBottom : 10 , justifyContent : 'center' } } >
{ READY _PROJECT _EXPENDITURE ?
{ READY _PROJECT _EXPENDITURE ?
PROJECT _EXPENDITURE ?
PROJECT _EXPENDITURE ?
< Bar
< Bar
options = { {
options = { {
indexAxis : 'y' ,
indexAxis : 'y' ,
scales : {
scales : {
x : {
x : {
ticks : {
ticks : {
@ -415,51 +417,51 @@ const DashboardBOD = () => {
}
}
}
}
} ,
} ,
elements : {
elements : {
bar : {
bar : {
borderWidth : 2 ,
borderWidth : 2 ,
} ,
} ,
} ,
} ,
responsive : true ,
responsive : true ,
maintainAspectRatio : false ,
maintainAspectRatio : false ,
plugins : {
plugins : {
legend : {
legend : {
display : false ,
display : false ,
position : 'right' ,
position : 'right' ,
labels : {
labels : {
boxWidth : 10
boxWidth : 10
}
} ,
datalabels : {
color : '#FFFFFF' ,
formatter : function ( value , context ) {
return value ? toRupiah ( value , { useUnit : 'jt' } ) : 0
}
}
}
} ,
} ,
datalabels : {
} }
color : '#FFFFFF' ,
data = { {
formatter : function ( value , context ) {
labels : [ 'Total Budget' , 'Expenditure' , 'Invoice' , 'Cash In' ] ,
return value ? toRupiah ( value , { useUnit : 'jt' } ) : 0
datasets : [
{
label : '' ,
// data: [COMPANY_CASHFLOW_TOTAL_BUDGET, COMPANY_CASHFLOW_EXPENDITURE, COMPANY_CASHFLOW_INVOICE, COMPANY_CASHFLOW_CASH_IN],
data : [
PROJECT _EXPENDITURE && PROJECT _EXPENDITURE . total _budget ? PROJECT _EXPENDITURE . total _budget : 0 ,
PROJECT _EXPENDITURE && PROJECT _EXPENDITURE . total _expenditure ? PROJECT _EXPENDITURE . total _expenditure : 0 ,
PROJECT _EXPENDITURE && PROJECT _EXPENDITURE . total _invoice ? PROJECT _EXPENDITURE . total _invoice : 0 ,
PROJECT _EXPENDITURE && PROJECT _EXPENDITURE . total _paid _invoice ? PROJECT _EXPENDITURE . total _paid _invoice : 0
] ,
borderColor : [ '#480CA8' , '#B5179E' , '#A26A16' , '#4C4747' ] ,
backgroundColor : [ '#480CA8' , '#B5179E' , '#A26A16' , '#4C4747' ] ,
borderRadius : 5 ,
borderSkipped : false
}
}
}
] ,
} ,
} }
} }
/ >
data = { {
:
labels : [ 'Total Budget' , 'Expenditure' , 'Invoice' , 'Cash In' ] ,
< NoDataChart / >
datasets : [
{
label : '' ,
// data: [COMPANY_CASHFLOW_TOTAL_BUDGET, COMPANY_CASHFLOW_EXPENDITURE, COMPANY_CASHFLOW_INVOICE, COMPANY_CASHFLOW_CASH_IN],
data : [
PROJECT _EXPENDITURE && PROJECT _EXPENDITURE . total _budget ? PROJECT _EXPENDITURE . total _budget : 0 ,
PROJECT _EXPENDITURE && PROJECT _EXPENDITURE . total _expenditure ? PROJECT _EXPENDITURE . total _expenditure : 0 ,
PROJECT _EXPENDITURE && PROJECT _EXPENDITURE . total _invoice ? PROJECT _EXPENDITURE . total _invoice : 0 ,
PROJECT _EXPENDITURE && PROJECT _EXPENDITURE . total _paid _invoice ? PROJECT _EXPENDITURE . total _paid _invoice : 0
] ,
borderColor : [ '#480CA8' , '#B5179E' , '#A26A16' , '#4C4747' ] ,
backgroundColor : [ '#480CA8' , '#B5179E' , '#A26A16' , '#4C4747' ] ,
borderRadius : 5 ,
borderSkipped : false
}
] ,
} }
/ >
:
< NoDataChart / >
:
:
< ContentLoader
< ContentLoader
speed = { 2 }
speed = { 2 }
@ -491,7 +493,7 @@ const DashboardBOD = () => {
title = "Project By Financial Health"
title = "Project By Financial Health"
subtitle = "Amount of project grouped by financial health."
subtitle = "Amount of project grouped by financial health."
chartType = "pie"
chartType = "pie"
chartData = { PROJECT _BY _FINANCIAL _HEALTH ? {
chartData = { PROJECT _BY _FINANCIAL _HEALTH ? {
labels : [ "Cost Overrun" , "Early Warning" , "On Budget" ] ,
labels : [ "Cost Overrun" , "Early Warning" , "On Budget" ] ,
datasets : [
datasets : [
{
{
@ -517,7 +519,7 @@ const DashboardBOD = () => {
title = "Project By Schedule Health"
title = "Project By Schedule Health"
subtitle = "Amount of project grouped by Schedule health."
subtitle = "Amount of project grouped by Schedule health."
chartType = "pie"
chartType = "pie"
chartData = { PROJECT _BY _SCHEDULE _HEALTH ? {
chartData = { PROJECT _BY _SCHEDULE _HEALTH ? {
labels : [ "Behind Schedule" , "Early Warning" , "On Schedule" ] ,
labels : [ "Behind Schedule" , "Early Warning" , "On Schedule" ] ,
datasets : [
datasets : [
{
{
@ -572,7 +574,7 @@ const DashboardBOD = () => {
}
}
}
}
} }
} }
chartData = { PROJECT _PER _DIVISION ? {
chartData = { PROJECT _PER _DIVISION ? {
// labels: [['Telecommunication', 'Solution Service'], ['Telecommunication', 'Solution Product'], 'Energy Solution', 'Constructions'],
// labels: [['Telecommunication', 'Solution Service'], ['Telecommunication', 'Solution Product'], 'Energy Solution', 'Constructions'],
labels : PROJECT _PER _DIVISION ? PROJECT _PER _DIVISION . map ( ( item , idx ) => item . name ) : [ ] ,
labels : PROJECT _PER _DIVISION ? PROJECT _PER _DIVISION . map ( ( item , idx ) => item . name ) : [ ] ,
datasets : [
datasets : [
@ -618,13 +620,13 @@ const DashboardBOD = () => {
} ,
} ,
datalabels : {
datalabels : {
color : '#FFFFFF' ,
color : '#FFFFFF' ,
formatter : function ( value , context ) {
formatter : function ( value , context ) {
return value ? toRupiah ( value , { useUnit : 'jt' } ) : 0
return value ? toRupiah ( value , { useUnit : 'jt' } ) : 0
}
}
}
}
}
}
} }
} }
chartData = { PROJECT _VALUE _PER _DIVISION ? {
chartData = { PROJECT _VALUE _PER _DIVISION ? {
// labels: [['Telecommunication', 'Solution Service'], ['Telecommunication', 'Solution Product'], 'Energy Solution', 'Constructions'],
// labels: [['Telecommunication', 'Solution Service'], ['Telecommunication', 'Solution Product'], 'Energy Solution', 'Constructions'],
labels : PROJECT _VALUE _PER _DIVISION ? PROJECT _VALUE _PER _DIVISION . map ( ( item , idx ) => item . name ) : [ ] ,
labels : PROJECT _VALUE _PER _DIVISION ? PROJECT _VALUE _PER _DIVISION . map ( ( item , idx ) => item . name ) : [ ] ,
datasets : [
datasets : [
@ -656,46 +658,46 @@ const DashboardBOD = () => {
< div style = { { position : 'relative' , height : '25vh' , margin : 'auto' , paddingBottom : 10 , justifyContent : 'center' } } >
< div style = { { position : 'relative' , height : '25vh' , margin : 'auto' , paddingBottom : 10 , justifyContent : 'center' } } >
{ READY _PROJECT _BY _PHASE ?
{ READY _PROJECT _BY _PHASE ?
PROJECT _BY _PHASE && PROJECT _BY _PHASE . length > 0 ?
PROJECT _BY _PHASE && PROJECT _BY _PHASE . length > 0 ?
< Bar
< Bar
options = { {
options = { {
indexAxis : 'y' ,
indexAxis : 'y' ,
elements : {
elements : {
bar : {
bar : {
borderWidth : 2 ,
borderWidth : 2 ,
} ,
} ,
} ,
responsive : true ,
maintainAspectRatio : false ,
plugins : {
legend : {
display : false ,
} ,
} ,
datalabels : {
responsive : true ,
color : '#FFFFFF'
maintainAspectRatio : false ,
plugins : {
legend : {
display : false ,
} ,
datalabels : {
color : '#FFFFFF'
}
}
}
}
} }
} }
data = { {
data = { {
// labels: ["Initiation", "Planning", "Execution", "Control Monitoring", "Close"],
// labels: ["Initiation", "Planning", "Execution", "Control Monitoring", "Close"],
labels : PROJECT _BY _PHASE ? PROJECT _BY _PHASE . map ( ( item , idx ) => item . name ) : [ ] ,
labels : PROJECT _BY _PHASE ? PROJECT _BY _PHASE . map ( ( item , idx ) => item . name ) : [ ] ,
datasets : [
datasets : [
{
{
label : "" ,
label : "" ,
// data: [3, 1, 2, 3, 7],
// data: [3, 1, 2, 3, 7],
// borderColor: ["#F74B25", "#B5179E", "#7209B7", "#023E8A", "#3B009A"],
// borderColor: ["#F74B25", "#B5179E", "#7209B7", "#023E8A", "#3B009A"],
// backgroundColor: ["#F74B25", "#B5179E", "#7209B7", "#023E8A", "#3B009A"],
// backgroundColor: ["#F74B25", "#B5179E", "#7209B7", "#023E8A", "#3B009A"],
data : PROJECT _BY _PHASE ? PROJECT _BY _PHASE . map ( ( item , idx ) => item . totalProject ) : [ ] ,
data : PROJECT _BY _PHASE ? PROJECT _BY _PHASE . map ( ( item , idx ) => item . totalProject ) : [ ] ,
borderColor : PROJECT _BY _PHASE ? PROJECT _BY _PHASE . map ( ( item , idx ) => item . color ) : [ ] ,
borderColor : PROJECT _BY _PHASE ? PROJECT _BY _PHASE . map ( ( item , idx ) => item . color ) : [ ] ,
backgroundColor : PROJECT _BY _PHASE ? PROJECT _BY _PHASE . map ( ( item , idx ) => item . color ) : [ ] ,
backgroundColor : PROJECT _BY _PHASE ? PROJECT _BY _PHASE . map ( ( item , idx ) => item . color ) : [ ] ,
borderWidth : 2 ,
borderWidth : 2 ,
borderRadius : 5 ,
borderRadius : 5 ,
borderSkipped : false
borderSkipped : false
} ,
} ,
] ,
] ,
} }
} }
/ >
/ >
:
:
< NoDataChart / >
< NoDataChart / >
:
:
< ContentLoader
< ContentLoader
speed = { 2 }
speed = { 2 }
@ -729,77 +731,84 @@ const DashboardBOD = () => {
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< div style = { { position : 'relative' , height : '20vh' , margin : 'auto' , paddingBottom : 10 , justifyContent : 'center' } } >
< div style = { { position : 'relative' , height : '20vh' , margin : 'auto' , paddingBottom : 10 , justifyContent : 'center' } } >
{ READY _PROJECT _INVOICE _VS _CASH _IN ?
{ READY _PROJECT _INVOICE _VS _CASH _IN ?
PROJECT _INVOICE _VS _CASH _IN ?
PROJECT _INVOICE _VS _CASH _IN ?
< Bar
< Bar
options = { {
options = { {
elements : {
elements : {
bar : {
bar : {
borderWidth : 2 ,
borderWidth : 2 ,
} ,
} ,
} ,
} ,
indexAxis : 'x' ,
indexAxis : 'x' ,
responsive : true ,
responsive : true ,
maintainAspectRatio : false ,
maintainAspectRatio : false ,
scales : {
scales : {
x : {
x : {
ticks : {
ticks : {
font : {
font : {
size : 9 ,
size : 9 ,
} ,
} ,
}
}
} ,
}
y : {
} ,
ticks : {
plugins : {
callback : function ( value ) {
legend : {
return toRupiah ( value , { useUnit : 'jt' } ) ;
display : true ,
}
position : 'right' ,
}
labels : {
} ,
boxWidth : 10
}
} ,
} ,
datalabels : {
plugins : {
color : '#FFFFFF' ,
legend : {
// rotation: -90
display : true ,
formatter : function ( value , context ) {
position : 'right' ,
return value ? toRupiah ( value , { useUnit : 'jt' } ) : 0
labels : {
boxWidth : 10
}
} ,
datalabels : {
color : '#FFFFFF' ,
// rotation: -90
formatter : function ( value , context ) {
return value ? toRupiah ( value , { useUnit : 'jt' } ) : 0
}
}
}
}
}
}
} }
} }
data = { {
data = { {
// labels: ["Gedung Tenaga Panel Surya", "Pembangunan Gedung Tower ABC", "Tower Jaringan Jawa Barat", "Tower Jaringan Jawa Timur", "Tower Jaringan Jawa Tengah", "Tower Jaringan Bali", "Project Tower ABC", "Tower Jaringan DKI Jakarta", "Tower Jaringan NTT"],
// labels: ["Gedung Tenaga Panel Surya", "Pembangunan Gedung Tower ABC", "Tower Jaringan Jawa Barat", "Tower Jaringan Jawa Timur", "Tower Jaringan Jawa Tengah", "Tower Jaringan Bali", "Project Tower ABC", "Tower Jaringan DKI Jakarta", "Tower Jaringan NTT"],
// labels: [["Gedung Tenaga", "Panel Surya"], ["Pembangunan Gedung", "Tower ABC"], ["Tower Jaringan", "Jawa Barat"], ["Tower Jaringan", "Jawa Timur"], ["Tower Jaringan", "Jawa Tengah"], "Tower Jaringan Bali", "Project Tower ABC", ["Tower Jaringan", "DKI Jakarta"], "Tower Jaringan NTT"],
// labels: [["Gedung Tenaga", "Panel Surya"], ["Pembangunan Gedung", "Tower ABC"], ["Tower Jaringan", "Jawa Barat"], ["Tower Jaringan", "Jawa Timur"], ["Tower Jaringan", "Jawa Tengah"], "Tower Jaringan Bali", "Project Tower ABC", ["Tower Jaringan", "DKI Jakarta"], "Tower Jaringan NTT"],
labels : PROJECT _INVOICE _VS _CASH _IN ? PROJECT _INVOICE _VS _CASH _IN . map ( ( item , idx ) => item . project ) : [ ] ,
labels : PROJECT _INVOICE _VS _CASH _IN ? PROJECT _INVOICE _VS _CASH _IN . map ( ( item , idx ) => item . project ) : [ ] ,
datasets : [
datasets : [
{
{
label : "Invoiced" ,
label : "Invoiced" ,
// data: [16, 8, 12, 10, 13, 12, 10, 10, 8],
// data: [16, 8, 12, 10, 13, 12, 10, 10, 8],
data : PROJECT _INVOICE _VS _CASH _IN ? PROJECT _INVOICE _VS _CASH _IN . map ( ( item , idx ) => item . invoiced ) : [ ] ,
data : PROJECT _INVOICE _VS _CASH _IN ? PROJECT _INVOICE _VS _CASH _IN . map ( ( item , idx ) => item . invoiced ) : [ ] ,
borderColor : '#A36A16' ,
borderColor : '#A36A16' ,
backgroundColor : '#A36A16' ,
backgroundColor : '#A36A16' ,
// borderWidth: 2,
// borderWidth: 2,
borderRadius : 5 ,
borderRadius : 5 ,
borderSkipped : false
borderSkipped : false
} ,
} ,
{
{
label : "Cash In" ,
label : "Cash In" ,
// data: [1, 1, 7, 6, 10, 9.5, 8, 9, 7.5],
// data: [1, 1, 7, 6, 10, 9.5, 8, 9, 7.5],
data : PROJECT _INVOICE _VS _CASH _IN ? PROJECT _INVOICE _VS _CASH _IN . map ( ( item , idx ) => item . paid ) : [ ] ,
data : PROJECT _INVOICE _VS _CASH _IN ? PROJECT _INVOICE _VS _CASH _IN . map ( ( item , idx ) => item . paid ) : [ ] ,
borderColor : '#4C4747' ,
borderColor : '#4C4747' ,
backgroundColor : '#4C4747' ,
backgroundColor : '#4C4747' ,
// borderWidth: 2,
// borderWidth: 2,
borderRadius : 5 ,
borderRadius : 5 ,
borderSkipped : false
borderSkipped : false
}
}
] ,
] ,
} }
} }
/ >
/ >
:
:
< NoDataChart / >
< NoDataChart / >
:
:
< ContentLoaderChart type = "vertical-bar" / >
< ContentLoaderChart type = "vertical-bar" / >
}
}
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / C o l >
< / C o l >
@ -813,7 +822,7 @@ const DashboardBOD = () => {
mode = { healthPerDivisionMode }
mode = { healthPerDivisionMode }
changeMode = { ( mode ) => setHealthPerDivisionMode ( mode ) }
changeMode = { ( mode ) => setHealthPerDivisionMode ( mode ) }
chartType = "vertical-bar"
chartType = "vertical-bar"
chartData = { PROJECT _SCHEDULE _HEALTH _PER _DIVISION || PROJECT _BUDGET _HEALTH _PER _DIVISION ? {
chartData = { PROJECT _SCHEDULE _HEALTH _PER _DIVISION || PROJECT _BUDGET _HEALTH _PER _DIVISION ? {
// labels: ['Telecommunication Solution Service', 'Telecommunication Solution Product', 'Energy Solution', 'Constructions'],
// labels: ['Telecommunication Solution Service', 'Telecommunication Solution Product', 'Energy Solution', 'Constructions'],
// labels: [['Telecommunication', 'Solution Service'], ['Telecommunication', 'Solution Product'], 'Energy Solution', 'Constructions'],
// labels: [['Telecommunication', 'Solution Service'], ['Telecommunication', 'Solution Product'], 'Energy Solution', 'Constructions'],
labels :
labels :