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
c20dcfed
Commit
c20dcfed
authored
Oct 02, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
aprove See merge request
!419
parents
727554d7
2e4f445c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
BudgetTahunan.js
src/container/BudgetTahunan.js
+18
-7
No files found.
src/container/BudgetTahunan.js
View file @
c20dcfed
...
...
@@ -59,7 +59,8 @@ export default class BudgetTahunan extends Component {
pic
:
''
,
submitter
:
false
,
detailRevisiCheck
:
[],
lastRevision
:
""
lastRevision
:
""
,
checkApprover
:
false
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
...
...
@@ -81,10 +82,10 @@ export default class BudgetTahunan extends Component {
api
.
create
().
checkApprover
().
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
this
.
setState
({
isApprover
:
true
},
()
=>
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
},
()
=>
this
.
getDetailUser
())
}
else
{
this
.
setState
({
isApprover
:
false
},
()
=>
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
},
()
=>
this
.
getDetailUser
())
}
})
...
...
@@ -273,11 +274,21 @@ export default class BudgetTahunan extends Component {
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
,
loading
:
false
,
lastRevision
:
response
.
data
.
data
.
last_revision
lastRevision
:
response
.
data
.
data
.
last_revision
,
},
()
=>
{
console
.
log
(
this
.
state
.
lastStatus
);
this
.
historyApproval
()
this
.
getReport
()
this
.
getReportAttachment
()
api
.
create
().
checkApprover
().
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
})
}
else
{
this
.
setState
({
isApprover
:
this
.
state
.
lastStatus
===
"SUBMITTED"
?
true
:
false
,
checkApprover
:
false
})
}
})
})
}
else
{
this
.
setState
({
submissionID
:
null
,
loading
:
null
})
...
...
@@ -842,7 +853,7 @@ export default class BudgetTahunan extends Component {
this
.
state
.
listAttachment
.
map
((
item
,
index
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
'13px'
,
color
:
'#4b4b4b'
,
width
:
25
}}
>
{
index
+
1
}.
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'13px'
,
color
:
'#4b4b4b'
,
width
:
25
}}
>
{
index
+
1
}.
<
/Typography
>
<
button
style
=
{{
...
...
@@ -888,7 +899,7 @@ export default class BudgetTahunan extends Component {
}
<
/div
>
<
/div
>
{
this
.
state
.
is
Approver
===
true
?
{
this
.
state
.
check
Approver
===
true
?
this
.
state
.
lastStatus
===
'WAITING FOR REVIEW'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
this
.
state
.
lastStatus
}
<
/span
>
...
...
@@ -926,7 +937,7 @@ export default class BudgetTahunan extends Component {
<
/div
>
)}
<
/div
>
{
this
.
state
.
is
Approver
===
true
?
{
this
.
state
.
check
Approver
===
true
?
this
.
state
.
lastStatus
===
'WAITING FOR REVIEW'
?
<
div
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
...
...
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