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
4c693f5c
Commit
4c693f5c
authored
Jan 26, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update!
parent
a0cb23e1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
215 additions
and
123 deletions
+215
-123
index.js
src/api/index.js
+3
-1
CatPQ.js
src/container/Laporan/CatPQ.js
+20
-18
SubHolding.js
src/container/Laporan/SubHolding.js
+75
-87
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+117
-17
No files found.
src/api/index.js
View file @
4c693f5c
...
@@ -247,6 +247,7 @@ const create = (type = "") => {
...
@@ -247,6 +247,7 @@ const create = (type = "") => {
const
getReportCFSumaMB
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/master_budget/get_report_hierarki'
,
body
)
const
getReportCFSumaMB
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/master_budget/get_report_hierarki'
,
body
)
const
getReportCFSumaMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/monthly_report/get_report_hierarki'
,
body
)
const
getReportCFSumaMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/monthly_report/get_report_hierarki'
,
body
)
const
getReportCFSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/summary/get_report_hierarki'
,
body
)
const
getReportCFSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/summary/get_report_hierarki'
,
body
)
const
getReportBSSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary/balance_sheet/get_report_hierarki'
,
body
)
//CASH FLOW
//CASH FLOW
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/master_budget/get_report_hierarki'
,
body
)
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/master_budget/get_report_hierarki'
,
body
)
...
@@ -602,7 +603,8 @@ const create = (type = "") => {
...
@@ -602,7 +603,8 @@ const create = (type = "") => {
getReportCFSumaMB
,
getReportCFSumaMB
,
getReportCFSumaMR
,
getReportCFSumaMR
,
createReportCF
,
createReportCF
,
getReportCFSuma
getReportCFSuma
,
getReportBSSuma
}
}
}
}
...
...
src/container/Laporan/CatPQ.js
View file @
4c693f5c
...
@@ -127,7 +127,7 @@ export default class SummaryFR extends Component {
...
@@ -127,7 +127,7 @@ export default class SummaryFR extends Component {
}
}
}
}
},{
},{
name
:
`
${
Number
(
this
.
props
.
periode
)
-
1
}
`
,
name
:
"2020"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
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
}}
>
<
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
}}
>
...
@@ -149,6 +149,7 @@ export default class SummaryFR extends Component {
...
@@ -149,6 +149,7 @@ export default class SummaryFR extends Component {
),
),
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
{
console
.
log
(
tableMeta
);
}
return
(
return
(
<
div
>
<
div
>
<
div
className
=
"grid grid-3x content-center"
>
<
div
className
=
"grid grid-3x content-center"
>
...
@@ -168,7 +169,7 @@ export default class SummaryFR extends Component {
...
@@ -168,7 +169,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -191,7 +192,7 @@ export default class SummaryFR extends Component {
...
@@ -191,7 +192,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
2
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
4
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -214,7 +215,7 @@ export default class SummaryFR extends Component {
...
@@ -214,7 +215,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
5
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -292,7 +293,7 @@ export default class SummaryFR extends Component {
...
@@ -292,7 +293,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
6
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -315,7 +316,7 @@ export default class SummaryFR extends Component {
...
@@ -315,7 +316,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
2
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
7
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -338,7 +339,7 @@ export default class SummaryFR extends Component {
...
@@ -338,7 +339,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
8
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -361,7 +362,7 @@ export default class SummaryFR extends Component {
...
@@ -361,7 +362,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
9
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -384,7 +385,7 @@ export default class SummaryFR extends Component {
...
@@ -384,7 +385,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
10
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -409,7 +410,7 @@ export default class SummaryFR extends Component {
...
@@ -409,7 +410,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
1
1
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -432,7 +433,7 @@ export default class SummaryFR extends Component {
...
@@ -432,7 +433,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
2
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
1
2
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -455,7 +456,7 @@ export default class SummaryFR extends Component {
...
@@ -455,7 +456,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
1
3
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -478,7 +479,7 @@ export default class SummaryFR extends Component {
...
@@ -478,7 +479,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
14
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -501,7 +502,7 @@ export default class SummaryFR extends Component {
...
@@ -501,7 +502,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
3
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
15
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -541,7 +542,7 @@ export default class SummaryFR extends Component {
...
@@ -541,7 +542,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
4
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
1
6
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -578,7 +579,7 @@ export default class SummaryFR extends Component {
...
@@ -578,7 +579,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
5
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
1
7
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -615,7 +616,7 @@ export default class SummaryFR extends Component {
...
@@ -615,7 +616,7 @@ export default class SummaryFR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
1
6
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
1
8
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -629,9 +630,10 @@ export default class SummaryFR extends Component {
...
@@ -629,9 +630,10 @@ export default class SummaryFR extends Component {
]
]
let
datas
=
[
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"
}],
[
"ABCD"
,
"%"
,
"Rp Bio"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
{
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" }]
// ["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" }]
]
]
console
.
log
(
datas
);
const
loadingComponent
=
(
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)'
}}
>
<
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
<
PropagateLoader
...
...
src/container/Laporan/SubHolding.js
View file @
4c693f5c
...
@@ -1091,95 +1091,83 @@ export default class SubHolding extends Component {
...
@@ -1091,95 +1091,83 @@ export default class SubHolding extends Component {
}
}
})
})
}
else
if
(
this
.
state
.
report
.
value
===
7
)
{
}
else
if
(
this
.
state
.
report
.
value
===
7
)
{
api
.
create
().
getReportBSMB
(
payload
).
then
(
response
=>
{
let
payload
=
{
"report_id"
:
this
.
state
.
report
.
value
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"months"
:
"1"
}
api
.
create
().
getReportBSSuma
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
payload
);
console
.
log
(
response
);
console
.
log
(
response
);
// let dataTable = []
let
dataTable
=
[]
// if (response.data) {
if
(
response
.
data
)
{
// let res = response.data.data
let
res
=
response
.
data
.
data
// const handlePushChild = (item) => {
const
handlePushChild
=
(
item
)
=>
{
// let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
// if (indexIDzz === -1) {
if
(
indexIDzz
===
-
1
)
{
// dataTable.push([
dataTable
.
push
([
// item.type_report_id,
item
.
type_report_id
,
// item.id,
item
.
id
,
// item.parent,
item
.
parent
,
// item.formula,
item
.
formula
,
// item.level,
item
.
level
,
// item.description,
item
.
description
,
// item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before,
item
.
balance_sheet
.
last_month
,
// Number(item.balance_sheet.january).toFixed(1),
item
.
balance_sheet
.
actual
,
// Number(item.balance_sheet.february).toFixed(1),
item
.
balance_sheet
.
mb
,
// Number(item.balance_sheet.march).toFixed(1),
item
.
balance_sheet
.
percent_of_mb
,
// Number(item.balance_sheet.april).toFixed(1),
item
.
balance_sheet
.
ol
,
// Number(item.balance_sheet.may).toFixed(1),
item
.
balance_sheet
.
percent_of_ol
,
// Number(item.balance_sheet.june).toFixed(1),
item
.
balance_sheet
.
last_year
,
// Number(item.balance_sheet.july).toFixed(1),
item
.
balance_sheet
.
forecast_next_year
,
// Number(item.balance_sheet.august).toFixed(1),
item
.
balance_sheet
.
forecast_next_two_year
,
// Number(item.balance_sheet.september).toFixed(1),
item
.
order
// Number(item.balance_sheet.october).toFixed(1),
])
// Number(item.balance_sheet.november).toFixed(1),
}
// Number(item.balance_sheet.december).toFixed(1),
if
(
item
.
children
!==
null
)
{
// Number(item.balance_sheet.total_current_year).toFixed(1),
if
(
item
.
children
.
length
>
0
)
{
// Number(item.balance_sheet.total_next_year).toFixed(1),
item
.
children
.
map
((
items
,
indexs
)
=>
{
// Number(item.balance_sheet.total_more_year).toFixed(1),
handlePushChild
(
items
)
// item.order,
})
// item.condition_it_should_be,
}
// item.condition_if_wrong
}
// ])
}
// }
res
.
map
((
item
,
index
)
=>
{
// if (item.children !== null) {
dataTable
.
push
([
// if (item.children.length > 0) {
item
.
type_report_id
,
// item.children.map((items, indexs) => {
item
.
id
,
// handlePushChild(items)
item
.
parent
,
// })
item
.
formula
,
// }
item
.
level
,
// }
item
.
description
,
// }
item
.
balance_sheet
.
last_month
,
// res.map((item, index) => {
item
.
balance_sheet
.
actual
,
// dataTable.push([
item
.
balance_sheet
.
mb
,
// item.type_report_id,
item
.
balance_sheet
.
percent_of_mb
,
// item.id,
item
.
balance_sheet
.
ol
,
// item.parent,
item
.
balance_sheet
.
percent_of_ol
,
// item.formula,
item
.
balance_sheet
.
last_year
,
// item.level,
item
.
balance_sheet
.
forecast_next_year
,
// item.description,
item
.
balance_sheet
.
forecast_next_two_year
,
// item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before,
item
.
order
// Number(item.balance_sheet.january).toFixed(1),
])
// Number(item.balance_sheet.february).toFixed(1),
if
(
item
.
children
!==
null
)
{
// Number(item.balance_sheet.march).toFixed(1),
if
(
item
.
children
.
length
>
0
)
{
// Number(item.balance_sheet.april).toFixed(1),
item
.
children
.
map
((
items
,
indexs
)
=>
{
// Number(item.balance_sheet.may).toFixed(1),
handlePushChild
(
items
)
// Number(item.balance_sheet.june).toFixed(1),
})
// Number(item.balance_sheet.july).toFixed(1),
}
// Number(item.balance_sheet.august).toFixed(1),
}
// Number(item.balance_sheet.september).toFixed(1),
})
// Number(item.balance_sheet.october).toFixed(1),
// this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
// Number(item.balance_sheet.november).toFixed(1),
this
.
setState
({
dataTable
},
()
=>
{
// Number(item.balance_sheet.december).toFixed(1),
console
.
log
(
this
.
state
.
dataTable
)
// Number(item.balance_sheet.total_current_year).toFixed(1),
// this.getBalanceSheetMR(payload)
// Number(item.balance_sheet.total_next_year).toFixed(1),
})
// Number(item.balance_sheet.total_more_year).toFixed(1),
}
else
{
// item.order,
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
// item.condition_it_should_be,
}
// item.condition_if_wrong
// ])
// if (item.children !== null) {
// if (item.children.length > 0) {
// item.children.map((items, indexs) => {
// handlePushChild(items)
// })
// }
// }
// })
// // this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
// this.setState({ dataTable }, () => {
// console.log(this.state.dataTable)
// this.getBalanceSheetMR(payload)
// })
// } else {
// this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
// }
this
.
setState
({
previewTable
:
true
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
previewTable
:
true
,
loading
:
false
,
previewDownload
:
false
})
})
})
...
...
src/container/Laporan/TableSubHolding.js
View file @
4c693f5c
...
@@ -14854,6 +14854,31 @@ export default class TableSubHolding extends Component {
...
@@ -14854,6 +14854,31 @@ export default class TableSubHolding extends Component {
const columnSummaryBS = [
const columnSummaryBS = [
{
{
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
},{
name: "Account",
name: "Account",
options: {
options: {
customHeadRender: (columnMeta) => (
customHeadRender: (columnMeta) => (
...
@@ -14917,7 +14942,7 @@ export default class TableSubHolding extends Component {
...
@@ -14917,7 +14942,7 @@ export default class TableSubHolding extends Component {
),
),
setCellProps: () => ({ style2 }),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
customBodyRender: (value, tableMeta, updateValue) => {
console.log(tableMeta)
//
console.log(tableMeta)
return (
return (
<div>
<div>
<div className="grid grid-2x content-center">
<div className="grid grid-2x content-center">
...
@@ -14934,11 +14959,11 @@ export default class TableSubHolding extends Component {
...
@@ -14934,11 +14959,11 @@ export default class TableSubHolding extends Component {
control={
control={
<NumberFormat
<NumberFormat
thousandSeparator={true}
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:
70
, backgroundColor: 'transparent' }}
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
1
).toFixed(1)}
value={Number(
tableMeta.rowData[6]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -14957,11 +14982,11 @@ export default class TableSubHolding extends Component {
...
@@ -14957,11 +14982,11 @@ export default class TableSubHolding extends Component {
control={
control={
<NumberFormat
<NumberFormat
thousandSeparator={true}
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:
70
, backgroundColor: 'transparent' }}
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
2
).toFixed(1)}
value={Number(
tableMeta.rowData[7]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -14980,11 +15005,11 @@ export default class TableSubHolding extends Component {
...
@@ -14980,11 +15005,11 @@ export default class TableSubHolding extends Component {
control={
control={
<NumberFormat
<NumberFormat
thousandSeparator={true}
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:
70
, backgroundColor: 'transparent' }}
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
3
).toFixed(1)}
value={Number(
tableMeta.rowData[8]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15003,11 +15028,11 @@ export default class TableSubHolding extends Component {
...
@@ -15003,11 +15028,11 @@ export default class TableSubHolding extends Component {
control={
control={
<NumberFormat
<NumberFormat
thousandSeparator={true}
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:
70
, backgroundColor: 'transparent' }}
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
4
).toFixed(1)}
value={Number(
tableMeta.rowData[9]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15032,7 +15057,7 @@ export default class TableSubHolding extends Component {
...
@@ -15032,7 +15057,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
5
).toFixed(1)}
value={Number(
tableMeta.rowData[10]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15055,7 +15080,7 @@ export default class TableSubHolding extends Component {
...
@@ -15055,7 +15080,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
6
).toFixed(1)}
value={Number(
tableMeta.rowData[11]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15078,7 +15103,7 @@ export default class TableSubHolding extends Component {
...
@@ -15078,7 +15103,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
7
).toFixed(1)}
value={Number(
tableMeta.rowData[12]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15101,7 +15126,7 @@ export default class TableSubHolding extends Component {
...
@@ -15101,7 +15126,7 @@ export default class TableSubHolding extends Component {
</TableCell> */}
</TableCell> */}
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<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="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8'
, width: 96
}}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8' }}>
<span>{"ForeCast"}</span>
<span>{"ForeCast"}</span>
</div>
</div>
</div>
</div>
...
@@ -15111,7 +15136,27 @@ export default class TableSubHolding extends Component {
...
@@ -15111,7 +15136,27 @@ export default class TableSubHolding extends Component {
customBodyRender: (val, tableMeta) => {
customBodyRender: (val, tableMeta) => {
return (
return (
<div style={{textAlign: 'right' }}>
<div style={{textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
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[12]).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
)
)
}
}
...
@@ -15126,7 +15171,7 @@ export default class TableSubHolding extends Component {
...
@@ -15126,7 +15171,7 @@ export default class TableSubHolding extends Component {
</TableCell> */}
</TableCell> */}
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<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="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8'
, width: 96
}}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8' }}>
<span>{"ForeCast"}</span>
<span>{"ForeCast"}</span>
</div>
</div>
</div>
</div>
...
@@ -15136,11 +15181,66 @@ export default class TableSubHolding extends Component {
...
@@ -15136,11 +15181,66 @@ export default class TableSubHolding extends Component {
customBodyRender: (val, tableMeta) => {
customBodyRender: (val, tableMeta) => {
return (
return (
<div style={{textAlign: 'right' }}>
<div style={{textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
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[12]).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
)
)
}
}
}
}
}, {
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
}
}
}
]
]
...
@@ -15983,7 +16083,7 @@ export default class TableSubHolding extends Component {
...
@@ -15983,7 +16083,7 @@ export default class TableSubHolding extends Component {
<div style={{ padding: '0px 20px 20px 20px', width: this.props.width - (this.props.open === true ? 350 : 100) }}>
<div style={{ padding: '0px 20px 20px 20px', width: this.props.width - (this.props.open === true ? 350 : 100) }}>
<MuiThemeProvider theme={getMuiTheme()}>
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
<MUIDataTable
data={this.props.type ===
7 ? dataSummaryBS : this.props.type ===
8 ? dataSummaryPL : this.props.type === 9 ? dataSummaryFR : dataTable2}
data={this.props.type === 8 ? dataSummaryPL : this.props.type === 9 ? dataSummaryFR : dataTable2}
columns={this.props.type === 2 ? columnDBBS : this.props.type === 1 ? columnDBPLDetail : this.props.type === 3 ? columnDBPL : this.props.type === 4 ? columnDBFR : this.props.type === 5 ? columnDBTP : this.props.type === 7 ? columnSummaryBS : this.props.type === 21 ? columnDBOI : this.props.type === 6? columnDBCF : this.props.type === 8 ? columnSummaryPL : this.props.type === 9 ? columnSummaryFR : columns}
columns={this.props.type === 2 ? columnDBBS : this.props.type === 1 ? columnDBPLDetail : this.props.type === 3 ? columnDBPL : this.props.type === 4 ? columnDBFR : this.props.type === 5 ? columnDBTP : this.props.type === 7 ? columnSummaryBS : this.props.type === 21 ? columnDBOI : this.props.type === 6? columnDBCF : this.props.type === 8 ? columnSummaryPL : this.props.type === 9 ? columnSummaryFR : columns}
options={options}
options={options}
/>
/>
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