Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
0ef35edc
Commit
0ef35edc
authored
Jun 15, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
a2692ed4
f41f2e9d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
689 additions
and
8 deletions
+689
-8
Home.js
src/container/Home.js
+12
-0
SubHolding.js
src/container/Laporan/SubHolding.js
+6
-6
ProgressReport.js
src/container/Progress/ProgressReport.js
+309
-0
TableProgressReport.js
src/container/Progress/TableProgressReport.js
+355
-0
CorporateAnnualTargetRO.js
src/container/RollingOutlook/CorporateAnnualTargetRO.js
+2
-2
homeRoutes.js
src/router/homeRoutes.js
+5
-0
No files found.
src/container/Home.js
View file @
0ef35edc
...
...
@@ -11,6 +11,7 @@ import IconButton from '@material-ui/core/IconButton';
import
MenuIcon
from
'@material-ui/icons/Menu'
;
import
ExpandMore
from
'@material-ui/icons/ExpandMore'
import
ExpandLess
from
'@material-ui/icons/ExpandLess'
import
ReportIcon
from
'@material-ui/icons/PriorityHigh'
import
ChevronLeftIcon
from
'@material-ui/icons/ChevronLeft'
;
import
ListItem
from
'@material-ui/core/ListItem'
;
import
ListItemIcon
from
'@material-ui/core/ListItemIcon'
;
...
...
@@ -566,6 +567,17 @@ export default function MiniDrawer() {
}
<
/div
>
))}
{
/* <Link to={`${url}/progress-reports`}>
<div style={{ paddingLeft: 5 }} className={selectedIndex === 'progress-reports' ? "active" : ""}>
<a data-tip={'progress-reports'} data-for={'progress-reports'}>
<ListItem button key={'progress-reports'} onClick={() => selectIndex('progress-reports')}>
<ListItemIcon style={{ minWidth: open ? 40 : 56}}><ReportIcon style={{marginLeft: -5}}/></ListItemIcon>
<Typography style={{ fontFamily: 'Nunito Sans, sans-serif', color: '#525355', fontSize: 14 }}>{'Progress Report'}</Typography>
</ListItem>
</a>
{!open && (<ReactTooltip border={true} id={'Progress Report'} place="bottom" type="light" effect="solid" />)}
</div>
</Link> */
}
<
/List
>
{
open
&&
setting
.
length
>
0
&&
<
div
style
=
{{
marginLeft
:
20
}}
>
...
...
src/container/Laporan/SubHolding.js
View file @
0ef35edc
...
...
@@ -1974,7 +1974,7 @@ export default class SubHolding extends Component {
}
let
quarter_actual
=
item
.
cash_flow
.
quarter_actual
==
''
?
0
:
Number
(
item
.
cash_flow
.
quarter_actual
)
let
quarter
=
item
.
cash_flow
.
quarter
==
''
?
0
:
Number
(
item
.
cash_flow
.
quarter
)
let
quarter
=
item
.
cash_flow
.
quarter
_mb
==
''
?
0
:
Number
(
item
.
cash_flow
.
quarter_mb
)
// let persenQuarter = Number(quarter_actual / quarter)
let
persenQuarter
=
0
if
(
quarter
<
0
)
{
...
...
@@ -2015,8 +2015,8 @@ export default class SubHolding extends Component {
// isNaN(persenYtd)? 0 : persenYtd * 100,
item
.
cash_flow
.
ytd_last_year
,
item
.
cash_flow
.
quarter_actual
,
item
.
cash_flow
.
quarter
,
isNaN
(
persenQuarter
)
||
persenQuarter
==
'Infinity'
||
persenQuarter
==
'-Infinity'
?
(
item
.
cash_flow
.
quarter
==
''
||
item
.
cash_flow
.
quarter
==
0
?
-
0
:
0
)
:
(
item
.
cash_flow
.
quarter
==
''
||
item
.
cash_flow
.
quarter
==
0
?
persenQuarter
*
-
100
:
persenQuarter
*
100
),
item
.
cash_flow
.
quarter
_mb
,
isNaN
(
persenQuarter
)
||
persenQuarter
==
'Infinity'
||
persenQuarter
==
'-Infinity'
?
(
item
.
cash_flow
.
quarter
_mb
==
''
||
item
.
cash_flow
.
quarter_mb
==
0
?
-
0
:
0
)
:
(
item
.
cash_flow
.
quarter_mb
==
''
||
item
.
cash_flow
.
quarter_mb
==
0
?
persenQuarter
*
-
100
:
persenQuarter
*
100
),
// isNaN(persenQuarter)? 0 : persenQuarter * 100,
item
.
cash_flow
.
quarter_last_year
,
item
.
cash_flow
.
fy_actual
,
...
...
@@ -2067,7 +2067,7 @@ export default class SubHolding extends Component {
}
let
quarter_actual
=
item
.
cash_flow
.
quarter_actual
==
''
?
0
:
Number
(
item
.
cash_flow
.
quarter_actual
)
let
quarter
=
item
.
cash_flow
.
quarter
==
''
?
0
:
Number
(
item
.
cash_flow
.
quarter
)
let
quarter
=
item
.
cash_flow
.
quarter
_mb
==
''
?
0
:
Number
(
item
.
cash_flow
.
quarter_mb
)
// let persenQuarter = Number(quarter_actual / quarter)
let
persenQuarter
=
0
if
(
quarter
<
0
)
{
...
...
@@ -2108,8 +2108,8 @@ export default class SubHolding extends Component {
// isNaN(persenYtd)? 0 : persenYtd * 100,
item
.
cash_flow
.
ytd_last_year
,
item
.
cash_flow
.
quarter_actual
,
item
.
cash_flow
.
quarter
,
isNaN
(
persenQuarter
)
||
persenQuarter
==
'Infinity'
||
persenQuarter
==
'-Infinity'
?
(
item
.
cash_flow
.
quarter
==
''
||
item
.
cash_flow
.
quarter
==
0
?
-
0
:
0
)
:
(
item
.
cash_flow
.
quarter
==
''
||
item
.
cash_flow
.
quarter
==
0
?
persenQuarter
*
-
100
:
persenQuarter
*
100
),
item
.
cash_flow
.
quarter
_mb
,
isNaN
(
persenQuarter
)
||
persenQuarter
==
'Infinity'
||
persenQuarter
==
'-Infinity'
?
(
item
.
cash_flow
.
quarter
_mb
==
''
||
item
.
cash_flow
.
quarter_mb
==
0
?
-
0
:
0
)
:
(
item
.
cash_flow
.
quarter_mb
==
''
||
item
.
cash_flow
.
quarter_mb
==
0
?
persenQuarter
*
-
100
:
persenQuarter
*
100
),
// isNaN(persenQuarter)? 0 : persenQuarter * 100,
item
.
cash_flow
.
quarter_last_year
,
item
.
cash_flow
.
fy_actual
,
...
...
src/container/Progress/ProgressReport.js
0 → 100644
View file @
0ef35edc
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
MuiThemeProvider
,
createMuiTheme
,
Paper
,
TextField
}
from
'@material-ui/core'
;
import
MUIDataTable
from
"mui-datatables"
;
import
Images
from
'../../assets/Images'
;
import
DonutChart
from
'react-d3-donut'
;
import
Constant
from
'../../library/Constant'
;
import
api
from
'../../api'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
PropagateLoader
}
from
'react-spinners'
;
import
{
titleCase
}
from
'../../library/Utils'
;
import
{
format
}
from
'date-fns'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
import
ReactSpeedometer
from
'react-d3-speedometer'
;
import
TableProgressReport
from
'./TableProgressReport'
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
class
ReportProgress
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
listApproval
:
null
,
listCategory
:
{
options
:
[{
name
:
'Report Status'
,
value
:
'report-status'
},
{
name
:
'Approval Progress'
,
value
:
'approval-progress'
}],
getOptionLabel
:
(
option
)
=>
option
.
name
,
},
listReportType
:
null
,
listQuarter
:
{
options
:
[{
name
:
'Q1'
,
value
:
'q1'
},
{
name
:
'Q2'
,
value
:
'q2'
},
{
name
:
'Q3'
,
value
:
'q3'
}],
getOptionLabel
:
(
option
)
=>
option
.
name
,
},
listMonth
:
null
,
listPeriodeMB
:
null
,
quarter
:
{
name
:
'Q1'
,
value
:
'q1'
},
category
:
{
name
:
'Report Status'
,
value
:
'report-status'
},
month
:
null
,
periodeMB
:
null
,
reportType
:
null
,
}
}
componentDidMount
()
{
this
.
getMonth
()
this
.
getReportType
()
}
getReportType
()
{
let
arrayReportType
=
[
{
name
:
'Master Budget'
,
value
:
0
},{
name
:
'Monthly Report'
,
value
:
1
},{
name
:
'Operating Indicator'
,
value
:
2
},{
name
:
'Rolling Outlook'
,
value
:
3
},
]
let
arrayReportTypeFinal
=
this
.
state
.
category
.
value
.
includes
(
'status'
)?
arrayReportType
:
arrayReportType
.
filter
((
val
)
=>
val
.
value
!=
2
)
let
defaultProps
=
{
options
:
arrayReportTypeFinal
,
getOptionLabel
:
(
option
)
=>
option
.
name
,
};
this
.
setState
({
listReportType
:
defaultProps
,
reportType
:
arrayReportTypeFinal
[
0
]},
()
=>
{
console
.
log
(
this
.
state
.
listReportType
)
})
}
getMonth
()
{
this
.
setState
({
loading
:
true
})
api
.
create
().
getMonthTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
()
dateNow
.
setMonth
(
dateNow
.
getMonth
()
-
1
);
let
month
=
format
(
dateNow
,
'MMMM'
)
// console.log(month);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
// console.log(response);
let
data
=
response
.
data
.
data
let
monthData
=
data
.
map
((
item
)
=>
{
return
{
month_id
:
item
.
id
,
month_value
:
String
(
item
.
month_name
).
substr
(
0
,
3
)
}
})
let
defaultProps
=
{
options
:
monthData
,
getOptionLabel
:
(
option
)
=>
option
.
month_value
,
};
let
index
=
data
.
findIndex
((
val
)
=>
val
.
month_name
==
month
)
// console.log(month)
// console.log(index)
this
.
setState
({
listMonth
:
defaultProps
,
month
:
index
==
-
1
?
monthData
[
0
]
:
monthData
[
index
]
},
()
=>
{
// if (this.state.isApprover === true) {
// if (this.state.submittedOnly) {
// console.log('masuk cuk')
// this.getPeriode()
// } else {
// this.getLastPeriod()
// }
this
.
getPeriode
()
// } else {
// this.getLastPeriod()
// this.getPeriode()
// }
})
}
else
{
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
// if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
}
}
else
{
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
}
})
}
getPeriode
()
{
let
currentYear
=
new
Date
().
getFullYear
()
let
MB
=
[]
for
(
var
i
=
2000
;
i
<=
currentYear
;
i
++
)
{
MB
.
push
({
name
:
String
(
i
),
value
:
i
})
if
(
i
==
currentYear
)
{
MB
.
push
({
name
:
String
(
i
+
1
),
value
:
i
+
1
})
}
}
let
defaultPropsMB
=
{
options
:
MB
,
getOptionLabel
:
(
option
)
=>
option
.
name
,
};
this
.
setState
({
listPeriodeMB
:
defaultPropsMB
,
periodeMB
:
MB
[
MB
.
length
-
1
],
loading
:
false
},
()
=>
{
console
.
log
(
this
.
state
.
listMonth
)
console
.
log
(
this
.
state
.
listPeriodeMB
)
})
}
render
()
{
const
dataTable
=
[
[
'Tax Planning'
,
'2'
,
'ABA: Anugerah Buminusantara Abadi'
,
'2021-05-03'
],
[
'CAT'
,
'1'
,
'ABA: Anugerah Buminusantara Abadi'
,
'2021-05-03'
],
[
'Profit Loss'
,
'0'
,
'ABA: Anugerah Buminusantara Abadi'
,
'2021-05-03'
]
]
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'fixed'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
// css={override}
size
=
{
20
}
color
=
{
"#274B80"
}
loading
=
{
this
.
state
.
loading
}
/
>
<
/div
>
);
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
,
minHeight
:
this
.
props
.
height
}}
>
<
div
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Report
Status
&
Approval
Progress
Monitoring
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
50
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Report
Status
&
Approval
Progress
<
/Typography
>
<
/div
>
<
div
style
=
{{
minWidth
:
'max-content'
,
padding
:
'20px 20px 0px 20px'
}}
>
<
div
style
=
{{
marginTop
:
15
,
display
:
'flex'
}}
>
<
Autocomplete
{...
this
.
state
.
listCategory
}
id
=
"category"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
category
:
newInputValue
,
loading
:
true
},
()
=>
{
// this.getListUserSubcoRO()
this
.
getReportType
()
this
.
setState
({
loading
:
false
})
})}
disableClearable
style
=
{{
minWidth
:
210
,
marginRight
:
20
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Category"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
category
}
/
>
<
Autocomplete
{...
this
.
state
.
listReportType
}
id
=
"report-type"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
,
loading
:
true
},
()
=>
{
// this.getListUserSubcoRO()
this
.
setState
({
loading
:
false
})
})}
disableClearable
style
=
{{
minWidth
:
210
,
marginRight
:
20
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Report Type"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
reportType
}
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
minWidth
:
'max-content'
,
padding
:
'20px 20px 0px 20px'
}}
>
<
div
style
=
{{
marginTop
:
15
,
display
:
'flex'
}}
>
<
Autocomplete
{...
this
.
state
.
listPeriodeMB
}
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periodeMB
:
newInputValue
,
loading
:
true
},
()
=>
{
// this.getListUserSubcoRO()
this
.
setState
({
loading
:
false
})
})}
disableClearable
style
=
{{
minWidth
:
210
,
marginRight
:
20
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Periode"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
periodeMB
}
/
>
{
this
.
state
.
reportType
!=
null
&&
this
.
state
.
reportType
.
value
==
1
&&
<
Autocomplete
{...
this
.
state
.
listMonth
}
id
=
"month"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
month
:
newInputValue
,
loading
:
true
},
()
=>
{
// this.getListUserSubcoRO()
this
.
setState
({
loading
:
false
})
})}
disableClearable
style
=
{{
minWidth
:
210
,
marginRight
:
20
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Month"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
month
}
/>
}
{
this
.
state
.
reportType
!=
null
&&
this
.
state
.
reportType
.
value
==
3
&&
<
Autocomplete
{...
this
.
state
.
listQuarter
}
id
=
"quarter"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
quarter
:
newInputValue
,
loading
:
true
},
()
=>
{
// this.getListUserSubcoRO()
this
.
setState
({
loading
:
false
})
})}
disableClearable
style
=
{{
minWidth
:
210
,
marginRight
:
20
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Quarter"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
quarter
}
/>
}
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
marginBottom
:
20
}}
>
{
/* <div style={{ display: 'flex', justifyContent: 'space-between', padding: '0px 20px 10px 20px' }}>
<div></div>
{this.state.previewDownload && (
<div style={{ width: '50%', justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5,
outline: 'none'
}}
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div>
)}
</div> */
}
{
this
.
state
.
loading
&&
loadingComponent
}
{
/* {this.state.previewTable && ( */
}
<
TableProgressReport
width
=
{
this
.
props
.
width
}
height
=
{
this
.
props
.
height
}
open
=
{
this
.
props
.
open
}
// month={this.state.month.month_value}
type
=
{
this
.
state
.
report
?
this
.
state
.
report
.
value
:
1
}
dataTable
=
{
dataTable
}
// dataTable={this.state.dataTable}
periode
=
{
this
.
state
.
periode
?
this
.
state
.
periode
.
periode
:
null
}
quarter
=
{
this
.
state
.
quarter
.
name
}
company
=
{
this
.
state
.
company
}
/
>
{
/* )} */
}
<
/div
>
<
/Paper
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
export
default
ReportProgress
;
src/container/Progress/TableProgressReport.js
0 → 100644
View file @
0ef35edc
import
{
createMuiTheme
,
FormControlLabel
,
Input
,
MuiThemeProvider
,
TableCell
,
Typography
}
from
'@material-ui/core'
import
MUIDataTable
from
'mui-datatables'
;
import
React
,
{
Component
}
from
'react'
import
NumberFormat
from
'react-number-format'
;
import
*
as
R
from
'ramda'
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
const
options
=
ct
.
customOptionsFixedColumn
();
const
style
=
{
position
:
"sticky"
,
left
:
0
,
zIndex
:
101
,
background
:
"white"
,
};
const
style2
=
{
position
:
"sticky"
,
background
:
"white"
,
zIndex
:
100
};
export
default
class
TableProgressReport
extends
Component
{
render
()
{
let
dataTable2
=
this
.
props
.
dataTable2
console
.
log
(
this
.
props
);
const
columnMB
=
[
{
name
:
"Report Type"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
key
=
{
columnMeta
.
index
}
style
=
{{
...
style
,
top
:
0
,
zIndex
:
103
,
backgroundColor
:
'#1c71b8'
,
width
:
300
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'left'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style
}),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
300
}}
>
{
// tableMeta.rowData[4] == 0 ?
// <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
val
}
<
/div
>
)
}
}
},
{
name
:
"Revision"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
borderRight
:
'1px solid #fff'
,
borderLeft
:
'1px solid #fff'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
value
}
<
/div
>
)
}
}
},
{
name
:
"Company"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
borderRight
:
'1px solid #fff'
,
borderLeft
:
'1px solid #fff'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
width
:
90
,
textAlign
:
'center'
}}
>
{
value
}
<
/div
>
)
}
}
},
{
name
:
"Last Update"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
96
,
borderLeft
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
60
}}
>
{
val
}
<
/div
>
)
}
}
}]
const
columnMBStatus
=
[
{
name
:
"Company"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
key
=
{
columnMeta
.
index
}
style
=
{{
...
style
,
top
:
0
,
zIndex
:
103
,
backgroundColor
:
'#1c71b8'
,
width
:
300
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'left'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style
}),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
300
}}
>
{
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
span
style
=
{{
fontSize
:
12
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/div
>
}
<
/div
>
)
}
}
},
{
name
:
"Periode"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
borderRight
:
'1px solid #fff'
,
borderLeft
:
'1px solid #fff'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"black"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
suffix
=
{
"%"
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
true
}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
decimalScale
=
{
1
}
/
>
}
/
>
}
<
/div
>
)
}
}
},
{
name
:
"Current Status"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
borderRight
:
'1px solid #fff'
,
borderLeft
:
'1px solid #fff'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
width
:
90
,
textAlign
:
'center'
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
div
>
<
span
style
=
{{
fontSize
:
12
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
value
}
<
/span
>
<
/div
>
}
<
/div
>
)
}
}
},
{
name
:
"Revision"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
96
,
borderLeft
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
60
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
val
}
<
/div
>
)
}
}
},
{
name
:
"Approver"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
60
,
borderLeft
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
60
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
val
}
<
/div
>
)
}
}
},
{
name
:
"Approver 2"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
60
,
borderLeft
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
60
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
val
}
<
/div
>
)
}
}
},
{
name
:
"Approver 3"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
60
,
borderLeft
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
60
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
val
}
<
/div
>
)
}
}
},
{
name
:
"Approver 4"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
60
,
borderLeft
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
60
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
val
}
<
/div
>
)
}
}
},
{
name
:
"Approver 5"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
60
,
borderLeft
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
60
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
val
}
<
/div
>
)
}
}
},
{
name
:
"Approver 6"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
60
,
borderLeft
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
60
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
val
}
<
/div
>
)
}
}
},{
name
:
""
,
options
:
{
display
:
false
}
}]
const
columns
=
[]
return
(
<
div
>
<
div
style
=
{{
padding
:
'0px 20px 20px 20px'
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
350
:
100
)
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
columns
=
{
this
.
props
.
type
===
0
?
columnMBStatus
:
this
.
props
.
type
===
1
?
columnMB
:
columns
}
// columns={this.props.type === 1 ? columnMB : this.props.type === 2 ? columnMR : this.props.type === 3 ? columnOI : this.props.type === 4 ? columnRO : columns}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
)
}
}
src/container/RollingOutlook/CorporateAnnualTargetRO.js
View file @
0ef35edc
...
...
@@ -189,8 +189,8 @@ export default class CorporateAnnualTargetRO extends Component {
item
.
formula
,
item
.
level
,
item
.
description
,
// item.weight == '' ? Number(0
).toFixed(1) : Number(Number(item.weight) * 100).toFixed(1),
item
.
corporate_annual_target
.
weight
==
""
?
Number
(
0
).
toFixed
(
1
)
:
Number
(
Number
(
weight
*
100
)).
toFixed
(
1
),
item
.
weight
==
''
?
Number
(
weight
).
toFixed
(
1
)
:
Number
(
Number
(
item
.
weight
)
*
100
).
toFixed
(
1
),
//
item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(Number(weight * 100)).toFixed(1),
item
.
corporate_annual_target
.
uom
,
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
...
...
src/router/homeRoutes.js
View file @
0ef35edc
...
...
@@ -20,6 +20,7 @@ import OutlookPA from '../container/OutlookPA';
import
SubHolding
from
'../container/Laporan/SubHolding'
;
import
SummaryTriputra
from
'../container/SummaryTriputra/SummaryOfTriputra'
;
import
MasterDataCAT
from
'../container/MasterData/MasterDataCAT/MasterDataCAT'
import
ProgressReport
from
'../container/Progress/ProgressReport'
const
routes
=
[
{
...
...
@@ -106,6 +107,10 @@ const routes = [
path
:
"/home/dashboard-financial"
,
main
:
DashboardFinancial
},
{
path
:
"/home/progress-reports"
,
main
:
ProgressReport
},
{
path
:
"*"
,
main
:
screen404
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment