@ -31,7 +31,7 @@ const DashboardBOD = () => {
const [ READY _PROJECT _VALUE _PER _DIVISION , SET _READY _PROJECT _VALUE _PER _DIVISION ] = useState ( false ) ;
const [ READY _PROJECT _VALUE _PER _DIVISION , SET _READY _PROJECT _VALUE _PER _DIVISION ] = useState ( false ) ;
const [ READY _PROJECT _INVOICE _VS _CASH _IN , SET _READY _PROJECT _INVOICE _VS _CASH _IN ] = useState ( false ) ;
const [ READY _PROJECT _INVOICE _VS _CASH _IN , SET _READY _PROJECT _INVOICE _VS _CASH _IN ] = useState ( false ) ;
const [ READY _PROJECT _SCHEDULE _BUDGET _HEALTH _PER _DIVISION , SET _READY _PROJECT _SCHEDULE _BUDGET _HEALTH _PER _DIVISION ] = useState ( false ) ;
const [ READY _PROJECT _SCHEDULE _BUDGET _HEALTH _PER _DIVISION , SET _READY _PROJECT _SCHEDULE _BUDGET _HEALTH _PER _DIVISION ] = useState ( false ) ;
const [ PROJECT _EXPENDITURE , SET _PROJECT _EXPENDITURE ] = useState ( null ) ;
const [ PROJECT _EXPENDITURE , SET _PROJECT _EXPENDITURE ] = useState ( null ) ;
const [ PROJECT _BY _PHASE , SET _PROJECT _BY _PHASE ] = useState ( null ) ;
const [ PROJECT _BY _PHASE , SET _PROJECT _BY _PHASE ] = useState ( null ) ;
const [ PROJECT _BY _FINANCIAL _HEALTH , SET _PROJECT _BY _FINANCIAL _HEALTH ] = useState ( null ) ;
const [ PROJECT _BY _FINANCIAL _HEALTH , SET _PROJECT _BY _FINANCIAL _HEALTH ] = useState ( null ) ;
@ -64,7 +64,7 @@ const DashboardBOD = () => {
const URL = ` ${ BASE _OSPRO } /api/dashboard/get-company-cashflow `
const URL = ` ${ BASE _OSPRO } /api/dashboard/get-company-cashflow `
const result = await axios . get ( URL , HEADER ) . then ( res => res ) . catch ( err => err . response )
const result = await axios . get ( URL , HEADER ) . then ( res => res ) . catch ( err => err . response )
const content = "Get Project Expenditure." ;
const content = "Get Project Expenditure." ;
if ( ! result ) {
if ( ! result ) {
NotificationManager . error ( ` ${ content } Could not connect to internet. ` , "Failed" ) ;
NotificationManager . error ( ` ${ content } Could not connect to internet. ` , "Failed" ) ;
SET _READY _PROJECT _EXPENDITURE ( true ) ;
SET _READY _PROJECT _EXPENDITURE ( true ) ;
@ -253,7 +253,7 @@ const DashboardBOD = () => {
const URL = ` ${ BASE _OSPRO } /api/dashboard/get-total-project-value-per-division `
const URL = ` ${ BASE _OSPRO } /api/dashboard/get-total-project-value-per-division `
const result = await axios . get ( URL , HEADER ) . then ( res => res ) . catch ( err => err . response )
const result = await axios . get ( URL , HEADER ) . then ( res => res ) . catch ( err => err . response )
const content = "Get Project Value by Division" ;
const content = "Get Project Value by Division" ;
if ( ! result ) {
if ( ! result ) {
NotificationManager . error ( ` ${ content } Could not connect to internet. ` , "Failed" ) ;
NotificationManager . error ( ` ${ content } Could not connect to internet. ` , "Failed" ) ;
SET _READY _PROJECT _VALUE _PER _DIVISION ( true ) ;
SET _READY _PROJECT _VALUE _PER _DIVISION ( true ) ;
@ -282,7 +282,7 @@ const DashboardBOD = () => {
const URL = ` ${ BASE _OSPRO } /api/dashboard/get-detail-expenditure `
const URL = ` ${ BASE _OSPRO } /api/dashboard/get-detail-expenditure `
const result = await axios . get ( URL , HEADER ) . then ( res => res ) . catch ( err => err . response )
const result = await axios . get ( URL , HEADER ) . then ( res => res ) . catch ( err => err . response )
const content = "Get Detail Expenditure" ;
const content = "Get Detail Expenditure" ;
if ( ! result ) {
if ( ! result ) {
NotificationManager . error ( ` ${ content } Could not connect to internet. ` , "Failed" ) ;
NotificationManager . error ( ` ${ content } Could not connect to internet. ` , "Failed" ) ;
SET _READY _TABLE _DETAIL _EXPENDITURE ( true ) ;
SET _READY _TABLE _DETAIL _EXPENDITURE ( true ) ;
@ -314,15 +314,16 @@ const DashboardBOD = () => {
else {
else {
outstanding _balance = '-' ;
outstanding _balance = '-' ;
}
}
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,14 +368,14 @@ 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 >
)
)
}
}
return (
return (
< div style = { { marginLeft : - 25 , marginRight : - 25 } } >
< div style = { { marginLeft : - 25 , marginRight : - 25 } } >
{ /* <FloatingFilter /> */ }
{ /* <FloatingFilter /> */ }
< NotificationContainer / >
< NotificationContainer / >
@ -398,14 +400,14 @@ const DashboardBOD = () => {
< div style = { { backgroundColor : '#DDDDDD' , color : '#4C4747' , borderRadius : 5 , padding : 4 , fontWeight : 500 , fontSize : 12 , textAlign : 'center' , lineHeight : 'normal' } } > Detailed View < / d i v >
< div style = { { backgroundColor : '#DDDDDD' , color : '#4C4747' , borderRadius : 5 , padding : 4 , fontWeight : 500 , fontSize : 12 , textAlign : 'center' , lineHeight : 'normal' } } > Detailed View < / d i v >
< / d i v >
< / d i v >
}
}
< / d i v >
< / d i v >
< 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 }
@ -473,8 +475,8 @@ const DashboardBOD = () => {
< rect x = "0" y = "23" rx = "5" ry = "5" width = "75%" height = "18" / >
< rect x = "0" y = "23" rx = "5" ry = "5" width = "75%" height = "18" / >
< rect x = "0" y = "47" rx = "5" ry = "5" width = "100%" height = "18" / >
< rect x = "0" y = "47" rx = "5" ry = "5" width = "100%" height = "18" / >
< rect x = "0" y = "70" rx = "5" ry = "5" width = "45%" height = "18" / > * / }
< rect x = "0" y = "70" rx = "5" ry = "5" width = "45%" height = "18" / > * / }
< rect x = "7" y = "12" rx = "5" ry = "5" width = "414" height = "20" / >
< rect x = "7" y = "12" rx = "5" ry = "5" width = "414" height = "20" / >
< rect x = "7" y = "41" rx = "5" ry = "5" width = "220" height = "20" / >
< rect x = "7" y = "41" rx = "5" ry = "5" width = "220" height = "20" / >
< rect x = "7" y = "69" rx = "5" ry = "5" width = "319" height = "20" / >
< rect x = "7" y = "69" rx = "5" ry = "5" width = "319" height = "20" / >
< / C o n t e n t L o a d e r >
< / C o n t e n t L o a d e r >
}
}
@ -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 }
@ -709,8 +711,8 @@ const DashboardBOD = () => {
< rect x = "0" y = "23" rx = "5" ry = "5" width = "75%" height = "18" / >
< rect x = "0" y = "23" rx = "5" ry = "5" width = "75%" height = "18" / >
< rect x = "0" y = "47" rx = "5" ry = "5" width = "100%" height = "18" / >
< rect x = "0" y = "47" rx = "5" ry = "5" width = "100%" height = "18" / >
< rect x = "0" y = "70" rx = "5" ry = "5" width = "45%" height = "18" / > * / }
< rect x = "0" y = "70" rx = "5" ry = "5" width = "45%" height = "18" / > * / }
< rect x = "7" y = "12" rx = "5" ry = "5" width = "414" height = "20" / >
< rect x = "7" y = "12" rx = "5" ry = "5" width = "414" height = "20" / >
< rect x = "7" y = "41" rx = "5" ry = "5" width = "220" height = "20" / >
< rect x = "7" y = "41" rx = "5" ry = "5" width = "220" height = "20" / >
< rect x = "7" y = "69" rx = "5" ry = "5" width = "319" height = "20" / >
< rect x = "7" y = "69" rx = "5" ry = "5" width = "319" height = "20" / >
< / C o n t e n t L o a d e r >
< / C o n t e n t L o a d e r >
}
}
@ -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 :