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
7b2d71fd
Commit
7b2d71fd
authored
Oct 01, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deps
parent
ca744adf
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
134 additions
and
86 deletions
+134
-86
BudgetTahunan.js
src/container/BudgetTahunan.js
+62
-17
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+72
-69
No files found.
src/container/BudgetTahunan.js
View file @
7b2d71fd
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/BalanceSheet.js
View file @
7b2d71fd
...
@@ -77,7 +77,7 @@ export default class BalanceSheet extends Component {
...
@@ -77,7 +77,7 @@ export default class BalanceSheet extends Component {
})
})
}
}
getItemHierarki
()
{
async
getItemHierarki
()
{
this
.
setState
({
loading
:
true
,
judulColumn
:
null
})
this
.
setState
({
loading
:
true
,
judulColumn
:
null
})
let
payload
=
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
...
@@ -86,51 +86,14 @@ export default class BalanceSheet extends Component {
...
@@ -86,51 +86,14 @@ export default class BalanceSheet extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"submission_id"
:
this
.
props
.
submissionID
"submission_id"
:
this
.
props
.
submissionID
}
}
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
let
response
=
await
api
.
create
().
getDetailReportMB
(
payload
)
console
.
log
(
response
);
console
.
log
(
response
);
let
dataTable
=
[]
let
dataTable
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
balance_sheet
.
total_actual_before
===
null
?
"0"
:
item
.
balance_sheet
.
total_actual_before
===
""
?
"0"
:
item
.
balance_sheet
.
total_actual_before
,
item
.
balance_sheet
.
january
,
item
.
balance_sheet
.
february
,
item
.
balance_sheet
.
march
,
item
.
balance_sheet
.
april
,
item
.
balance_sheet
.
may
,
item
.
balance_sheet
.
june
,
item
.
balance_sheet
.
july
,
item
.
balance_sheet
.
august
,
item
.
balance_sheet
.
september
,
item
.
balance_sheet
.
october
,
item
.
balance_sheet
.
november
,
item
.
balance_sheet
.
december
,
item
.
balance_sheet
.
total_current_year
,
item
.
balance_sheet
.
total_next_year
,
item
.
balance_sheet
.
total_more_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
])
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
}
res
.
map
((
item
,
index
)
=>
{
dataTable
.
push
([
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
item
.
id
,
item
.
id
,
...
@@ -158,19 +121,55 @@ export default class BalanceSheet extends Component {
...
@@ -158,19 +121,55 @@ export default class BalanceSheet extends Component {
item
.
condition_it_should_be
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
item
.
condition_if_wrong
])
])
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
)
}
}
)
}
}
})
}
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
else
{
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
}
})
res
.
map
((
item
,
index
)
=>
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
balance_sheet
.
total_actual_before
===
null
?
"0"
:
item
.
balance_sheet
.
total_actual_before
===
""
?
"0"
:
item
.
balance_sheet
.
total_actual_before
,
item
.
balance_sheet
.
january
,
item
.
balance_sheet
.
february
,
item
.
balance_sheet
.
march
,
item
.
balance_sheet
.
april
,
item
.
balance_sheet
.
may
,
item
.
balance_sheet
.
june
,
item
.
balance_sheet
.
july
,
item
.
balance_sheet
.
august
,
item
.
balance_sheet
.
september
,
item
.
balance_sheet
.
october
,
item
.
balance_sheet
.
november
,
item
.
balance_sheet
.
december
,
item
.
balance_sheet
.
total_current_year
,
item
.
balance_sheet
.
total_next_year
,
item
.
balance_sheet
.
total_more_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
})
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
else
{
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
}
}
handleValue
(
data
)
{
handleValue
(
data
)
{
...
@@ -3116,12 +3115,14 @@ export default class BalanceSheet extends Component {
...
@@ -3116,12 +3115,14 @@ export default class BalanceSheet extends Component {
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
state
.
editable
===
true
?
null
:
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
loading
:
true
},
()
=>
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
state
.
handleTekTekTek
==
1
?
null
:
setTimeout
(()
=>
{
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
uploadBalanceSheet
(
'draft'
)
setTimeout
(()
=>
{
},
100
);
this
.
uploadBalanceSheet
(
'draft'
)
})
},
100
);
})
)
}
}
>
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
...
@@ -3139,12 +3140,14 @@ export default class BalanceSheet extends Component {
...
@@ -3139,12 +3140,14 @@ export default class BalanceSheet extends Component {
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
state
.
editable
===
true
?
null
:
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
loading
:
true
},
()
=>
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
state
.
handleTekTekTek
==
1
?
null
:
setTimeout
(()
=>
{
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
uploadBalanceSheet
(
'submitted'
)
setTimeout
(()
=>
{
},
100
);
this
.
uploadBalanceSheet
(
'submitted'
)
})
},
100
);
})
)
}
}
>
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
...
...
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