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
b79730be
Commit
b79730be
authored
Jan 25, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into didam
parents
309ed182
76876868
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1041 additions
and
91 deletions
+1041
-91
CatPQ.js
src/container/Laporan/CatPQ.js
+870
-0
SubHolding.js
src/container/Laporan/SubHolding.js
+26
-42
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+145
-49
No files found.
src/container/Laporan/CatPQ.js
0 → 100644
View file @
b79730be
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
,
Tooltip
,
withStyles
,
Snackbar
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
NumberFormat
from
'react-number-format'
;
import
api
from
'../../api'
;
import
AddIcon
from
'@material-ui/icons/Add'
;
import
{
values
}
from
'ramda'
;
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
import
UploadFile
from
"../../library/Upload"
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
{
Alert
}
from
'@material-ui/lab'
;
import
*
as
R
from
'ramda'
;
const
LightTooltip
=
withStyles
((
theme
)
=>
({
tooltip
:
{
backgroundColor
:
theme
.
palette
.
common
.
white
,
color
:
'rgba(0, 0, 0, 0.87)'
,
boxShadow
:
theme
.
shadows
[
1
],
fontSize
:
11
,
},
}))(
Tooltip
);
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
,
top
:
0
};
export
default
class
SummaryFR
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
dataTable
:
[],
loading
:
false
,
}
}
componentDidMount
()
{
// this.getItemHierarki()
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
const
columnCatPQ
=
[
{
name
:
"Key Performance Indicator"
,
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
:
"Weight"
,
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
:
"UOM"
,
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
:
`
${
Number
(
this
.
props
.
periode
)
-
1
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
color
:
'#fff'
,
backgroundColor
:
'#07a7d0'
,
top
:
0
,
zIndex
:
102
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-1x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1 grid grid-3x"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Actual Q2"
}
<
/span
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"% Growth YoY"
}
<
/span
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Actual Full Year Performance"
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/th
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
>
<
div
className
=
"grid grid-3x content-center"
>
<
div
className
=
"col-1"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-2"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
2
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-3"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
/div
>
<
/div
>
)
}
}
},{
name
:
`
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
color
:
'#fff'
,
backgroundColor
:
'#07a7d0'
,
top
:
0
,
zIndex
:
102
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1 grid grid-5x"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Plan Q2 (Apr-Jun)"
}
<
/span
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Actual Q2 (Apr-Jun)"
}
<
/span
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"% Ach"
}
<
/span
>
<
/div
>
<
div
className
=
"column-4"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Score"
}
<
/span
>
<
/div
>
<
div
className
=
"column-5"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Score x Weight"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-2 grid grid-5x"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Plan YTD"
}
<
/span
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Actual YTD"
}
<
/span
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"% Ach"
}
<
/span
>
<
/div
>
<
div
className
=
"column-4"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Score"
}
<
/span
>
<
/div
>
<
div
className
=
"column-5"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Score x Weight"
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/th
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
>
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"grid grid-5x content-center"
>
<
div
className
=
"col-1"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-2"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
2
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-3"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-4"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-5"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
/div
>
<
div
className
=
"grid grid-5x content-center"
>
<
div
className
=
"col-1"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-2"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
2
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-3"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-4"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
div
className
=
"col-5"
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)
}
}
},
{
name
:
`Master Budget
${
this
.
props
.
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
=
{{
width
:
90
,
textAlign
:
'center'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
14
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
)
}
}
},
{
name
:
`OL
${
this
.
props
.
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
=
{{
width
:
90
,
textAlign
:
'center'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
15
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
)
}
}
},
{
name
:
`% Var`
,
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
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
)
}
}
},
]
let
datas
=
[
[
"ABCD"
,
"%"
,
"Rp Bio"
,
{
a
:
"0"
,
b
:
"0"
,
c
:
"0"
,
d
:
"0"
},
{
a
:
"2"
,
b
:
"3"
,
c
:
"4"
,
d
:
"5"
},
{
a
:
"2"
,
b
:
"3"
,
c
:
"4"
,
d
:
"5"
},
{
a
:
"2"
,
b
:
"3"
,
c
:
"4"
,
d
:
"5"
},
{
a
:
"2"
,
b
:
"3"
,
c
:
"4"
,
d
:
"5"
},
{
a
:
"2"
,
b
:
"3"
,
c
:
"4"
,
d
:
"5"
}],
// ["Total Assets", "unit try", { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }]
]
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'absolute'
,
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
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Sub
Holding
Report
<
/Typography
>
<
/div
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
{
/* {this.state.loading && loadingComponent} */
}
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
/* {this.state.visibleTP === true ? */
}
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Sub
Holding
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
CAT
Performance
Quarterly
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
2021
-
Q1
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
this
.
state
.
dataTable
.
length
==
0
?
null
:
this
.
props
.
isApprover
==
true
?
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
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
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
{((
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'
))
&&
(
<
div
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
downloadTemplate
()}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
)}
{((
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'
))
&&
(
<
div
>
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
>
<
img
src
=
{
Images
.
upload
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
)}
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
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
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
datas
}
columns
=
{
columnCatPQ
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
{
this
.
state
.
updateBy
}
<
/Typography
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
dataTable
.
length
==
0
?
null
:
(
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'
)
?
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
// this.forceUpdate()
this
.
setState
({
loading
:
true
,
buttonDraft
:
false
},
()
=>
{
setTimeout
(()
=>
{
// this.setState({ loading: false, buttonError: false, editable: true })
this
.
handleValidate
()
},
100
);
})
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
className
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
state
.
saveDraft
===
true
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
saveDraft
!==
true
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMasterBudget
(
'submitted'
)
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginRight
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
:
null
}
<
/div
>
<
/Paper
>
<
/div
>
<
/div
>
);
}
}
src/container/Laporan/SubHolding.js
View file @
b79730be
...
...
@@ -658,7 +658,7 @@ export default class SubHolding extends Component {
})
}
else
if
(
this
.
state
.
report
.
value
===
5
)
{
api
.
create
().
getReportTPMB
(
payload
).
then
(
response
=>
{
//
console.log(payload);
console
.
log
(
payload
);
console
.
log
(
response
);
let
dataTable
=
[]
if
(
response
.
data
)
{
...
...
@@ -677,27 +677,19 @@ export default class SubHolding extends Component {
{
tbc
:
item
.
formula_tax
.
value_tbc
,
fcp
:
item
.
formula_tax
.
value_fc
,
tbf
:
item
.
formula_tax
.
value_tbf
},
item
.
level
,
item
.
description
,
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
january
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
january
.
tbc
,
formula
:
item
.
tax_planning
.
january_formula
}
:
item
.
tax_planning
.
january
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
january
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
january
.
fcp
,
formula
:
item
.
tax_planning
.
january_formula
}
:
item
.
tax_planning
.
january
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
january
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
january
.
tbf
,
formula
:
item
.
tax_planning
.
january_formula
}
:
item
.
tax_planning
.
january
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
february
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
february
.
tbc
,
formula
:
item
.
tax_planning
.
february_formula
}
:
item
.
tax_planning
.
february
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
february
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
february
.
fcp
,
formula
:
item
.
tax_planning
.
february_formula
}
:
item
.
tax_planning
.
february
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
february
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
february
.
tbf
,
formula
:
item
.
tax_planning
.
february_formula
}
:
item
.
tax_planning
.
february
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
march
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
march
.
tbc
,
formula
:
item
.
tax_planning
.
march_formula
}
:
item
.
tax_planning
.
march
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
march
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
march
.
fcp
,
formula
:
item
.
tax_planning
.
march_formula
}
:
item
.
tax_planning
.
march
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
march
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
march
.
tbf
,
formula
:
item
.
tax_planning
.
march_formula
}
:
item
.
tax_planning
.
march
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
april
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
april
.
tbc
,
formula
:
item
.
tax_planning
.
april_formula
}
:
item
.
tax_planning
.
april
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
april
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
april
.
fcp
,
formula
:
item
.
tax_planning
.
april_formula
}
:
item
.
tax_planning
.
april
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
april
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
april
.
tbf
,
formula
:
item
.
tax_planning
.
april_formula
}
:
item
.
tax_planning
.
april
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
may
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
may
.
tbc
,
formula
:
item
.
tax_planning
.
may_formula
}
:
item
.
tax_planning
.
may
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
may
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
may
.
fcp
,
formula
:
item
.
tax_planning
.
may_formula
}
:
item
.
tax_planning
.
may
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
may
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
may
.
tbf
,
formula
:
item
.
tax_planning
.
may_formula
}
:
item
.
tax_planning
.
may
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
june
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
june
.
tbc
,
formula
:
item
.
tax_planning
.
june_formula
}
:
item
.
tax_planning
.
june
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
june
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
june
.
fcp
,
formula
:
item
.
tax_planning
.
june_formula
}
:
item
.
tax_planning
.
june
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
june
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
june
.
tbf
,
formula
:
item
.
tax_planning
.
june_formula
}
:
item
.
tax_planning
.
june
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
july
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
july
.
tbc
,
formula
:
item
.
tax_planning
.
july_formula
}
:
item
.
tax_planning
.
july
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
july
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
july
.
fcp
,
formula
:
item
.
tax_planning
.
july_formula
}
:
item
.
tax_planning
.
july
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
july
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
july
.
tbf
,
formula
:
item
.
tax_planning
.
july_formula
}
:
item
.
tax_planning
.
july
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
august
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
august
.
tbc
,
formula
:
item
.
tax_planning
.
august_formula
}
:
item
.
tax_planning
.
august
.
tbc
===
null
?
"0"
:
item
.
tax_planning
.
august
.
tbc
===
""
?
"0"
:
item
.
tax_planning
.
august
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
august
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
august
.
fcp
,
formula
:
item
.
tax_planning
.
august_formula
}
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
august
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
august
.
tbf
,
formula
:
item
.
tax_planning
.
august_formula
}
:
item
.
tax_planning
.
august
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
september
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
september
.
tbc
,
formula
:
item
.
tax_planning
.
september_formula
}
:
item
.
tax_planning
.
september
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
september
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
september
.
fcp
,
formula
:
item
.
tax_planning
.
september_formula
}
:
item
.
tax_planning
.
september
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
september
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
september
.
tbf
,
formula
:
item
.
tax_planning
.
september_formula
}
:
item
.
tax_planning
.
september
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
october
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
october
.
tbc
,
formula
:
item
.
tax_planning
.
october_formula
}
:
item
.
tax_planning
.
october
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
october
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
october
.
fcp
,
formula
:
item
.
tax_planning
.
october_formula
}
:
item
.
tax_planning
.
october
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
october
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
october
.
tbf
,
formula
:
item
.
tax_planning
.
october_formula
}
:
item
.
tax_planning
.
october
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
tbc
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
fcp
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
tbf
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
tbc
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
fcp
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
tbf
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
tbf
},
Number
(
item
.
tax_planning
.
total_current_year
).
toFixed
(
1
),
{
tbc
:
item
.
tax_planning
.
total_next_year
.
tbc
,
fcp
:
item
.
tax_planning
.
total_next_year
.
fcp
,
tbf
:
item
.
tax_planning
.
total_next_year
.
tbf
},
{
tbc
:
item
.
tax_planning
.
total_more_year
.
tbc
,
fcp
:
item
.
tax_planning
.
total_more_year
.
fcp
,
tbf
:
item
.
tax_planning
.
total_more_year
.
tbf
},
item
.
tax_planning
.
january
.
tbf
,
item
.
tax_planning
.
february
.
tbf
,
item
.
tax_planning
.
march
.
tbf
,
item
.
tax_planning
.
april
.
tbf
,
item
.
tax_planning
.
may
.
tbf
,
item
.
tax_planning
.
june
.
tbf
,
item
.
tax_planning
.
july
.
tbf
,
item
.
tax_planning
.
august
.
tbf
,
item
.
tax_planning
.
september
.
tbf
,
item
.
tax_planning
.
october
.
tbf
,
item
.
tax_planning
.
november
.
tbf
,
item
.
tax_planning
.
december
.
tbf
,
item
.
order
,
{
tbc
:
item
.
condition_it_should_be_tax
.
value_tbc
,
fcp
:
item
.
condition_it_should_be_tax
.
value_fc
,
tbf
:
item
.
condition_it_should_be_tax
.
value_tbf
},
{
tbc
:
item
.
condition_if_wrong_tax
.
value_tbc
,
fcp
:
item
.
condition_if_wrong_tax
.
value_fc
,
tbf
:
item
.
condition_if_wrong_tax
.
value_tbf
},
item
.
tax_planning
.
forecast_tbc_formula
,
item
.
tax_planning
.
forecast_fcp_formula
,
item
.
tax_planning
.
forecast_tbf_formula
])
}
if
(
item
.
children
!==
null
)
{
...
...
@@ -719,27 +711,19 @@ export default class SubHolding extends Component {
{
tbc
:
item
.
formula_tax
.
value_tbc
,
fcp
:
item
.
formula_tax
.
value_fc
,
tbf
:
item
.
formula_tax
.
value_tbf
},
item
.
level
,
item
.
description
,
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
january
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
january
.
tbc
,
formula
:
item
.
tax_planning
.
january_formula
}
:
item
.
tax_planning
.
january
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
january
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
january
.
fcp
,
formula
:
item
.
tax_planning
.
january_formula
}
:
item
.
tax_planning
.
january
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
january
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
january
.
tbf
,
formula
:
item
.
tax_planning
.
january_formula
}
:
item
.
tax_planning
.
january
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
february
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
february
.
tbc
,
formula
:
item
.
tax_planning
.
february_formula
}
:
item
.
tax_planning
.
february
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
february
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
february
.
fcp
,
formula
:
item
.
tax_planning
.
february_formula
}
:
item
.
tax_planning
.
february
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
february
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
february
.
tbf
,
formula
:
item
.
tax_planning
.
february_formula
}
:
item
.
tax_planning
.
february
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
march
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
march
.
tbc
,
formula
:
item
.
tax_planning
.
march_formula
}
:
item
.
tax_planning
.
march
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
march
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
march
.
fcp
,
formula
:
item
.
tax_planning
.
march_formula
}
:
item
.
tax_planning
.
march
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
march
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
march
.
tbf
,
formula
:
item
.
tax_planning
.
march_formula
}
:
item
.
tax_planning
.
march
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
april
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
april
.
tbc
,
formula
:
item
.
tax_planning
.
april_formula
}
:
item
.
tax_planning
.
april
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
april
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
april
.
fcp
,
formula
:
item
.
tax_planning
.
april_formula
}
:
item
.
tax_planning
.
april
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
april
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
april
.
tbf
,
formula
:
item
.
tax_planning
.
april_formula
}
:
item
.
tax_planning
.
april
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
may
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
may
.
tbc
,
formula
:
item
.
tax_planning
.
may_formula
}
:
item
.
tax_planning
.
may
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
may
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
may
.
fcp
,
formula
:
item
.
tax_planning
.
may_formula
}
:
item
.
tax_planning
.
may
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
may
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
may
.
tbf
,
formula
:
item
.
tax_planning
.
may_formula
}
:
item
.
tax_planning
.
may
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
june
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
june
.
tbc
,
formula
:
item
.
tax_planning
.
june_formula
}
:
item
.
tax_planning
.
june
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
june
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
june
.
fcp
,
formula
:
item
.
tax_planning
.
june_formula
}
:
item
.
tax_planning
.
june
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
june
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
june
.
tbf
,
formula
:
item
.
tax_planning
.
june_formula
}
:
item
.
tax_planning
.
june
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
july
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
july
.
tbc
,
formula
:
item
.
tax_planning
.
july_formula
}
:
item
.
tax_planning
.
july
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
july
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
july
.
fcp
,
formula
:
item
.
tax_planning
.
july_formula
}
:
item
.
tax_planning
.
july
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
july
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
july
.
tbf
,
formula
:
item
.
tax_planning
.
july_formula
}
:
item
.
tax_planning
.
july
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
august
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
august
.
tbc
,
formula
:
item
.
tax_planning
.
august_formula
}
:
item
.
tax_planning
.
august
.
tbc
===
null
?
"0"
:
item
.
tax_planning
.
august
.
tbc
===
""
?
"0"
:
item
.
tax_planning
.
august
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
august
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
august
.
fcp
,
formula
:
item
.
tax_planning
.
august_formula
}
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
august
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
august
.
tbf
,
formula
:
item
.
tax_planning
.
august_formula
}
:
item
.
tax_planning
.
august
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
september
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
september
.
tbc
,
formula
:
item
.
tax_planning
.
september_formula
}
:
item
.
tax_planning
.
september
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
september
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
september
.
fcp
,
formula
:
item
.
tax_planning
.
september_formula
}
:
item
.
tax_planning
.
september
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
september
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
september
.
tbf
,
formula
:
item
.
tax_planning
.
september_formula
}
:
item
.
tax_planning
.
september
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
october
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
october
.
tbc
,
formula
:
item
.
tax_planning
.
october_formula
}
:
item
.
tax_planning
.
october
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
october
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
october
.
fcp
,
formula
:
item
.
tax_planning
.
october_formula
}
:
item
.
tax_planning
.
october
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
october
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
october
.
tbf
,
formula
:
item
.
tax_planning
.
october_formula
}
:
item
.
tax_planning
.
october
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
tbc
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
fcp
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
tbf
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
tbc
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
fcp
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
tbf
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
tbf
},
Number
(
item
.
tax_planning
.
total_current_year
).
toFixed
(
1
),
{
tbc
:
item
.
tax_planning
.
total_next_year
.
tbc
,
fcp
:
item
.
tax_planning
.
total_next_year
.
fcp
,
tbf
:
item
.
tax_planning
.
total_next_year
.
tbf
},
{
tbc
:
item
.
tax_planning
.
total_more_year
.
tbc
,
fcp
:
item
.
tax_planning
.
total_more_year
.
fcp
,
tbf
:
item
.
tax_planning
.
total_more_year
.
tbf
},
item
.
tax_planning
.
january
.
tbf
,
item
.
tax_planning
.
february
.
tbf
,
item
.
tax_planning
.
march
.
tbf
,
item
.
tax_planning
.
april
.
tbf
,
item
.
tax_planning
.
may
.
tbf
,
item
.
tax_planning
.
june
.
tbf
,
item
.
tax_planning
.
july
.
tbf
,
item
.
tax_planning
.
august
.
tbf
,
item
.
tax_planning
.
september
.
tbf
,
item
.
tax_planning
.
october
.
tbf
,
item
.
tax_planning
.
november
.
tbf
,
item
.
tax_planning
.
december
.
tbf
,
item
.
order
,
{
tbc
:
item
.
condition_it_should_be_tax
.
value_tbc
,
fcp
:
item
.
condition_it_should_be_tax
.
value_fc
,
tbf
:
item
.
condition_it_should_be_tax
.
value_tbf
},
{
tbc
:
item
.
condition_if_wrong_tax
.
value_tbc
,
fcp
:
item
.
condition_if_wrong_tax
.
value_fc
,
tbf
:
item
.
condition_if_wrong_tax
.
value_tbf
},
item
.
tax_planning
.
forecast_tbc_formula
,
item
.
tax_planning
.
forecast_fcp_formula
,
item
.
tax_planning
.
forecast_tbf_formula
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
...
...
@@ -749,7 +733,7 @@ export default class SubHolding extends Component {
}
}
})
this
.
setState
({
dataTable
,
loading
:
false
,
previewDownload
:
true
},
()
=>
{
this
.
setState
({
dataTable
,
loading
:
false
,
preview
Table
:
true
,
preview
Download
:
true
},
()
=>
{
console
.
log
(
this
.
state
.
dataTable
)
// this.getTaxPlanMR(payload)
})
...
...
src/container/Laporan/TableSubHolding.js
View file @
b79730be
...
...
@@ -9437,7 +9437,47 @@ export default class TableSubHolding extends Component {
}
]
const columnDBTP = [
const columnDBTP = [{
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
},
{
name: "Account",
options: {
...
...
@@ -9451,10 +9491,10 @@ export default class TableSubHolding extends Component {
return (
<div style={{ width: 300 }}>
{
tableMeta.rowData[
4
] == 0 ?
tableMeta.rowData[
7
] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
:
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[
4
]) }}>
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[
7
]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
}
...
...
@@ -9521,15 +9561,15 @@ export default class TableSubHolding extends Component {
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
console.log(tableMeta)
//
console.log(tableMeta)
return (
<div>
<div className="grid grid-3x content-center">
<div className="grid grid-4x content-center">
<div className="col-1">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9542,7 +9582,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(1).toFixed(1)}
value={Number(tableMeta.rowData[9]).toFixed(1)}
/>
}
/>
...
...
@@ -9550,9 +9591,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-2">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9565,7 +9606,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
2
).toFixed(1)}
value={Number(
tableMeta.rowData[10]
).toFixed(1)}
/>
}
/>
...
...
@@ -9573,9 +9614,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-3">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9588,7 +9629,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
3
).toFixed(1)}
value={Number(
tableMeta.rowData[11]
).toFixed(1)}
/>
}
/>
...
...
@@ -9596,9 +9637,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-4">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9611,7 +9652,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
4
).toFixed(1)}
value={Number(
tableMeta.rowData[12]
).toFixed(1)}
/>
}
/>
...
...
@@ -9621,9 +9662,9 @@ export default class TableSubHolding extends Component {
</div>
<div className="grid grid-4x content-center">
<div className="col-1">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9636,7 +9677,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
5
).toFixed(1)}
value={Number(
tableMeta.rowData[13]
).toFixed(1)}
/>
}
/>
...
...
@@ -9644,9 +9685,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-2">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9659,7 +9700,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
6
).toFixed(1)}
value={Number(
tableMeta.rowData[14]
).toFixed(1)}
/>
}
/>
...
...
@@ -9667,9 +9708,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-3">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9682,7 +9723,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
7
).toFixed(1)}
value={Number(
tableMeta.rowData[15]
).toFixed(1)}
/>
}
/>
...
...
@@ -9690,9 +9731,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-4">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9705,7 +9746,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
8
).toFixed(1)}
value={Number(
tableMeta.rowData[16]
).toFixed(1)}
/>
}
/>
...
...
@@ -9715,9 +9756,9 @@ export default class TableSubHolding extends Component {
</div>
<div className="grid grid-4x content-center">
<div className="col-1">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9730,7 +9771,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
9
).toFixed(1)}
value={Number(
tableMeta.rowData[17]
).toFixed(1)}
/>
}
/>
...
...
@@ -9738,9 +9779,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-2">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9753,7 +9794,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
10
).toFixed(1)}
value={Number(
tableMeta.rowData[18]
).toFixed(1)}
/>
}
/>
...
...
@@ -9761,9 +9802,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-3">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9776,7 +9817,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
11
).toFixed(1)}
value={Number(
tableMeta.rowData[19]
).toFixed(1)}
/>
}
/>
...
...
@@ -9784,9 +9825,9 @@ export default class TableSubHolding extends Component {
}
</div>
<div className="col-4">
{tableMeta.rowData[
0
] === 4 ?
{tableMeta.rowData[
3
] === 4 ?
null
: tableMeta.rowData[
0
] === 1 ?
: tableMeta.rowData[
3
] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
...
...
@@ -9799,7 +9840,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
12
).toFixed(1)}
value={Number(
tableMeta.rowData[20]
).toFixed(1)}
/>
}
/>
...
...
@@ -9813,6 +9854,61 @@ export default class TableSubHolding extends Component {
}
}
}, {
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: `ACTUAL ${this.props.periode}`,
options: {
customHeadRender: (columnMeta) => (
...
...
@@ -9874,7 +9970,7 @@ export default class TableSubHolding extends Component {
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
console.log(tableMeta)
//
console.log(tableMeta)
return (
<div>
<div className="grid grid-3x content-center">
...
...
@@ -15456,10 +15552,10 @@ export default class TableSubHolding extends Component {
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual"}</span>
</div>
<div className="column-2" style={{
placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0
' }}>
<div className="column-2" style={{
color: '#000', placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)
' }}>
<span>{"MB"}</span>
</div>
<div className="column-3" style={{
placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0
' }}>
<div className="column-3" style={{
color: '#000', placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)
' }}>
<span>{"% of MB"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
...
...
@@ -15577,17 +15673,17 @@ export default class TableSubHolding extends Component {
name: `FY ${this.props.periode}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#
000
', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<th style={{ ...style2, color: '#
fff
', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
{/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */}
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-2x" style={{ ...style2, color: '#000', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-4x" style={{ placeSelf: 'center', textAlign: 'center', backgroundColor: 'rgb(200 224 229)', width: 495 }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<div className="column-1" style={{
color: '#fff',
placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<div className="column-2" style={{
color: '#fff',
placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"MB"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)' }}>
...
...
@@ -15601,10 +15697,10 @@ export default class TableSubHolding extends Component {
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)' }}>
<span>{"% of OL"}</span>
</div>
<div className="column-2" style={{
placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)
' }}>
<div className="column-2" style={{
color: '#fff', placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0
' }}>
<span>{"Last Year"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<div className="column-3" style={{
color: '#fff',
placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"% of LY"}</span>
</div>
</div>
...
...
@@ -15630,7 +15726,7 @@ export default class TableSubHolding extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width:
96
, backgroundColor: 'transparent' }}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width:
75
, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
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