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
Show 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 {
...
@@ -220,7 +220,6 @@ export default class BudgetTahunan extends Component {
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
year
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
year
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
getRevision
()
this
.
getRevision
()
this
.
getSubmission
()
})
})
}
}
}
}
...
@@ -247,8 +246,7 @@ export default class BudgetTahunan extends Component {
...
@@ -247,8 +246,7 @@ export default class BudgetTahunan extends Component {
getOptionLabel
:
(
option
)
=>
option
.
revision
,
getOptionLabel
:
(
option
)
=>
option
.
revision
,
};
};
this
.
setState
({
listRevision
:
defaultProps
,
revision
:
revisionData
[
0
]
},
()
=>
{
this
.
setState
({
listRevision
:
defaultProps
,
revision
:
revisionData
[
0
]
},
()
=>
{
this
.
getReport
()
this
.
getSubmission
()
this
.
getReportAttachment
()
})
})
}
}
}
}
...
@@ -256,6 +254,7 @@ export default class BudgetTahunan extends Component {
...
@@ -256,6 +254,7 @@ export default class BudgetTahunan extends Component {
}
}
getSubmission
()
{
getSubmission
()
{
this
.
setState
({
loading
:
true
})
let
payload
=
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"periode"
:
this
.
state
.
periode
.
periode
,
...
@@ -264,20 +263,20 @@ export default class BudgetTahunan extends Component {
...
@@ -264,20 +263,20 @@ export default class BudgetTahunan extends Component {
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
)
{
if
(
response
)
{
if
(
response
.
data
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
submissionID
:
response
.
data
.
data
.
submission_id
,
isSubmit
:
false
,
submissionID
:
response
.
data
.
data
.
submission_id
,
isSubmit
:
false
,
submitter
:
response
.
data
.
data
.
submitter
,
submitter
:
response
.
data
.
data
.
submitter
,
approverID
:
response
.
data
.
data
.
approve_id
,
pic
:
response
.
data
.
data
.
approver
==
null
?
''
:
response
.
data
.
data
.
approver
,
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
.
historyApproval
()
this
.
getReport
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getReportAttachment
()
})
})
}
else
{
}
else
{
this
.
setState
({
submissionID
:
null
})
this
.
setState
({
submissionID
:
null
,
loading
:
null
})
}
}
}
}
})
})
...
@@ -306,7 +305,6 @@ export default class BudgetTahunan extends Component {
...
@@ -306,7 +305,6 @@ export default class BudgetTahunan extends Component {
}
}
approvalSubmission
(
type
)
{
approvalSubmission
(
type
)
{
this
.
setState
({
loading
:
true
})
let
body
=
{
let
body
=
{
"approval_id"
:
this
.
props
.
location
.
state
==
undefined
?
this
.
state
.
approverID
:
this
.
state
.
rawData
.
approval_id
,
"approval_id"
:
this
.
props
.
location
.
state
==
undefined
?
this
.
state
.
approverID
:
this
.
state
.
rawData
.
approval_id
,
"status"
:
type
,
"status"
:
type
,
...
@@ -456,7 +454,7 @@ export default class BudgetTahunan extends Component {
...
@@ -456,7 +454,7 @@ export default class BudgetTahunan extends Component {
})
})
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
this
.
getSubmission
()
})
})
}
}
...
@@ -742,9 +740,8 @@ export default class BudgetTahunan extends Component {
...
@@ -742,9 +740,8 @@ export default class BudgetTahunan extends Component {
{...
this
.
state
.
listPeriode
}
{...
this
.
state
.
listPeriode
}
id
=
"periode"
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
this
.
getRevision
()
this
.
getSubmission
()
})}
})}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
disableClearable
disableClearable
...
@@ -761,9 +758,8 @@ export default class BudgetTahunan extends Component {
...
@@ -761,9 +758,8 @@ export default class BudgetTahunan extends Component {
id
=
"company"
id
=
"company"
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
this
.
getRevision
()
this
.
getSubmission
()
})}
})}
disableClearable
disableClearable
style
=
{{
width
:
250
}}
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