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
adcce4ba
Commit
adcce4ba
authored
Nov 17, 2020
by
r.kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
4ae4888d
9f1c7dae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
366 additions
and
98 deletions
+366
-98
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+366
-98
No files found.
src/container/Laporan/TableSubHolding.js
View file @
adcce4ba
...
@@ -484,6 +484,22 @@ export default class TableSubHolding extends Component {
...
@@ -484,6 +484,22 @@ export default class TableSubHolding extends Component {
return
total
return
total
}
}
const
handleFormulaRatio
=
(
value
,
tableMeta
,
month
)
=>
{
let
total
=
0
if
(
month
>
12
)
{
total
=
Number
(
dataTable2
[
35
][
7
+
month
])
}
else
{
for
(
let
index
=
0
;
index
<
month
;
index
++
)
{
total
+=
Number
(
dataTable2
[
35
][
8
+
index
])
// console.log(index);
}
total
=
total
/
month
}
let
hasil
=
Number
(
value
)
/
total
// console.log(hasil, value, total);
return
Number
(
hasil
).
toFixed
(
2
)
}
const
columnDBBS
=
[{
const
columnDBBS
=
[{
name
:
""
,
name
:
""
,
options
:
{
options
:
{
...
@@ -3026,7 +3042,25 @@ export default class TableSubHolding extends Component {
...
@@ -3026,7 +3042,25 @@ export default class TableSubHolding extends Component {
<
div
className
=
"grid grid-3x content-center"
>
<
div
className
=
"grid grid-3x content-center"
>
<
div
className
=
"grid grid-4x content-center"
>
<
div
className
=
"grid grid-4x content-center"
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
8
],
tableMeta
,
1
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3049,7 +3083,25 @@ export default class TableSubHolding extends Component {
...
@@ -3049,7 +3083,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-2"
>
<
div
className
=
"col-2"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
9
],
tableMeta
,
2
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3072,7 +3124,25 @@ export default class TableSubHolding extends Component {
...
@@ -3072,7 +3124,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-3"
>
<
div
className
=
"col-3"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
10
],
tableMeta
,
3
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3095,7 +3165,25 @@ export default class TableSubHolding extends Component {
...
@@ -3095,7 +3165,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-4"
>
<
div
className
=
"col-4"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
11
],
tableMeta
,
4
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3120,7 +3208,25 @@ export default class TableSubHolding extends Component {
...
@@ -3120,7 +3208,25 @@ export default class TableSubHolding extends Component {
<
/div
>
<
/div
>
<
div
className
=
"grid grid-4x content-center"
>
<
div
className
=
"grid grid-4x content-center"
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
12
],
tableMeta
,
5
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3143,7 +3249,25 @@ export default class TableSubHolding extends Component {
...
@@ -3143,7 +3249,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-2"
>
<
div
className
=
"col-2"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
13
],
tableMeta
,
6
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3166,7 +3290,25 @@ export default class TableSubHolding extends Component {
...
@@ -3166,7 +3290,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-3"
>
<
div
className
=
"col-3"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
14
],
tableMeta
,
7
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3189,7 +3331,25 @@ export default class TableSubHolding extends Component {
...
@@ -3189,7 +3331,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-4"
>
<
div
className
=
"col-4"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
15
],
tableMeta
,
8
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3214,7 +3374,25 @@ export default class TableSubHolding extends Component {
...
@@ -3214,7 +3374,25 @@ export default class TableSubHolding extends Component {
<
/div
>
<
/div
>
<
div
className
=
"grid grid-4x content-center"
>
<
div
className
=
"grid grid-4x content-center"
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
16
],
tableMeta
,
9
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3237,7 +3415,25 @@ export default class TableSubHolding extends Component {
...
@@ -3237,7 +3415,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-2"
>
<
div
className
=
"col-2"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
17
],
tableMeta
,
10
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3260,7 +3456,25 @@ export default class TableSubHolding extends Component {
...
@@ -3260,7 +3456,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-3"
>
<
div
className
=
"col-3"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
18
],
tableMeta
,
11
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3283,7 +3497,25 @@ export default class TableSubHolding extends Component {
...
@@ -3283,7 +3497,25 @@ export default class TableSubHolding extends Component {
}
}
<
/div
>
<
/div
>
<
div
className
=
"col-4"
>
<
div
className
=
"col-4"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
19
],
tableMeta
,
12
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3381,7 +3613,25 @@ export default class TableSubHolding extends Component {
...
@@ -3381,7 +3613,25 @@ export default class TableSubHolding extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
20
],
tableMeta
,
13
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
@@ -3426,7 +3676,25 @@ export default class TableSubHolding extends Component {
...
@@ -3426,7 +3676,25 @@ export default class TableSubHolding extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
5
]
===
"Return on Invested Capital - YTD (ROIC)"
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
21
],
tableMeta
,
14
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
tableMeta
.
rowData
[
0
]
===
1
?
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
...
...
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