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
86bad43e
Commit
86bad43e
authored
Nov 11, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing revisi sub holding
parent
4316692e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
4 deletions
+41
-4
SubHolding.js
src/container/Laporan/SubHolding.js
+41
-4
No files found.
src/container/Laporan/SubHolding.js
View file @
86bad43e
...
...
@@ -149,7 +149,8 @@ export default class SubHolding extends Component {
// console.log(index)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
// this.getDataTable()
this
.
getSubmission
()
// this.getSubmission()
this
.
getReportType
()
// if (this.state.isApprover === true) {
// this.getCompanySubmitted()
// } else {
...
...
@@ -161,6 +162,42 @@ export default class SubHolding extends Component {
})
}
getReportType
()
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"report_type"
:
"Master Budget"
,
}
api
.
create
().
getReportTypeBody
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
this
.
state
.
report
.
value
===
2
)
{
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
report_name
===
'Balance Sheet'
)
{
this
.
setState
({
revisionType
:
item
.
revision
},
()
=>
{
this
.
getSubmission
()
})
}
})
}
else
if
(
this
.
state
.
report
.
value
===
1
)
{
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
report_name
===
'Profit Loss'
)
{
this
.
setState
({
revisionType
:
item
.
revision
},
()
=>
{
this
.
getSubmission
()
})
}
})
}
else
{
this
.
setState
({
revisionType
:
0
},
()
=>
{
this
.
getSubmission
()
})
}
}
}
})
}
getSubmission
()
{
this
.
setState
({
loading
:
true
})
let
payload
=
{
...
...
@@ -169,7 +206,7 @@ export default class SubHolding extends Component {
"is_approver"
:
true
}
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
//
console.log(response)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
...
...
@@ -188,7 +225,7 @@ export default class SubHolding extends Component {
getDataTable
()
{
let
payload
=
{
"report_id"
:
this
.
state
.
report
.
value
,
"revision"
:
this
.
state
.
lastRevision
,
"revision"
:
this
.
state
.
revisionType
,
"periode"
:
this
.
state
.
periode
.
periode
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"submission_id"
:
this
.
state
.
submissionID
...
...
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