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
b13ea830
Commit
b13ea830
authored
Oct 13, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleansing
parent
397067a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-1
HomePage.js
src/container/HomePage.js
+23
-7
No files found.
src/container/BudgetTahunan.js
View file @
b13ea830
...
@@ -372,7 +372,7 @@ export default class BudgetTahunan extends Component {
...
@@ -372,7 +372,7 @@ 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
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
submissionID
:
response
.
data
.
data
.
submission_id
,
submissionID
:
response
.
data
.
data
.
submission_id
,
...
...
src/container/HomePage.js
View file @
b13ea830
...
@@ -6,6 +6,7 @@ import DonutChart from 'react-d3-donut';
...
@@ -6,6 +6,7 @@ import DonutChart from 'react-d3-donut';
import
Constant
from
'../library/Constant'
;
import
Constant
from
'../library/Constant'
;
import
api
from
'../api'
;
import
api
from
'../api'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
PropagateLoader
}
from
'react-spinners'
;
var
ct
=
require
(
"../library/CustomTable"
);
var
ct
=
require
(
"../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -26,11 +27,13 @@ class HomePage extends Component {
...
@@ -26,11 +27,13 @@ class HomePage extends Component {
listSubcoMB
:
[],
listSubcoMB
:
[],
valueSubmit
:
0
,
valueSubmit
:
0
,
listdmb
:
[],
listdmb
:
[],
dataTableMB
:
[]
dataTableMB
:
[],
loading
:
false
}
}
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
setState
({
loading
:
true
})
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -51,8 +54,6 @@ class HomePage extends Component {
...
@@ -51,8 +54,6 @@ class HomePage extends Component {
// }
// }
// })
// })
this
.
getApprMat
()
this
.
getApprMat
()
this
.
getListUserSubco
()
this
.
getDashboardMB
()
}
}
componentDidUpdate
()
{
componentDidUpdate
()
{
...
@@ -75,7 +76,8 @@ class HomePage extends Component {
...
@@ -75,7 +76,8 @@ class HomePage extends Component {
})
})
this
.
setState
({
this
.
setState
({
listSubcoMB
:
response
.
data
.
data
,
listSubcoMB
:
response
.
data
.
data
,
valueSubmit
valueSubmit
,
loading
:
false
})
})
}
}
}
}
...
@@ -109,15 +111,17 @@ class HomePage extends Component {
...
@@ -109,15 +111,17 @@ class HomePage extends Component {
let
indexId
=
actAM
.
findIndex
((
val
)
=>
val
.
user_id
==
userId
)
let
indexId
=
actAM
.
findIndex
((
val
)
=>
val
.
user_id
==
userId
)
if
(
indexId
===
-
1
)
{
if
(
indexId
===
-
1
)
{
this
.
setState
({
isApprover
:
false
})
this
.
setState
({
isApprover
:
false
})
this
.
getListUserSubco
()
}
}
this
.
getDashboardMB
()
console
.
log
(
actAM
)
console
.
log
(
actAM
)
})
})
}
}
getDashboardMB
()
{
getDashboardMB
()
{
api
.
create
().
getDashboardMB
().
then
((
response
)
=>
{
api
.
create
().
getDashboardMB
().
then
((
response
)
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
if
(
String
(
response
.
data
.
status
).
toLocaleLowerCase
()
==
'success'
)
{
if
(
String
(
response
.
data
.
status
).
toLocaleLowerCase
()
==
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
listdmb
=
data
.
sort
((
a
,
b
)
=>
a
.
company_id
-
b
.
company_id
).
map
((
item
,
index
)
=>
{
let
listdmb
=
data
.
sort
((
a
,
b
)
=>
a
.
company_id
-
b
.
company_id
).
map
((
item
,
index
)
=>
{
return
[
return
[
...
@@ -126,12 +130,23 @@ class HomePage extends Component {
...
@@ -126,12 +130,23 @@ class HomePage extends Component {
item
.
operating_indicator
item
.
operating_indicator
]
]
})
})
this
.
setState
({
dataTableMB
:
listdmb
})
this
.
setState
({
dataTableMB
:
listdmb
,
loading
:
false
})
}
}
})
})
}
}
render
()
{
render
()
{
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'absolute'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
// css={override}
size
=
{
20
}
color
=
{
"#274B80"
}
loading
=
{
this
.
state
.
loading
}
/
>
<
/div
>
);
const
columns
=
[
"#"
,
"ID"
,
"Nama Perusahaan"
,
"Jenis Report"
,
"Revisi"
,
"Status"
,
{
const
columns
=
[
"#"
,
"ID"
,
"Nama Perusahaan"
,
"Jenis Report"
,
"Revisi"
,
"Status"
,
{
name
:
"Action"
,
name
:
"Action"
,
options
:
{
options
:
{
...
@@ -213,6 +228,7 @@ class HomePage extends Component {
...
@@ -213,6 +228,7 @@ class HomePage extends Component {
}]
}]
return
(
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
{
this
.
state
.
isApprover
===
true
?
{
this
.
state
.
isApprover
===
true
?
<
div
>
<
div
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
...
...
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