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
dd8f6eca
Commit
dd8f6eca
authored
Feb 03, 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
387b2f4d
ec7103c4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
334 additions
and
149 deletions
+334
-149
index.js
src/api/index.js
+2
-0
SubHolding.js
src/container/Laporan/SubHolding.js
+220
-125
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+108
-20
TableSummaryTriputra.js
src/container/SummaryTriputra/TableSummaryTriputra.js
+4
-4
No files found.
src/api/index.js
View file @
dd8f6eca
...
@@ -265,6 +265,7 @@ const create = (type = "") => {
...
@@ -265,6 +265,7 @@ const create = (type = "") => {
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
getReportPLSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_profit_loss/summary/get_report_hierarki'
,
body
)
const
getReportPLSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_profit_loss/summary/get_report_hierarki'
,
body
)
const
getReportFRSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/get_report_hierarki'
,
body
)
const
getReportFRMB
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/master_budget/get_report_hierarki'
,
body
)
const
getReportFRMB
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/master_budget/get_report_hierarki'
,
body
)
const
getReportFRMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/monthly_report/get_report_hierarki'
,
body
)
const
getReportFRMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/monthly_report/get_report_hierarki'
,
body
)
const
getReportFRLastMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/monthly_report_last_year/get_report_hierarki'
,
body
)
const
getReportFRLastMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/monthly_report_last_year/get_report_hierarki'
,
body
)
...
@@ -634,6 +635,7 @@ const create = (type = "") => {
...
@@ -634,6 +635,7 @@ const create = (type = "") => {
getAllReportBS
,
getAllReportBS
,
getAllReportPLDetail
,
getAllReportPLDetail
,
getAllReportOI
,
getAllReportOI
,
getReportFRSuma
,
getReportFRMB
,
getReportFRMB
,
getReportFRMR
,
getReportFRMR
,
getReportFRLastMR
,
getReportFRLastMR
,
...
...
src/container/Laporan/SubHolding.js
View file @
dd8f6eca
...
@@ -2086,132 +2086,227 @@ export default class SubHolding extends Component {
...
@@ -2086,132 +2086,227 @@ export default class SubHolding extends Component {
}
}
})
})
}
else
if
(
this
.
state
.
report
.
value
===
9
)
{
}
else
if
(
this
.
state
.
report
.
value
===
9
)
{
let
paylodFR
=
{
...
payload
,
months
:
this
.
state
.
month
.
month_id
}
let
FRID
=
null
api
.
create
().
getReportFRMB
(
paylodFR
).
then
(
response
=>
{
let
payloadFRID
=
{
console
.
log
(
payload
);
"periode"
:
this
.
state
.
periode
.
periode
,
"company_id"
:
this
.
state
.
company
.
company_id
}
api
.
create
().
getFRID
(
payloadFRID
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
// let dataTable = []
if
(
response
)
{
// if (response.data) {
FRID
=
response
.
data
.
data
==
null
?
null
:
response
.
data
.
data
.
ratio_id
// if (response.data.status === 'success') {
}
else
{
// let res = response.data.data
FRID
=
null
// const handlePushChild = (item) => {
}
// let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
this
.
setState
({
FRID
},
()
=>
{
// if (indexIDzz === -1) {
let
paylodFR
=
{
...
payload
,
report_id
:
29
,
submission_id
:
this
.
state
.
FRID
,
months
:
this
.
state
.
month
.
month_id
,
quarter
:
0
}
// dataTable.push([
api
.
create
().
getReportFRSuma
(
paylodFR
).
then
(
response
=>
{
// item.type_report_id,
console
.
log
(
paylodFR
);
// item.id,
console
.
log
(
response
);
// item.parent,
// console.log(JSON.stringify(response));
// item.formula,
let
dataTable
=
[]
// item.level,
if
(
response
.
data
)
{
// item.description,
if
(
response
.
data
.
status
===
'success'
)
{
// item.uom,
let
res
=
response
.
data
.
data
// item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
const
handlePushChild
=
(
item
)
=>
{
// Number(item.ratio.january).toFixed(1),
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
// Number(item.ratio.february).toFixed(1),
if
(
indexIDzz
===
-
1
)
{
// Number(item.ratio.march).toFixed(1),
let
mtd_actual
=
item
.
ratio
.
mtd_actual
==
''
?
0
:
Number
(
item
.
ratio
.
mtd_actual
)
// Number(item.ratio.april).toFixed(1),
let
mtd_mb
=
item
.
ratio
.
mtd_mb
==
''
?
0
:
Number
(
item
.
ratio
.
mtd_mb
)
// Number(item.ratio.may).toFixed(1),
let
mtdPersenMB
=
0
// Number(item.ratio.june).toFixed(1),
if
(
mtd_mb
<
0
)
{
// Number(item.ratio.july).toFixed(1),
if
(
mtd_actual
>=
mtd_mb
)
{
// Number(item.ratio.august).toFixed(1),
mtdPersenMB
=
((
mtd_mb
-
mtd_actual
)
/
mtd_mb
+
1
)
// Number(item.ratio.september).toFixed(1),
}
else
{
// Number(item.ratio.october).toFixed(1),
mtdPersenMB
=
((
mtd_mb
-
mtd_actual
)
/
mtd_mb
)
// Number(item.ratio.november).toFixed(1),
}
// Number(item.ratio.december).toFixed(1),
}
// Number(item.ratio.total_next_year).toFixed(1),
else
{
// Number(item.ratio.total_more_year).toFixed(1),
mtdPersenMB
=
Number
(
mtd_actual
/
mtd_mb
)
// // Number(item.ratio.monthly_january).toFixed(2),
}
// // Number(item.ratio.monthly_february).toFixed(2),
// // Number(item.ratio.monthly_march).toFixed(2),
let
fy_actual
=
item
.
ratio
.
fy_actual
==
''
?
0
:
Number
(
item
.
ratio
.
fy_actual
)
// // Number(item.ratio.monthly_april).toFixed(2),
let
fy_mb
=
item
.
ratio
.
fy_mb
==
''
?
0
:
Number
(
item
.
ratio
.
fy_mb
)
// // Number(item.ratio.monthly_may).toFixed(2),
let
fyPersenMB
=
0
// // Number(item.ratio.monthly_june).toFixed(2),
if
(
fy_mb
<
0
)
{
// // Number(item.ratio.monthly_july).toFixed(2),
if
(
fy_actual
>=
fy_mb
)
{
// // Number(item.ratio.monthly_august).toFixed(2),
fyPersenMB
=
((
fy_mb
-
fy_actual
)
/
fy_mb
+
1
)
// // Number(item.ratio.monthly_september).toFixed(2),
}
else
{
// // Number(item.ratio.monthly_october).toFixed(2),
fyPersenMB
=
((
fy_mb
-
fy_actual
)
/
fy_mb
)
// // Number(item.ratio.monthly_november).toFixed(2),
}
// // Number(item.ratio.monthly_december).toFixed(2),
}
// // item.order,
else
{
// // item.condition_it_should_be,
fyPersenMB
=
Number
(
fy_actual
/
fy_mb
)
// // item.condition_if_wrong,
}
// ])
// let fy_actual = item.ratio.fy_actual == '' ? 0 : Number(item.ratio.fy_actual)
// }
let
fy_ol
=
item
.
ratio
.
fy_ol
==
''
?
0
:
Number
(
item
.
ratio
.
fy_ol
)
// if (item.children !== null) {
let
fyPersenOL
=
0
// if (item.children.length > 0) {
if
(
fy_ol
<
0
)
{
// item.children.map((items, indexs) => {
if
(
fy_actual
>=
fy_ol
)
{
// handlePushChild(items)
fyPersenOL
=
((
fy_ol
-
fy_actual
)
/
fy_ol
+
1
)
// })
}
else
{
// }
fyPersenOL
=
((
fy_ol
-
fy_actual
)
/
fy_ol
)
// }
}
// }
}
// res.map((item, index) => {
else
{
// dataTable.push([
fyPersenOL
=
Number
(
fy_actual
/
fy_ol
)
// item.type_report_id,
}
// item.id,
// item.parent,
// let fy_actual = item.ratio.fy_actual == '' ? 0 : Number(item.ratio.fy_actual)
// item.formula,
let
fy_last_year
=
item
.
ratio
.
fy_last_year
==
''
?
0
:
Number
(
item
.
ratio
.
fy_last_year
)
// item.level,
let
fyPersenLY
=
0
// item.description,
if
(
fy_last_year
<
0
)
{
// item.oum,
if
(
fy_actual
>=
fy_last_year
)
{
// item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
fyPersenLY
=
((
fy_last_year
-
fy_actual
)
/
fy_last_year
+
1
)
// Number(item.ratio.january).toFixed(1),
}
else
{
// Number(item.ratio.february).toFixed(1),
fyPersenLY
=
((
fy_last_year
-
fy_actual
)
/
fy_last_year
)
// Number(item.ratio.march).toFixed(1),
}
// Number(item.ratio.april).toFixed(1),
}
// Number(item.ratio.may).toFixed(1),
else
{
// Number(item.ratio.june).toFixed(1),
fyPersenLY
=
Number
(
fy_actual
/
fy_last_year
)
// Number(item.ratio.july).toFixed(1),
}
// Number(item.ratio.august).toFixed(1),
// Number(item.ratio.september).toFixed(1),
dataTable
.
push
([
// Number(item.ratio.october).toFixed(1),
item
.
type_report_id
,
// Number(item.ratio.november).toFixed(1),
item
.
id
,
// Number(item.ratio.december).toFixed(1),
item
.
parent
,
// Number(item.ratio.total_next_year).toFixed(1),
item
.
formula
,
// Number(item.ratio.total_more_year).toFixed(1),
item
.
level
,
// // Number(item.ratio.monthly_january).toFixed(2),
item
.
description
,
// // Number(item.ratio.monthly_february).toFixed(2),
item
.
uom
,
// // Number(item.ratio.monthly_march).toFixed(2),
item
.
ratio
.
mtd_actual
,
// // Number(item.ratio.monthly_april).toFixed(2),
item
.
ratio
.
mtd_mb
,
// // Number(item.ratio.monthly_may).toFixed(2),
isNaN
(
mtdPersenMB
)
||
mtdPersenMB
==
'Infinity'
||
mtdPersenMB
==
'-Infinity'
?
(
item
.
ratio
.
mtd_mb
==
''
||
item
.
ratio
.
mtd_mb
==
0
?
-
0
:
0
)
:
(
item
.
ratio
.
mtd_mb
==
''
||
item
.
ratio
.
mtd_mb
==
0
?
mtdPersenMB
*
-
100
:
mtdPersenMB
*
100
),
// // Number(item.ratio.monthly_june).toFixed(2),
item
.
ratio
.
mtd_last_year
,
// // Number(item.ratio.monthly_july).toFixed(2),
item
.
ratio
.
fy_actual
,
// // Number(item.ratio.monthly_august).toFixed(2),
item
.
ratio
.
fy_mb
,
// // Number(item.ratio.monthly_september).toFixed(2),
isNaN
(
fyPersenMB
)
||
fyPersenMB
==
'Infinity'
||
fyPersenMB
==
'-Infinity'
?
(
item
.
ratio
.
fy_mb
==
''
||
item
.
ratio
.
fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
ratio
.
fy_mb
==
''
||
item
.
ratio
.
fy_mb
==
0
?
fyPersenMB
*
-
100
:
fyPersenMB
*
100
),
// // Number(item.ratio.monthly_october).toFixed(2),
item
.
ratio
.
fy_ol
,
// // Number(item.ratio.monthly_november).toFixed(2),
isNaN
(
fyPersenOL
)
||
fyPersenOL
==
'Infinity'
||
fyPersenOL
==
'-Infinity'
?
(
item
.
ratio
.
fy_ol
==
''
||
item
.
ratio
.
fy_ol
==
0
?
-
0
:
0
)
:
(
item
.
ratio
.
fy_ol
==
''
||
item
.
ratio
.
fy_ol
==
0
?
fyPersenOL
*
-
100
:
fyPersenOL
*
100
),
// // Number(item.ratio.monthly_december).toFixed(2),
item
.
ratio
.
fy_last_year
,
// // item.order,
isNaN
(
fyPersenLY
)
||
fyPersenLY
==
'Infinity'
||
fyPersenLY
==
'-Infinity'
?
(
item
.
ratio
.
fy_last_year
==
''
||
item
.
ratio
.
fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
ratio
.
fy_last_year
==
''
||
item
.
ratio
.
fy_last_year
==
0
?
fyPersenLY
*
-
100
:
fyPersenLY
*
100
),
// // item.condition_it_should_be,
item
.
ratio
.
forecast_next_year
,
// // item.condition_if_wrong
item
.
ratio
.
forecast_more_year
// ])
])
// if (item.children !== null) {
}
// if (item.children.length > 0) {
if
(
item
.
children
!==
null
)
{
// item.children.map((items, indexs) => {
if
(
item
.
children
.
length
>
0
)
{
// handlePushChild(items)
item
.
children
.
map
((
items
,
indexs
)
=>
{
// })
handlePushChild
(
items
)
// }
})
// }
}
// })
}
}
res
.
map
((
item
,
index
)
=>
{
let
mtd_actual
=
item
.
ratio
.
mtd_actual
==
''
?
0
:
Number
(
item
.
ratio
.
mtd_actual
)
let
mtd_mb
=
item
.
ratio
.
mtd_mb
==
''
?
0
:
Number
(
item
.
ratio
.
mtd_mb
)
let
mtdPersenMB
=
0
if
(
mtd_mb
<
0
)
{
if
(
mtd_actual
>=
mtd_mb
)
{
mtdPersenMB
=
((
mtd_mb
-
mtd_actual
)
/
mtd_mb
+
1
)
}
else
{
mtdPersenMB
=
((
mtd_mb
-
mtd_actual
)
/
mtd_mb
)
}
}
else
{
mtdPersenMB
=
Number
(
mtd_actual
/
mtd_mb
)
}
let
fy_actual
=
item
.
ratio
.
fy_actual
==
''
?
0
:
Number
(
item
.
ratio
.
fy_actual
)
let
fy_mb
=
item
.
ratio
.
fy_mb
==
''
?
0
:
Number
(
item
.
ratio
.
fy_mb
)
let
fyPersenMB
=
0
if
(
fy_mb
<
0
)
{
if
(
fy_actual
>=
fy_mb
)
{
fyPersenMB
=
((
fy_mb
-
fy_actual
)
/
fy_mb
+
1
)
}
else
{
fyPersenMB
=
((
fy_mb
-
fy_actual
)
/
fy_mb
)
}
}
else
{
fyPersenMB
=
Number
(
fy_actual
/
fy_mb
)
}
// let fy_actual = item.ratio.fy_actual == '' ? 0 : Number(item.ratio.fy_actual)
let
fy_ol
=
item
.
ratio
.
fy_ol
==
''
?
0
:
Number
(
item
.
ratio
.
fy_ol
)
let
fyPersenOL
=
0
if
(
fy_ol
<
0
)
{
if
(
fy_actual
>=
fy_ol
)
{
fyPersenOL
=
((
fy_ol
-
fy_actual
)
/
fy_ol
+
1
)
}
else
{
fyPersenOL
=
((
fy_ol
-
fy_actual
)
/
fy_ol
)
}
}
else
{
fyPersenOL
=
Number
(
fy_actual
/
fy_ol
)
}
// let fy_actual = item.ratio.fy_actual == '' ? 0 : Number(item.ratio.fy_actual)
let
fy_last_year
=
item
.
ratio
.
fy_last_year
==
''
?
0
:
Number
(
item
.
ratio
.
fy_last_year
)
let
fyPersenLY
=
0
if
(
fy_last_year
<
0
)
{
if
(
fy_actual
>=
fy_last_year
)
{
fyPersenLY
=
((
fy_last_year
-
fy_actual
)
/
fy_last_year
+
1
)
}
else
{
fyPersenLY
=
((
fy_last_year
-
fy_actual
)
/
fy_last_year
)
}
}
else
{
fyPersenLY
=
Number
(
fy_actual
/
fy_last_year
)
}
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
uom
,
item
.
ratio
.
mtd_actual
,
item
.
ratio
.
mtd_mb
,
isNaN
(
mtdPersenMB
)
||
mtdPersenMB
==
'Infinity'
||
mtdPersenMB
==
'-Infinity'
?
(
item
.
ratio
.
mtd_mb
==
''
||
item
.
ratio
.
mtd_mb
==
0
?
-
0
:
0
)
:
(
item
.
ratio
.
mtd_mb
==
''
||
item
.
ratio
.
mtd_mb
==
0
?
mtdPersenMB
*
-
100
:
mtdPersenMB
*
100
),
item
.
ratio
.
mtd_last_year
,
item
.
ratio
.
fy_actual
,
item
.
ratio
.
fy_mb
,
isNaN
(
fyPersenMB
)
||
fyPersenMB
==
'Infinity'
||
fyPersenMB
==
'-Infinity'
?
(
item
.
ratio
.
fy_mb
==
''
||
item
.
ratio
.
fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
ratio
.
fy_mb
==
''
||
item
.
ratio
.
fy_mb
==
0
?
fyPersenMB
*
-
100
:
fyPersenMB
*
100
),
item
.
ratio
.
fy_ol
,
isNaN
(
fyPersenOL
)
||
fyPersenOL
==
'Infinity'
||
fyPersenOL
==
'-Infinity'
?
(
item
.
ratio
.
fy_ol
==
''
||
item
.
ratio
.
fy_ol
==
0
?
-
0
:
0
)
:
(
item
.
ratio
.
fy_ol
==
''
||
item
.
ratio
.
fy_ol
==
0
?
fyPersenOL
*
-
100
:
fyPersenOL
*
100
),
item
.
ratio
.
fy_last_year
,
isNaN
(
fyPersenLY
)
||
fyPersenLY
==
'Infinity'
||
fyPersenLY
==
'-Infinity'
?
(
item
.
ratio
.
fy_last_year
==
''
||
item
.
ratio
.
fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
ratio
.
fy_last_year
==
''
||
item
.
ratio
.
fy_last_year
==
0
?
fyPersenLY
*
-
100
:
fyPersenLY
*
100
),
item
.
ratio
.
forecast_next_year
,
item
.
ratio
.
forecast_more_year
])
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
})
console
.
log
(
this
.
state
.
dataTable
)
// this.setState({ dataTable }, () => {
// this.setState({ dataTable }, () => {
// console.log(this.state.dataTable)
// console.log(this.state.dataTable)
// this.getRatioMR(payload)
// this.getRatioMR(payload)
// })
// })
// } else {
}
else
{
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
// if (response.data.message.includes("Someone Logged In")) {
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
// setTimeout(() => {
setTimeout
(()
=>
{
// localStorage.removeItem(Constant.TOKEN)
localStorage
.
removeItem
(
Constant
.
TOKEN
)
// window.location.reload();
window
.
location
.
reload
();
// }, 1000);
},
1000
);
// }
}
// })
})
// }
}
// } else {
}
else
{
// this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
// }
}
this
.
setState
({
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
// this.setState({ previewTable: true, loading: false, previewDownload: true })
})
})
})
})
}
}
...
...
src/container/Laporan/TableSubHolding.js
View file @
dd8f6eca
...
@@ -15729,6 +15729,31 @@ export default class TableSubHolding extends Component {
...
@@ -15729,6 +15729,31 @@ export default class TableSubHolding extends Component {
const columnSummaryFR = [
const columnSummaryFR = [
{
{
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) => (
...
@@ -15756,18 +15781,36 @@ export default class TableSubHolding extends Component {
...
@@ -15756,18 +15781,36 @@ export default class TableSubHolding extends Component {
name: "Unit",
name: "Unit",
options: {
options: {
customHeadRender: (columnMeta) => (
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8',
borderRight: '1px solid #fff', borderLeft: '1px solid #fff
' }}>
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8',
width: 96, borderLeft: '1px #fff solid', borderRight: '1px #fff solid
' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
</TableCell>
),
),
setCellProps: () => ({ style2 }),
setCellProps: () => ({ style2 }),
customBodyRender: (val
ue
, tableMeta, updateValue) => {
customBodyRender: (val, tableMeta, updateValue) => {
return (
return (
<div style={{
width: 90, textAlign: 'center'
}}>
<div style={{
textAlign: 'right', width: 90
}}>
{tableMeta.rowData[0] ===
1 || tableMeta.rowData[0] === 4
?
{tableMeta.rowData[0] ===
4 || tableMeta.rowData[0] === 1
?
null :
null :
<div>
<div style={{ flex: 1 }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : value}</span>
<FormControlLabel
style={{ margin: 0 }}
// value={val}
control={
<Input
disableUnderline={true}
style={{ color: "#000", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
defaultValue={tableMeta.rowData[6]}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleNotes(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
/>
}
/>
</div>
</div>
}
}
</div>
</div>
...
@@ -15823,7 +15866,7 @@ export default class TableSubHolding extends Component {
...
@@ -15823,7 +15866,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[7]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15846,7 +15889,7 @@ export default class TableSubHolding extends Component {
...
@@ -15846,7 +15889,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[8]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15869,7 +15912,7 @@ export default class TableSubHolding extends Component {
...
@@ -15869,7 +15912,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[9]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15892,7 +15935,7 @@ export default class TableSubHolding extends Component {
...
@@ -15892,7 +15935,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[10]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15906,6 +15949,21 @@ export default class TableSubHolding extends Component {
...
@@ -15906,6 +15949,21 @@ export default class TableSubHolding extends Component {
}
}
}
}
}, {
}, {
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: `FY ${this.props.periode}`,
name: `FY ${this.props.periode}`,
options: {
options: {
customHeadRender: (columnMeta) => (
customHeadRender: (columnMeta) => (
...
@@ -15966,7 +16024,7 @@ export default class TableSubHolding extends Component {
...
@@ -15966,7 +16024,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[11]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15989,7 +16047,7 @@ export default class TableSubHolding extends Component {
...
@@ -15989,7 +16047,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[12]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -16012,7 +16070,7 @@ export default class TableSubHolding extends Component {
...
@@ -16012,7 +16070,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[13]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -16035,7 +16093,7 @@ export default class TableSubHolding extends Component {
...
@@ -16035,7 +16093,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[14]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -16060,7 +16118,7 @@ export default class TableSubHolding extends Component {
...
@@ -16060,7 +16118,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[15]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -16083,7 +16141,7 @@ export default class TableSubHolding extends Component {
...
@@ -16083,7 +16141,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[16]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -16106,7 +16164,7 @@ export default class TableSubHolding extends Component {
...
@@ -16106,7 +16164,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[17]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -16120,6 +16178,36 @@ export default class TableSubHolding extends Component {
...
@@ -16120,6 +16178,36 @@ 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: `${Number(this.props.periode) + 1}`,
name: `${Number(this.props.periode) + 1}`,
options: {
options: {
customHeadRender: (columnMeta) => (
customHeadRender: (columnMeta) => (
...
@@ -16154,7 +16242,7 @@ export default class TableSubHolding extends Component {
...
@@ -16154,7 +16242,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[18]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -16199,7 +16287,7 @@ export default class TableSubHolding extends Component {
...
@@ -16199,7 +16287,7 @@ export default class TableSubHolding extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={Number(
0.0
).toFixed(1)}
value={Number(
tableMeta.rowData[19]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -16219,7 +16307,7 @@ export default class TableSubHolding extends Component {
...
@@ -16219,7 +16307,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 === 9 ? dataSummaryFR :
dataTable2}
data={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}
/>
/>
src/container/SummaryTriputra/TableSummaryTriputra.js
View file @
dd8f6eca
...
@@ -1111,7 +1111,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -1111,7 +1111,7 @@ export default class TableSummaryTriputra extends Component {
name
:
`Revenue`
,
name
:
`Revenue`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
paddingLeft
:
0
}}
>
<
th
style
=
{{
...
style2
,
top
:
0
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
paddingLeft
:
0
}}
>
<
div
style
=
{{
borderLeft
:
'2px #fff solid'
,
borderRight
:
'1px #fff solid'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderLeft
:
'2px #fff solid'
,
borderRight
:
'1px #fff solid'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"column-3"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-3"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
66
,
width
:
685
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
66
,
width
:
685
}}
>
...
@@ -1408,7 +1408,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -1408,7 +1408,7 @@ export default class TableSummaryTriputra extends Component {
name
:
`EBITDA`
,
name
:
`EBITDA`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
paddingLeft
:
0
}}
>
<
th
style
=
{{
...
style2
,
top
:
0
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
paddingLeft
:
0
}}
>
<
div
style
=
{{
borderLeft
:
'1px #fff solid'
,
borderRight
:
'1px #fff solid'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderLeft
:
'1px #fff solid'
,
borderRight
:
'1px #fff solid'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"column-3"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-3"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
66
,
width
:
685
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
66
,
width
:
685
}}
>
...
@@ -1711,7 +1711,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -1711,7 +1711,7 @@ export default class TableSummaryTriputra extends Component {
name
:
`TPAT`
,
name
:
`TPAT`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
paddingLeft
:
0
}}
>
<
th
style
=
{{
...
style2
,
top
:
0
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
paddingLeft
:
0
}}
>
<
div
style
=
{{
borderLeft
:
'1px #fff solid'
,
borderRight
:
'1px #fff solid'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderLeft
:
'1px #fff solid'
,
borderRight
:
'1px #fff solid'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"column-3"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-3"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
66
,
width
:
685
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
66
,
width
:
685
}}
>
...
@@ -2014,7 +2014,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -2014,7 +2014,7 @@ export default class TableSummaryTriputra extends Component {
name
:
`NPAT`
,
name
:
`NPAT`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
paddingLeft
:
0
}}
>
<
th
style
=
{{
...
style2
,
top
:
0
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
paddingLeft
:
0
}}
>
<
div
style
=
{{
borderLeft
:
'1px #fff solid'
,
borderRight
:
'1px #fff solid'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderLeft
:
'1px #fff solid'
,
borderRight
:
'1px #fff solid'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"column-3"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-3"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
66
,
width
:
685
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
66
,
width
:
685
}}
>
...
...
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