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
6bdb2085
Commit
6bdb2085
authored
Mar 24, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
approver issue
parent
2572c15b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
index.js
src/api/index.js
+1
-1
RollingOutlook.js
src/container/RollingOutlook.js
+6
-4
No files found.
src/api/index.js
View file @
6bdb2085
...
@@ -248,7 +248,7 @@ const create = (type = "") => {
...
@@ -248,7 +248,7 @@ const create = (type = "") => {
const
getRollingOutlookReport
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_all_report'
,
body
)
const
getRollingOutlookReport
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_all_report'
,
body
)
const
getRollingOutlookLastUpdate
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_latest_update'
,
body
)
const
getRollingOutlookLastUpdate
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_latest_update'
,
body
)
const
getRollingOutlookRevision
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_revision'
,
body
)
const
getRollingOutlookRevision
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_revision'
,
body
)
const
getRollingOutlookIsApprover
=
(
body
)
=>
api
.
get
(
'transaction/rolling_outlook/is_approver'
)
const
getRollingOutlookIsApprover
=
(
body
)
=>
api
.
get
(
'transaction/rolling_outlook/is_approver'
,
body
)
const
uploadAttachmentRO
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/upload_attachment'
,
body
)
const
uploadAttachmentRO
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/upload_attachment'
,
body
)
const
deleteAttachmentRO
=
(
id
)
=>
api
.
post
(
`transaction/rolling_outlook/delete_attachment/
${
id
}
`
)
const
deleteAttachmentRO
=
(
id
)
=>
api
.
post
(
`transaction/rolling_outlook/delete_attachment/
${
id
}
`
)
...
...
src/container/RollingOutlook.js
View file @
6bdb2085
...
@@ -124,6 +124,7 @@ export default class RollingOutlook extends Component {
...
@@ -124,6 +124,7 @@ export default class RollingOutlook extends Component {
}
}
checkApprover
()
{
checkApprover
()
{
// console.log('tot')
let
listStatus1
=
[
let
listStatus1
=
[
{
name
:
'Open'
,
value
:
'not-yet'
},
{
name
:
'Open'
,
value
:
'not-yet'
},
{
name
:
'Submitted'
,
value
:
'approval_review'
},
{
name
:
'Submitted'
,
value
:
'approval_review'
},
...
@@ -138,6 +139,7 @@ export default class RollingOutlook extends Component {
...
@@ -138,6 +139,7 @@ export default class RollingOutlook extends Component {
]
]
api
.
create
().
getRollingOutlookIsApprover
().
then
(
response
=>
{
api
.
create
().
getRollingOutlookIsApprover
().
then
(
response
=>
{
// console.log('yuuuu')
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
,
listStatus
:
listStatus1
,
selectedStatus
:
listStatus1
},
()
=>
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
,
listStatus
:
listStatus1
,
selectedStatus
:
listStatus1
},
()
=>
...
@@ -533,15 +535,15 @@ export default class RollingOutlook extends Component {
...
@@ -533,15 +535,15 @@ export default class RollingOutlook extends Component {
console
.
log
(
this
.
state
.
lastStatus
);
console
.
log
(
this
.
state
.
lastStatus
);
this
.
historyApproval
()
this
.
historyApproval
()
this
.
getLatestPeriodSubmit
()
this
.
getLatestPeriodSubmit
()
api
.
create
().
checkApprover
().
then
(
response
=>
{
//
api.create().checkApprover().then(response => {
//
console.log(response);
//
console.log(response);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
if
(
this
.
state
.
isApprover
)
{
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
})
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
})
}
else
{
}
else
{
this
.
setState
({
isApprover
:
this
.
state
.
lastStatus
===
"SUBMITTED"
?
true
:
false
,
checkApprover
:
false
})
this
.
setState
({
isApprover
:
this
.
state
.
lastStatus
===
"SUBMITTED"
?
true
:
false
,
checkApprover
:
false
})
}
}
})
//
})
})
})
}
else
{
}
else
{
this
.
setState
({
rollingOutlookID
:
null
,
loading
:
false
})
this
.
setState
({
rollingOutlookID
:
null
,
loading
:
false
})
...
...
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