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
6719d428
Commit
6719d428
authored
Oct 09, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
hp See merge request
!493
parents
3d1f3560
6753ee3c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
12 deletions
+30
-12
AllDocument.js
src/container/DocumentManagement/AllDocument.js
+0
-2
HomePage.js
src/container/HomePage.js
+30
-10
No files found.
src/container/DocumentManagement/AllDocument.js
View file @
6719d428
...
...
@@ -34,8 +34,6 @@ export default class getAllDocument extends Component {
componentDidMount
()
{
this
.
getData
()
console
.
log
(
this
.
props
.
allsubcoEdit
)
console
.
log
(
this
.
props
.
btnedit
)
}
componentWillReceiveProps
(
props
)
{
...
...
src/container/HomePage.js
View file @
6719d428
...
...
@@ -21,7 +21,8 @@ class HomePage extends Component {
{
nama
:
'Puninar Infinite Raya'
,
status
:
'complete'
},
{
nama
:
'Dharma Group'
,
status
:
'overdue'
},
{
nama
:
'Daya Group'
,
status
:
'open'
},
]
],
isApprover
:
true
}
}
...
...
@@ -36,15 +37,16 @@ class HomePage extends Component {
}
}
})
api
.
create
().
checkApprover
().
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
this
.
setState
({
isApprover
:
true
},
()
=>
this
.
getDashboard
())
}
else
{
this
.
setState
({
isApprover
:
false
})
}
})
// api.create().checkApprover().then(response => {
// console.log(response);
// if (response.data.data.is_approver === true) {
// this.setState({ isApprover: true }, () =>
// this.getDashboard())
// } else {
// this.setState({ isApprover: false })
// }
// })
this
.
getApprMat
()
}
componentDidUpdate
()
{
...
...
@@ -68,6 +70,24 @@ class HomePage extends Component {
})
}
getApprMat
()
{
api
.
create
().
getAM
().
then
((
response
)
=>
{
console
.
log
(
response
);
let
actAM
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
String
(
item
.
status
).
toLocaleLowerCase
()
==
'active'
){
return
item
}
})
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
indexId
=
actAM
.
findIndex
((
val
)
=>
val
.
user_id
==
userId
)
if
(
indexId
===
-
1
){
this
.
setState
({
isApprover
:
false
})
}
console
.
log
(
actAM
)
})
}
render
()
{
const
columns
=
[
"#"
,
"ID"
,
"Nama Perusahaan"
,
"Jenis Report"
,
"Revisi"
,
"Status"
,
{
name
:
"Action"
,
...
...
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