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
cdd1bb19
Commit
cdd1bb19
authored
Nov 17, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-' into 'master'
subholding ratio See merge request
!667
parents
90e724d9
60f801f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
365 additions
and
98 deletions
+365
-98
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+365
-98
No files found.
src/container/Laporan/TableSubHolding.js
View file @
cdd1bb19
...
...
@@ -484,6 +484,21 @@ export default class TableSubHolding extends Component {
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);
}
}
let
hasil
=
Number
(
value
)
/
total
// console.log(hasil, value, total);
return
Number
(
hasil
).
toFixed
(
2
)
}
const
columnDBBS
=
[{
name
:
""
,
options
:
{
...
...
@@ -3026,7 +3041,25 @@ export default class TableSubHolding extends Component {
<
div
className
=
"grid grid-3x content-center"
>
<
div
className
=
"grid grid-4x content-center"
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3049,7 +3082,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3072,7 +3123,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3095,7 +3164,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3120,7 +3207,25 @@ export default class TableSubHolding extends Component {
<
/div
>
<
div
className
=
"grid grid-4x content-center"
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3143,7 +3248,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3166,7 +3289,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3189,7 +3330,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3214,7 +3373,25 @@ export default class TableSubHolding extends Component {
<
/div
>
<
div
className
=
"grid grid-4x content-center"
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3237,7 +3414,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3260,7 +3455,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3283,7 +3496,25 @@ export default class TableSubHolding extends Component {
}
<
/div
>
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3381,7 +3612,25 @@ export default class TableSubHolding extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
...
...
@@ -3426,7 +3675,25 @@ export default class TableSubHolding extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
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
:
tableMeta
.
rowData
[
0
]
===
1
?
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