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
d6a86898
Commit
d6a86898
authored
Mar 29, 2021
by
Rifka Kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
home if else approver See merge request
!1364
parents
a718c6df
4168e0d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
13 deletions
+30
-13
HomePage.js
src/container/HomePage.js
+30
-13
No files found.
src/container/HomePage.js
View file @
d6a86898
...
@@ -558,6 +558,10 @@ class HomePage extends Component {
...
@@ -558,6 +558,10 @@ class HomePage extends Component {
let
rawData
=
[]
let
rawData
=
[]
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
console
.
log
(
this
.
state
.
isApproverMB
);
console
.
log
(
this
.
state
.
isApproverMR
);
console
.
log
(
this
.
state
.
isApproverRO
);
console
.
log
(
this
.
state
.
isApproverOL
);
if
(
String
(
response
.
data
.
status
).
toLocaleLowerCase
()
==
'success'
)
{
if
(
String
(
response
.
data
.
status
).
toLocaleLowerCase
()
==
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
data
.
map
((
item
,
index
)
=>
{
data
.
map
((
item
,
index
)
=>
{
...
@@ -569,26 +573,39 @@ class HomePage extends Component {
...
@@ -569,26 +573,39 @@ class HomePage extends Component {
}
else
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"monthly"
))
{
}
else
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"monthly"
))
{
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
rawData
.
push
(
item
)
rawData
.
push
(
item
)
}
else
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"outlook"
))
{
}
else
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"rolling"
))
{
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
rawData
.
push
(
item
)
}
else
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"pa"
))
{
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
rawData
.
push
(
item
)
rawData
.
push
(
item
)
}
}
}
else
if
(
this
.
state
.
isApproverMB
)
{
}
else
{
if
(
this
.
state
.
isApproverMB
)
{
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"master"
))
{
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"master"
))
{
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
-
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
-
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
rawData
.
push
(
item
)
rawData
.
push
(
item
)
}
}
}
else
if
(
this
.
state
.
isApproverMR
)
{
}
if
(
this
.
state
.
isApproverMR
)
{
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"monthly"
))
{
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"monthly"
))
{
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
rawData
.
push
(
item
)
rawData
.
push
(
item
)
}
}
}
else
if
(
this
.
state
.
isApproverRO
||
this
.
state
.
isApproverOL
)
{
}
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"outlook"
))
{
if
(
this
.
state
.
isApproverRO
)
{
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"rolling"
))
{
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
rawData
.
push
(
item
)
}
}
if
(
this
.
state
.
isApproverOL
)
{
if
(
String
(
item
.
type_report
).
toLocaleLowerCase
().
includes
(
"pa"
))
{
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
rawData
.
push
(
item
)
rawData
.
push
(
item
)
}
}
}
}
}
})
})
this
.
setState
({
listDashboard
,
rawData
})
this
.
setState
({
listDashboard
,
rawData
})
}
}
...
...
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