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
ca744adf
Commit
ca744adf
authored
Oct 01, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bs
parent
d4cfa24a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
909 additions
and
38 deletions
+909
-38
BudgetTahunan.js
src/container/BudgetTahunan.js
+12
-16
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+897
-22
No files found.
src/container/BudgetTahunan.js
View file @
ca744adf
...
...
@@ -220,7 +220,6 @@ export default class BudgetTahunan extends Component {
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
year
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
getRevision
()
this
.
getSubmission
()
})
}
}
...
...
@@ -247,8 +246,7 @@ export default class BudgetTahunan extends Component {
getOptionLabel
:
(
option
)
=>
option
.
revision
,
};
this
.
setState
({
listRevision
:
defaultProps
,
revision
:
revisionData
[
0
]
},
()
=>
{
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getSubmission
()
})
}
}
...
...
@@ -256,6 +254,7 @@ export default class BudgetTahunan extends Component {
}
getSubmission
()
{
this
.
setState
({
loading
:
true
})
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
...
...
@@ -264,20 +263,20 @@ export default class BudgetTahunan extends Component {
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
)
{
if
(
response
.
data
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
submissionID
:
response
.
data
.
data
.
submission_id
,
isSubmit
:
false
,
submitter
:
response
.
data
.
data
.
submitter
,
approverID
:
response
.
data
.
data
.
approve_id
,
pic
:
response
.
data
.
data
.
approver
==
null
?
''
:
response
.
data
.
data
.
approver
,
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
,
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
})
this
.
historyApproval
()
this
.
getReport
()
this
.
getReportAttachment
()
})
}
else
{
this
.
setState
({
submissionID
:
null
})
this
.
setState
({
submissionID
:
null
,
loading
:
null
})
}
}
})
...
...
@@ -306,7 +305,6 @@ export default class BudgetTahunan extends Component {
}
approvalSubmission
(
type
)
{
this
.
setState
({
loading
:
true
})
let
body
=
{
"approval_id"
:
this
.
props
.
location
.
state
==
undefined
?
this
.
state
.
approverID
:
this
.
state
.
rawData
.
approval_id
,
"status"
:
type
,
...
...
@@ -456,7 +454,7 @@ export default class BudgetTahunan extends Component {
})
}
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
})
}
...
...
@@ -576,9 +574,9 @@ export default class BudgetTahunan extends Component {
borderColor
:
'transparent'
}}
onClick
=
{()
=>
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
}
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
...
...
@@ -742,9 +740,8 @@ export default class BudgetTahunan extends Component {
{...
this
.
state
.
listPeriode
}
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
this
.
getSubmission
()
})}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
disableClearable
...
...
@@ -761,9 +758,8 @@ export default class BudgetTahunan extends Component {
id
=
"company"
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
this
.
getSubmission
()
})}
disableClearable
style
=
{{
width
:
250
}}
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
ca744adf
This diff is collapsed.
Click to expand it.
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