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
a0cb23e1
Commit
a0cb23e1
authored
Jan 25, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
Didam See merge request
!1026
parents
76876868
b79730be
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
571 additions
and
184 deletions
+571
-184
index.js
src/api/index.js
+6
-4
BudgetTahunan.js
src/container/BudgetTahunan.js
+23
-9
SubHolding.js
src/container/Laporan/SubHolding.js
+231
-113
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+295
-56
MonthlyReport.js
src/container/MonthlyReport.js
+16
-2
No files found.
src/api/index.js
View file @
a0cb23e1
...
...
@@ -244,9 +244,10 @@ const create = (type = "") => {
const
getReportTPMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_tax_planning/monthly_report/get_report_hierarki'
,
body
)
const
getReportOIMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_operating_indicator/master_budget/get_report_hierarki'
,
body
)
const
getReportOIMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_operating_indicator/monthly_report/get_report_hierarki'
,
body
)
const
getReportCFSumaMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_cash_flow/master_budget/get_report_hierarki'
,
body
)
const
getReportCFSumaMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_cash_flow/monthly_report/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
getReportCFSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/summary/get_report_hierarki'
,
body
)
//CASH FLOW
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/master_budget/get_report_hierarki'
,
body
)
const
createReportCF
=
(
body
)
=>
api
.
post
(
'transaction/cash_flow/master_budget/create_submission_report'
,
body
)
...
...
@@ -600,7 +601,8 @@ const create = (type = "") => {
getReportOIMR
,
getReportCFSumaMB
,
getReportCFSumaMR
,
createReportCF
createReportCF
,
getReportCFSuma
}
}
...
...
src/container/BudgetTahunan.js
View file @
a0cb23e1
...
...
@@ -278,11 +278,18 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
indexC
=
String
(
item
.
current_status
).
toLocaleUpperCase
().
indexOf
(
'C'
)
let
status_approv
=
''
if
(
String
(
item
.
current_status
).
toLocaleUpperCase
().
includes
(
'CC'
))
{
status_approv
=
`
${
String
(
item
.
current_status
).
substr
(
0
,
indexC
)}${
String
(
item
.
current_status
).
substr
(
indexC
+
1
,
String
(
item
.
current_status
).
length
)}
`
}
else
{
status_approv
=
String
(
item
.
current_status
)
}
return
[
item
.
number
,
item
.
report_name
===
'CAT'
?
'Corporate Annual Target'
:
item
.
report_name
,
item
.
revision
,
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
status_approv
,
item
.
report_id
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
item
.
revision
...
...
@@ -1039,15 +1046,15 @@ export default class BudgetTahunan extends Component {
// console.log(listCF)
this
.
setState
({
dbCF
:
listCF
}
,
()
=>
{
if
(
this
.
state
.
company
.
company_id
==
'13467'
)
{
if
(
this
.
state
.
submissionID
!=
null
)
{
this
.
createCashFlow
()
}
if
(
type
!=
undefined
)
{
if
(
type
==
'BS'
||
type
==
'FAM'
||
type
==
'PL'
)
{
console
.
log
(
'tarik sis'
)
this
.
createCashFlow
()
}
}
//
if (type != undefined) {
//
if (type == 'BS' || type == 'FAM' || type == 'PL') {
//
console.log('tarik sis')
//
this.createCashFlow()
//
}
//
}
})
}
...
...
@@ -1090,9 +1097,16 @@ export default class BudgetTahunan extends Component {
// // // console.log(response);
if
(
response
.
data
.
data
.
length
>
0
)
{
let
dataTableHistory
=
response
.
data
.
data
.
map
(
item
=>
{
let
indexC
=
String
(
item
.
status_approval
).
toLocaleUpperCase
().
indexOf
(
'C'
)
let
status_approv
=
''
if
(
String
(
item
.
status_approval
).
toLocaleUpperCase
().
includes
(
'CC'
))
{
status_approv
=
`
${
String
(
item
.
status_approval
).
substr
(
0
,
indexC
)}${
String
(
item
.
status_approval
).
substr
(
indexC
+
1
,
String
(
item
.
status_approval
).
length
)}
`
}
else
{
status_approv
=
String
(
item
.
status_approval
)
}
return
[
item
.
pic
,
item
.
status_approval
,
status_approv
,
item
.
remarks
,
item
.
item_revision
,
item
.
history_approval_date
...
...
src/container/Laporan/SubHolding.js
View file @
a0cb23e1
...
...
@@ -9,6 +9,7 @@ import { PropagateLoader } from 'react-spinners'
import
ReactTooltip
from
'react-tooltip'
import
Images
from
'../../assets/Images'
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
*
as
R
from
'ramda'
const
Alert
=
withStyles
({
})((
props
)
=>
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
)
;
...
...
@@ -872,44 +873,49 @@ export default class SubHolding extends Component {
}
})
}
else
if
(
this
.
state
.
report
.
value
===
6
)
{
api
.
create
().
getReportCFSumaMB
(
payload
).
then
(
response
=>
{
// console.log(payload);
console
.
log
(
response
);
let
dataTable
=
[]
let
dbSumaCF
=
[]
api
.
create
().
getReportCFSuma
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
res
=
response
.
data
.
data
console
.
log
(
res
)
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
d
ataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
indexIDzz
=
d
bSumaCF
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
dataTable
.
push
([
item
.
type_report_id
,
let
mtd_actual
=
item
.
cash_flow
.
mtd_actual
==
''
?
0
:
item
.
cash_flow
.
mtd_actual
let
mtd
=
item
.
cash_flow
.
mtd
==
''
?
0
:
item
.
cash_flow
.
mtd
let
persenMtd
=
Number
(
mtd_actual
/
mtd
)
let
ytd_actual
=
item
.
cash_flow
.
ytd_actual
==
''
?
0
:
item
.
cash_flow
.
ytd_actual
let
ytd
=
item
.
cash_flow
.
ytd
==
''
?
0
:
item
.
cash_flow
.
ytd
let
persenYtd
=
Number
(
ytd_actual
/
ytd
)
let
quarter_actual
=
item
.
cash_flow
.
quarter_actual
==
''
?
0
:
item
.
cash_flow
.
quarter_actual
let
quarter
=
item
.
cash_flow
.
quarter
==
''
?
0
:
item
.
cash_flow
.
quarter
let
persenQuarter
=
Number
(
quarter_actual
/
quarter
)
let
fy_actual
=
item
.
cash_flow
.
fy_actual
==
''
?
0
:
item
.
cash_flow
.
fy_actual
let
fy
=
item
.
cash_flow
.
fy
==
''
?
0
:
item
.
cash_flow
.
fy
let
persenFy
=
Number
(
fy_actual
/
fy
)
dbSumaCF
.
push
([
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
cash_flow
.
total_actual_before
===
null
?
"0"
:
item
.
cash_flow
.
total_actual_before
===
""
?
"0"
:
item
.
cash_flow
.
total_actual_before
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
january
,
formula
:
item
.
cash_flow
.
january_formula
}
:
item
.
cash_flow
.
january
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
february
,
formula
:
item
.
cash_flow
.
february_formula
}
:
item
.
cash_flow
.
february
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
march
,
formula
:
item
.
cash_flow
.
march_formula
}
:
item
.
cash_flow
.
march
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
april
,
formula
:
item
.
cash_flow
.
april_formula
}
:
item
.
cash_flow
.
april
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
may
,
formula
:
item
.
cash_flow
.
may_formula
}
:
item
.
cash_flow
.
may
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
june
,
formula
:
item
.
cash_flow
.
june_formula
}
:
item
.
cash_flow
.
june
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
july
,
formula
:
item
.
cash_flow
.
july_formula
}
:
item
.
cash_flow
.
july
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
august
,
formula
:
item
.
cash_flow
.
august_formula
}
:
item
.
cash_flow
.
august
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
september
,
formula
:
item
.
cash_flow
.
september_formula
}
:
item
.
cash_flow
.
september
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
october
,
formula
:
item
.
cash_flow
.
october_formula
}
:
item
.
cash_flow
.
october
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
november
,
formula
:
item
.
cash_flow
.
november_formula
}
:
item
.
cash_flow
.
november
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
december
,
formula
:
item
.
cash_flow
.
december_formula
}
:
item
.
cash_flow
.
december
,
item
.
cash_flow
.
total_current_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
cash_flow
.
total_next_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
cash_flow
.
total_more_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
cash_flow
.
forecast_formula
==
null
?
[]
:
item
.
cash_flow
.
forecast_formula
item
.
cash_flow
.
mtd_actual
,
item
.
cash_flow
.
mtd
,
isNaN
(
persenMtd
)?
0
:
persenMtd
*
100
,
item
.
cash_flow
.
mtd_last_year
,
item
.
cash_flow
.
ytd_actual
,
item
.
cash_flow
.
ytd
,
isNaN
(
persenYtd
)?
0
:
persenYtd
*
100
,
item
.
cash_flow
.
ytd_last_year
,
item
.
cash_flow
.
quarter_actual
,
item
.
cash_flow
.
quarter
,
isNaN
(
persenQuarter
)?
0
:
persenQuarter
*
100
,
item
.
cash_flow
.
quarter_last_year
,
item
.
cash_flow
.
fy_actual
,
item
.
cash_flow
.
fy
,
isNaN
(
persenFy
)?
0
:
persenFy
*
100
,
item
.
cash_flow
.
fy_last_year
,
])
}
if
(
item
.
children
!==
null
)
{
...
...
@@ -920,34 +926,41 @@ export default class SubHolding extends Component {
}
}
}
res
.
map
((
item
,
index
)
=>
{
dataTable
.
push
([
item
.
type_report_id
,
res
.
map
((
item
,
index
)
=>
{
let
mtd_actual
=
item
.
cash_flow
.
mtd_actual
==
''
?
0
:
item
.
cash_flow
.
mtd_actual
let
mtd
=
item
.
cash_flow
.
mtd
==
''
?
0
:
item
.
cash_flow
.
mtd
let
persenMtd
=
Number
(
mtd_actual
/
mtd
)
console
.
log
(
persenMtd
)
let
ytd_actual
=
item
.
cash_flow
.
ytd_actual
==
''
?
0
:
item
.
cash_flow
.
ytd_actual
let
ytd
=
item
.
cash_flow
.
ytd
==
''
?
0
:
item
.
cash_flow
.
ytd
let
persenYtd
=
Number
(
ytd_actual
/
ytd
)
let
quarter_actual
=
item
.
cash_flow
.
quarter_actual
==
''
?
0
:
item
.
cash_flow
.
quarter_actual
let
quarter
=
item
.
cash_flow
.
quarter
==
''
?
0
:
item
.
cash_flow
.
quarter
let
persenQuarter
=
Number
(
quarter_actual
/
quarter
)
let
fy_actual
=
item
.
cash_flow
.
fy_actual
==
''
?
0
:
item
.
cash_flow
.
fy_actual
let
fy
=
item
.
cash_flow
.
fy
==
''
?
0
:
item
.
cash_flow
.
fy
let
persenFy
=
Number
(
fy_actual
/
fy
)
dbSumaCF
.
push
([
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
cash_flow
.
total_actual_before
===
null
?
"0"
:
item
.
cash_flow
.
total_actual_before
===
""
?
"0"
:
item
.
cash_flow
.
total_actual_before
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
january
,
formula
:
item
.
cash_flow
.
january_formula
}
:
item
.
cash_flow
.
january
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
february
,
formula
:
item
.
cash_flow
.
february_formula
}
:
item
.
cash_flow
.
february
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
march
,
formula
:
item
.
cash_flow
.
march_formula
}
:
item
.
cash_flow
.
march
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
april
,
formula
:
item
.
cash_flow
.
april_formula
}
:
item
.
cash_flow
.
april
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
may
,
formula
:
item
.
cash_flow
.
may_formula
}
:
item
.
cash_flow
.
may
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
june
,
formula
:
item
.
cash_flow
.
june_formula
}
:
item
.
cash_flow
.
june
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
july
,
formula
:
item
.
cash_flow
.
july_formula
}
:
item
.
cash_flow
.
july
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
august
,
formula
:
item
.
cash_flow
.
august_formula
}
:
item
.
cash_flow
.
august
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
september
,
formula
:
item
.
cash_flow
.
september_formula
}
:
item
.
cash_flow
.
september
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
october
,
formula
:
item
.
cash_flow
.
october_formula
}
:
item
.
cash_flow
.
october
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
november
,
formula
:
item
.
cash_flow
.
november_formula
}
:
item
.
cash_flow
.
november
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
december
,
formula
:
item
.
cash_flow
.
december_formula
}
:
item
.
cash_flow
.
december
,
item
.
cash_flow
.
total_current_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
cash_flow
.
total_next_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
cash_flow
.
total_more_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
cash_flow
.
forecast_formula
==
null
?
[]
:
item
.
cash_flow
.
forecast_formula
item
.
cash_flow
.
mtd_actual
,
item
.
cash_flow
.
mtd
,
isNaN
(
persenMtd
)?
0
:
persenMtd
*
100
,
item
.
cash_flow
.
mtd_last_year
,
item
.
cash_flow
.
ytd_actual
,
item
.
cash_flow
.
ytd
,
isNaN
(
persenYtd
)?
0
:
persenYtd
*
100
,
item
.
cash_flow
.
ytd_last_year
,
item
.
cash_flow
.
quarter_actual
,
item
.
cash_flow
.
quarter
,
isNaN
(
persenQuarter
)?
0
:
persenQuarter
*
100
,
item
.
cash_flow
.
quarter_last_year
,
item
.
cash_flow
.
fy_actual
,
item
.
cash_flow
.
fy
,
isNaN
(
persenFy
)?
0
:
persenFy
*
100
,
item
.
cash_flow
.
fy_last_year
,
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
...
...
@@ -957,9 +970,111 @@ export default class SubHolding extends Component {
}
}
})
this
.
setState
({
dataTable
},
()
=>
{
console
.
log
(
this
.
state
.
dataTable
)
this
.
getCFSumaMR
(
payload
)
console
.
log
(
dbSumaCF
)
this
.
setState
({
dbSumaCF
},
()
=>
{
api
.
create
().
getReportCFSumaMB
(
payload
).
then
(
response
=>
{
// console.log(payload);
console
.
log
(
response
);
let
dataTable
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
res
=
response
.
data
.
data
console
.
log
(
res
)
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
cash_flow
.
total_actual_before
,
item
.
cash_flow
.
january
,
item
.
cash_flow
.
february
,
item
.
cash_flow
.
march
,
item
.
cash_flow
.
april
,
item
.
cash_flow
.
may
,
item
.
cash_flow
.
june
,
item
.
cash_flow
.
july
,
item
.
cash_flow
.
august
,
item
.
cash_flow
.
september
,
item
.
cash_flow
.
october
,
item
.
cash_flow
.
november
,
item
.
cash_flow
.
december
,
item
.
cash_flow
.
total_current_year
,
item
.
cash_flow
.
total_next_year
,
item
.
cash_flow
.
total_more_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
cash_flow
.
forecast_formula
==
null
?
[]
:
item
.
cash_flow
.
forecast_formula
])
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
}
res
.
map
((
item
,
index
)
=>
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
cash_flow
.
total_actual_before
,
item
.
cash_flow
.
january
,
item
.
cash_flow
.
february
,
item
.
cash_flow
.
march
,
item
.
cash_flow
.
april
,
item
.
cash_flow
.
may
,
item
.
cash_flow
.
june
,
item
.
cash_flow
.
july
,
item
.
cash_flow
.
august
,
item
.
cash_flow
.
september
,
item
.
cash_flow
.
october
,
item
.
cash_flow
.
november
,
item
.
cash_flow
.
december
,
item
.
cash_flow
.
total_current_year
,
item
.
cash_flow
.
total_next_year
,
item
.
cash_flow
.
total_more_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
cash_flow
.
forecast_formula
==
null
?
[]
:
item
.
cash_flow
.
forecast_formula
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
})
this
.
setState
({
dataTable
},
()
=>
{
console
.
log
(
this
.
state
.
dataTable
)
this
.
getCFSumaMR
(
payload
,
dbSumaCF
)
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
...
@@ -970,7 +1085,7 @@ export default class SubHolding extends Component {
},
1000
);
}
})
}
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
...
...
@@ -1291,7 +1406,7 @@ export default class SubHolding extends Component {
}
getCFSumaMR
(
payload
)
{
getCFSumaMR
(
payload
,
dbSumaCF
)
{
// let payloadOI = {...payload, "periode": Number(this.state.periode.periode) - 1}
let
payloadLast
=
{
"report_id"
:
this
.
state
.
report
.
value
,
...
...
@@ -1315,18 +1430,18 @@ export default class SubHolding extends Component {
// console.log(indexIDzz)
if
(
indexIDzz
!=
-
1
)
{
dataTable2
.
push
([...
dataTable
[
indexIDzz
],
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
january
,
formula
:
items
.
cash_flow
.
january_formula
}
:
items
.
cash_flow
.
january
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
february
,
formula
:
items
.
cash_flow
.
february_formula
}
:
items
.
cash_flow
.
february
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
march
,
formula
:
items
.
cash_flow
.
march_formula
}
:
items
.
cash_flow
.
march
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
april
,
formula
:
items
.
cash_flow
.
april_formula
}
:
items
.
cash_flow
.
april
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
may
,
formula
:
items
.
cash_flow
.
may_formula
}
:
items
.
cash_flow
.
may
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
june
,
formula
:
items
.
cash_flow
.
june_formula
}
:
items
.
cash_flow
.
june
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
july
,
formula
:
items
.
cash_flow
.
july_formula
}
:
items
.
cash_flow
.
july
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
august
,
formula
:
items
.
cash_flow
.
august_formula
}
:
items
.
cash_flow
.
august
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
september
,
formula
:
items
.
cash_flow
.
september_formula
}
:
items
.
cash_flow
.
september
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
october
,
formula
:
items
.
cash_flow
.
october_formula
}
:
items
.
cash_flow
.
october
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
november
,
formula
:
items
.
cash_flow
.
november_formula
}
:
items
.
cash_flow
.
november
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
december
,
formula
:
items
.
cash_flow
.
december_formula
}
:
items
.
cash_flow
.
december
,
items
.
cash_flow
.
january
,
items
.
cash_flow
.
february
,
items
.
cash_flow
.
march
,
items
.
cash_flow
.
april
,
items
.
cash_flow
.
may
,
items
.
cash_flow
.
june
,
items
.
cash_flow
.
july
,
items
.
cash_flow
.
august
,
items
.
cash_flow
.
september
,
items
.
cash_flow
.
october
,
items
.
cash_flow
.
november
,
items
.
cash_flow
.
december
,
])
}
if
(
items
.
children
!==
null
)
{
...
...
@@ -1339,18 +1454,18 @@ export default class SubHolding extends Component {
}
dataTable2
.
push
([...
dataTable
[
indexID
],
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
january
,
formula
:
item
.
cash_flow
.
january_formula
}
:
item
.
cash_flow
.
january
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
february
,
formula
:
item
.
cash_flow
.
february_formula
}
:
item
.
cash_flow
.
february
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
march
,
formula
:
item
.
cash_flow
.
march_formula
}
:
item
.
cash_flow
.
march
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
april
,
formula
:
item
.
cash_flow
.
april_formula
}
:
item
.
cash_flow
.
april
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
may
,
formula
:
item
.
cash_flow
.
may_formula
}
:
item
.
cash_flow
.
may
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
june
,
formula
:
item
.
cash_flow
.
june_formula
}
:
item
.
cash_flow
.
june
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
july
,
formula
:
item
.
cash_flow
.
july_formula
}
:
item
.
cash_flow
.
july
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
august
,
formula
:
item
.
cash_flow
.
august_formula
}
:
item
.
cash_flow
.
august
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
september
,
formula
:
item
.
cash_flow
.
september_formula
}
:
item
.
cash_flow
.
september
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
october
,
formula
:
item
.
cash_flow
.
october_formula
}
:
item
.
cash_flow
.
october
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
november
,
formula
:
item
.
cash_flow
.
november_formula
}
:
item
.
cash_flow
.
november
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
december
,
formula
:
item
.
cash_flow
.
december_formula
}
:
item
.
cash_flow
.
december
,
item
.
cash_flow
.
january
,
item
.
cash_flow
.
february
,
item
.
cash_flow
.
march
,
item
.
cash_flow
.
april
,
item
.
cash_flow
.
may
,
item
.
cash_flow
.
june
,
item
.
cash_flow
.
july
,
item
.
cash_flow
.
august
,
item
.
cash_flow
.
september
,
item
.
cash_flow
.
october
,
item
.
cash_flow
.
november
,
item
.
cash_flow
.
december
,
])
if
(
item
.
children
!==
null
)
{
...
...
@@ -1366,7 +1481,7 @@ export default class SubHolding extends Component {
})
this
.
setState
({
dataTable2
},
()
=>
{
// console.log(this.state.dataTable2)
this
.
getCFSumaLastMR
(
payloadLast
)
this
.
getCFSumaLastMR
(
payloadLast
,
dbSumaCF
)
})
console
.
log
(
dataTable2
)
// this.setState({ dataTable: dataTable2, previewTable: true, loading: false, previewDownload: false })
...
...
@@ -1376,7 +1491,7 @@ export default class SubHolding extends Component {
})
}
getCFSumaLastMR
(
payload
)
{
getCFSumaLastMR
(
payload
,
dbSumaCF
)
{
api
.
create
().
getReportCFSumaMR
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
response
);
...
...
@@ -1386,24 +1501,26 @@ export default class SubHolding extends Component {
let
res
=
response
.
data
.
data
res
.
map
((
item
,
index
)
=>
{
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
item
.
id
)
let
indexIDSuma
=
dbSumaCF
.
findIndex
((
val
)
=>
val
[
0
]
==
item
.
id
)
if
(
indexID
!=
-
1
)
{
const
handlePushChild
=
(
items
)
=>
{
let
indexIDzz
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
===
items
.
id
)
// console.log(indexIDzz)
if
(
indexIDzz
!=
-
1
)
{
dataTable3
.
push
([...
dataTable2
[
indexIDzz
],
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
january
,
formula
:
items
.
cash_flow
.
january_formula
}
:
items
.
cash_flow
.
january
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
february
,
formula
:
items
.
cash_flow
.
february_formula
}
:
items
.
cash_flow
.
february
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
march
,
formula
:
items
.
cash_flow
.
march_formula
}
:
items
.
cash_flow
.
march
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
april
,
formula
:
items
.
cash_flow
.
april_formula
}
:
items
.
cash_flow
.
april
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
may
,
formula
:
items
.
cash_flow
.
may_formula
}
:
items
.
cash_flow
.
may
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
june
,
formula
:
items
.
cash_flow
.
june_formula
}
:
items
.
cash_flow
.
june
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
july
,
formula
:
items
.
cash_flow
.
july_formula
}
:
items
.
cash_flow
.
july
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
august
,
formula
:
items
.
cash_flow
.
august_formula
}
:
items
.
cash_flow
.
august
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
september
,
formula
:
items
.
cash_flow
.
september_formula
}
:
items
.
cash_flow
.
september
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
october
,
formula
:
items
.
cash_flow
.
october_formula
}
:
items
.
cash_flow
.
october
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
november
,
formula
:
items
.
cash_flow
.
november_formula
}
:
items
.
cash_flow
.
november
,
items
.
type_report_id
==
5
||
items
.
type_report_id
==
6
||
items
.
type_report_id
==
7
?
{
value
:
items
.
cash_flow
.
december
,
formula
:
items
.
cash_flow
.
december_formula
}
:
items
.
cash_flow
.
december
,
items
.
cash_flow
.
january
,
items
.
cash_flow
.
february
,
items
.
cash_flow
.
march
,
items
.
cash_flow
.
april
,
items
.
cash_flow
.
may
,
items
.
cash_flow
.
june
,
items
.
cash_flow
.
july
,
items
.
cash_flow
.
august
,
items
.
cash_flow
.
september
,
items
.
cash_flow
.
october
,
items
.
cash_flow
.
november
,
items
.
cash_flow
.
december
,
...
dbSumaCF
[
indexIDSuma
]
])
}
if
(
items
.
children
!==
null
)
{
...
...
@@ -1416,18 +1533,19 @@ export default class SubHolding extends Component {
}
dataTable3
.
push
([...
dataTable2
[
indexID
],
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
january
,
formula
:
item
.
cash_flow
.
january_formula
}
:
item
.
cash_flow
.
january
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
february
,
formula
:
item
.
cash_flow
.
february_formula
}
:
item
.
cash_flow
.
february
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
march
,
formula
:
item
.
cash_flow
.
march_formula
}
:
item
.
cash_flow
.
march
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
april
,
formula
:
item
.
cash_flow
.
april_formula
}
:
item
.
cash_flow
.
april
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
may
,
formula
:
item
.
cash_flow
.
may_formula
}
:
item
.
cash_flow
.
may
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
june
,
formula
:
item
.
cash_flow
.
june_formula
}
:
item
.
cash_flow
.
june
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
july
,
formula
:
item
.
cash_flow
.
july_formula
}
:
item
.
cash_flow
.
july
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
august
,
formula
:
item
.
cash_flow
.
august_formula
}
:
item
.
cash_flow
.
august
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
september
,
formula
:
item
.
cash_flow
.
september_formula
}
:
item
.
cash_flow
.
september
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
october
,
formula
:
item
.
cash_flow
.
october_formula
}
:
item
.
cash_flow
.
october
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
november
,
formula
:
item
.
cash_flow
.
november_formula
}
:
item
.
cash_flow
.
november
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
cash_flow
.
december
,
formula
:
item
.
cash_flow
.
december_formula
}
:
item
.
cash_flow
.
december
,
item
.
cash_flow
.
january
,
item
.
cash_flow
.
february
,
item
.
cash_flow
.
march
,
item
.
cash_flow
.
april
,
item
.
cash_flow
.
may
,
item
.
cash_flow
.
june
,
item
.
cash_flow
.
july
,
item
.
cash_flow
.
august
,
item
.
cash_flow
.
september
,
item
.
cash_flow
.
october
,
item
.
cash_flow
.
november
,
item
.
cash_flow
.
december
,
...
dbSumaCF
[
indexIDSuma
]
])
if
(
item
.
children
!==
null
)
{
...
...
src/container/Laporan/TableSubHolding.js
View file @
a0cb23e1
...
...
@@ -11306,7 +11306,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[51]
).toFixed(1)}
/>
}
/>
...
...
@@ -11329,7 +11329,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[52]
).toFixed(1)}
/>
}
/>
...
...
@@ -11352,7 +11352,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
suffix={'%'}
value={Number(tableMeta.rowData[53]).toFixed(1)}
/>
}
/>
...
...
@@ -11375,7 +11376,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[54]
).toFixed(1)}
/>
}
/>
...
...
@@ -11438,7 +11439,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[55]
).toFixed(1)}
/>
}
/>
...
...
@@ -11461,7 +11462,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[56]
).toFixed(1)}
/>
}
/>
...
...
@@ -11484,7 +11485,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
suffix={'%'}
value={Number(tableMeta.rowData[57]).toFixed(1)}
/>
}
/>
...
...
@@ -11507,7 +11509,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[58]
).toFixed(1)}
/>
}
/>
...
...
@@ -11570,7 +11572,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[59]
).toFixed(1)}
/>
}
/>
...
...
@@ -11593,7 +11595,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[60]
).toFixed(1)}
/>
}
/>
...
...
@@ -11616,7 +11618,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
suffix={'%'}
value={Number(tableMeta.rowData[61]).toFixed(1)}
/>
}
/>
...
...
@@ -11639,7 +11642,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[62]
).toFixed(1)}
/>
}
/>
...
...
@@ -11702,7 +11705,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[63]
).toFixed(1)}
/>
}
/>
...
...
@@ -11725,7 +11728,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[64]
).toFixed(1)}
/>
}
/>
...
...
@@ -11748,7 +11751,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[65]).toFixed(1)}
suffix={'%'}
/>
}
/>
...
...
@@ -11771,7 +11775,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
0
).toFixed(1)}
value={Number(
tableMeta.rowData[66]
).toFixed(1)}
/>
}
/>
...
...
@@ -11864,7 +11868,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[7], tableMeta, 7)
).toFixed(1)}
value={Number(
tableMeta.rowData[7]
).toFixed(1)}
/>
}
/>
...
...
@@ -11887,7 +11891,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[8], tableMeta, 8)
).toFixed(1)}
value={Number(
tableMeta.rowData[8]
).toFixed(1)}
/>
}
/>
...
...
@@ -11910,7 +11914,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[9], tableMeta, 9)
).toFixed(1)}
value={Number(
tableMeta.rowData[9]
).toFixed(1)}
/>
}
/>
...
...
@@ -11933,7 +11937,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[10], tableMeta, 10)
).toFixed(1)}
value={Number(
tableMeta.rowData[10]
).toFixed(1)}
/>
}
/>
...
...
@@ -11958,7 +11962,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[11], tableMeta, 11)
).toFixed(1)}
value={Number(
tableMeta.rowData[11]
).toFixed(1)}
/>
}
/>
...
...
@@ -11981,7 +11985,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[12], tableMeta, 12)
).toFixed(1)}
value={Number(
tableMeta.rowData[12]
).toFixed(1)}
/>
}
/>
...
...
@@ -12004,7 +12008,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[13], tableMeta, 13)
).toFixed(1)}
value={Number(
tableMeta.rowData[13]
).toFixed(1)}
/>
}
/>
...
...
@@ -12027,7 +12031,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[14], tableMeta, 14)
).toFixed(1)}
value={Number(
tableMeta.rowData[14]
).toFixed(1)}
/>
}
/>
...
...
@@ -12052,7 +12056,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[15], tableMeta, 15)
).toFixed(1)}
value={Number(
tableMeta.rowData[15]
).toFixed(1)}
/>
}
/>
...
...
@@ -12075,7 +12079,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[16], tableMeta, 16)
).toFixed(1)}
value={Number(
tableMeta.rowData[16]
).toFixed(1)}
/>
}
/>
...
...
@@ -12098,7 +12102,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[17], tableMeta, 17)
).toFixed(1)}
value={Number(
tableMeta.rowData[17]
).toFixed(1)}
/>
}
/>
...
...
@@ -12121,7 +12125,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
handleValueFormulaCF(tableMeta.rowData[18], tableMeta, 18)
).toFixed(1)}
value={Number(
tableMeta.rowData[18]
).toFixed(1)}
/>
}
/>
...
...
@@ -12138,7 +12142,7 @@ export default class TableSubHolding extends Component {
name: `${Number(this.props.periode) + 1}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<th style={{ ...style2, backgroundColor: '#1c71b8',
zIndex: 102,
color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, paddingTop: 8 }}>{columnMeta.name}</div>
{/* <div className="" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky", paddingBottom: 20 }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
...
...
@@ -12166,7 +12170,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
2021
).toFixed(1)}
value={Number(
tableMeta.rowData[20]
).toFixed(1)}
/>
}
/>
...
...
@@ -12180,7 +12184,7 @@ export default class TableSubHolding extends Component {
name: `${Number(this.props.periode) + 2}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<th style={{ ...style2, backgroundColor: '#1c71b8',
zIndex: 102,
color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, paddingTop: 8 }}>{columnMeta.name}</div>
{/* <div className="" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky", paddingBottom: 20 }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
...
...
@@ -12208,7 +12212,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
2021
).toFixed(1)}
value={Number(
tableMeta.rowData[21]
).toFixed(1)}
/>
}
/>
...
...
@@ -12298,7 +12302,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
1
).toFixed(1)}
value={Number(
tableMeta.rowData[26]
).toFixed(1)}
/>
}
/>
...
...
@@ -12321,7 +12325,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
2
).toFixed(1)}
value={Number(
tableMeta.rowData[27]
).toFixed(1)}
/>
}
/>
...
...
@@ -12344,7 +12348,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
3
).toFixed(1)}
value={Number(
tableMeta.rowData[28]
).toFixed(1)}
/>
}
/>
...
...
@@ -12367,7 +12371,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
4
).toFixed(1)}
value={Number(
tableMeta.rowData[29]
).toFixed(1)}
/>
}
/>
...
...
@@ -12392,7 +12396,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
5
).toFixed(1)}
value={Number(
tableMeta.rowData[30]
).toFixed(1)}
/>
}
/>
...
...
@@ -12415,7 +12419,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
6
).toFixed(1)}
value={Number(
tableMeta.rowData[31]
).toFixed(1)}
/>
}
/>
...
...
@@ -12438,7 +12442,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
7
).toFixed(1)}
value={Number(
tableMeta.rowData[32]
).toFixed(1)}
/>
}
/>
...
...
@@ -12461,7 +12465,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
8
).toFixed(1)}
value={Number(
tableMeta.rowData[33]
).toFixed(1)}
/>
}
/>
...
...
@@ -12486,7 +12490,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
9
).toFixed(1)}
value={Number(
tableMeta.rowData[34]
).toFixed(1)}
/>
}
/>
...
...
@@ -12509,7 +12513,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
10
).toFixed(1)}
value={Number(
tableMeta.rowData[35]
).toFixed(1)}
/>
}
/>
...
...
@@ -12532,7 +12536,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
11
).toFixed(1)}
value={Number(
tableMeta.rowData[36]
).toFixed(1)}
/>
}
/>
...
...
@@ -12555,7 +12559,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
12
).toFixed(1)}
value={Number(
tableMeta.rowData[37]
).toFixed(1)}
/>
}
/>
...
...
@@ -12648,7 +12652,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
1
).toFixed(1)}
value={Number(
tableMeta.rowData[38]
).toFixed(1)}
/>
}
/>
...
...
@@ -12671,7 +12675,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
2
).toFixed(1)}
value={Number(
tableMeta.rowData[39]
).toFixed(1)}
/>
}
/>
...
...
@@ -12694,7 +12698,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
3
).toFixed(1)}
value={Number(
tableMeta.rowData[40]
).toFixed(1)}
/>
}
/>
...
...
@@ -12717,7 +12721,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
4
).toFixed(1)}
value={Number(
tableMeta.rowData[41]
).toFixed(1)}
/>
}
/>
...
...
@@ -12742,7 +12746,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
5
).toFixed(1)}
value={Number(
tableMeta.rowData[42]
).toFixed(1)}
/>
}
/>
...
...
@@ -12765,7 +12769,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
6
).toFixed(1)}
value={Number(
tableMeta.rowData[43]
).toFixed(1)}
/>
}
/>
...
...
@@ -12788,7 +12792,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
7
).toFixed(1)}
value={Number(
tableMeta.rowData[44]
).toFixed(1)}
/>
}
/>
...
...
@@ -12811,7 +12815,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
8
).toFixed(1)}
value={Number(
tableMeta.rowData[45]
).toFixed(1)}
/>
}
/>
...
...
@@ -12836,7 +12840,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
9
).toFixed(1)}
value={Number(
tableMeta.rowData[46]
).toFixed(1)}
/>
}
/>
...
...
@@ -12859,7 +12863,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
10
).toFixed(1)}
value={Number(
tableMeta.rowData[47]
).toFixed(1)}
/>
}
/>
...
...
@@ -12882,7 +12886,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
11
).toFixed(1)}
value={Number(
tableMeta.rowData[48]
).toFixed(1)}
/>
}
/>
...
...
@@ -12905,7 +12909,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
12
).toFixed(1)}
value={Number(
tableMeta.rowData[49]
).toFixed(1)}
/>
}
/>
...
...
@@ -14610,6 +14614,241 @@ 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: "",
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: "",
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: "",
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: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
},
]
src/container/MonthlyReport.js
View file @
a0cb23e1
...
...
@@ -217,11 +217,18 @@ export default class MonthlyReport extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
indexC
=
String
(
item
.
current_status
).
toLocaleUpperCase
().
indexOf
(
'C'
)
let
status_approv
=
''
if
(
String
(
item
.
current_status
).
toLocaleUpperCase
().
includes
(
'CC'
))
{
status_approv
=
`
${
String
(
item
.
current_status
).
substr
(
0
,
indexC
)}${
String
(
item
.
current_status
).
substr
(
indexC
+
1
,
String
(
item
.
current_status
).
length
)}
`
}
else
{
status_approv
=
String
(
item
.
current_status
)
}
return
[
item
.
number
,
item
.
report_name
==
"CAT"
?
"Corporate Annual Target"
:
item
.
report_name
,
item
.
revision
,
this
.
state
.
isApprovedMB
?
(
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
)
:
"CLOSED"
,
this
.
state
.
isApprovedMB
?
(
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
status_approv
)
:
"CLOSED"
,
item
.
report_id
,
item
.
is_can_upload
,
item
.
revision
...
...
@@ -661,9 +668,16 @@ export default class MonthlyReport extends Component {
if
(
response
.
data
.
data
)
{
if
(
response
.
data
.
data
.
length
>
0
)
{
let
dataTableHistory
=
response
.
data
.
data
.
map
(
item
=>
{
let
indexC
=
String
(
item
.
status_approval
).
toLocaleUpperCase
().
indexOf
(
'C'
)
let
status_approv
=
''
if
(
String
(
item
.
status_approval
).
toLocaleUpperCase
().
includes
(
'CC'
))
{
status_approv
=
`
${
String
(
item
.
status_approval
).
substr
(
0
,
indexC
)}${
String
(
item
.
status_approval
).
substr
(
indexC
+
1
,
String
(
item
.
status_approval
).
length
)}
`
}
else
{
status_approv
=
String
(
item
.
status_approval
)
}
return
[
item
.
pic
,
item
.
status_approval
,
status_approv
,
item
.
remarks
,
item
.
item_revision
,
item
.
history_approval_date
...
...
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