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
9ee57b0f
Commit
9ee57b0f
authored
Nov 11, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-' into 'master'
fixing revisi sub holding See merge request
!639
parents
961ff3f3
86bad43e
Changes
1
Hide 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 @
9ee57b0f
...
@@ -149,7 +149,8 @@ export default class SubHolding extends Component {
...
@@ -149,7 +149,8 @@ export default class SubHolding extends Component {
// console.log(index)
// console.log(index)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
// this.getDataTable()
// this.getDataTable()
this
.
getSubmission
()
// this.getSubmission()
this
.
getReportType
()
// if (this.state.isApprover === true) {
// if (this.state.isApprover === true) {
// this.getCompanySubmitted()
// this.getCompanySubmitted()
// } else {
// } else {
...
@@ -161,6 +162,42 @@ export default class SubHolding extends Component {
...
@@ -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
()
{
getSubmission
()
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
let
payload
=
{
let
payload
=
{
...
@@ -169,7 +206,7 @@ export default class SubHolding extends Component {
...
@@ -169,7 +206,7 @@ export default class SubHolding extends Component {
"is_approver"
:
true
"is_approver"
:
true
}
}
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
//
console.log(response)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -188,7 +225,7 @@ export default class SubHolding extends Component {
...
@@ -188,7 +225,7 @@ export default class SubHolding extends Component {
getDataTable
()
{
getDataTable
()
{
let
payload
=
{
let
payload
=
{
"report_id"
:
this
.
state
.
report
.
value
,
"report_id"
:
this
.
state
.
report
.
value
,
"revision"
:
this
.
state
.
lastRevision
,
"revision"
:
this
.
state
.
revisionType
,
"periode"
:
this
.
state
.
periode
.
periode
,
"periode"
:
this
.
state
.
periode
.
periode
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"submission_id"
:
this
.
state
.
submissionID
"submission_id"
:
this
.
state
.
submissionID
...
@@ -537,7 +574,7 @@ export default class SubHolding extends Component {
...
@@ -537,7 +574,7 @@ export default class SubHolding extends Component {
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
}
})
})
}
}
}
}
async
downloadAllData
()
{
async
downloadAllData
()
{
...
...
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