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
212abc9f
Commit
212abc9f
authored
Sep 29, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
f7ad9481
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
59 deletions
+74
-59
Home.js
src/container/Home.js
+5
-2
HomePage.js
src/container/HomePage.js
+24
-24
OperatingIndicatorDetail.js
src/container/OprIndicator/OperatingIndicatorDetail.js
+45
-33
No files found.
src/container/Home.js
View file @
212abc9f
...
@@ -26,7 +26,7 @@ import {
...
@@ -26,7 +26,7 @@ import {
Route
,
Route
,
Link
,
Link
,
useParams
,
useParams
,
useRouteMatch
useRouteMatch
,
useLocation
}
from
"react-router-dom"
;
}
from
"react-router-dom"
;
import
Images
from
'../assets/Images'
;
import
Images
from
'../assets/Images'
;
import
{
FadeMenu
,
Footer
,
UseWindowDimensions
}
from
'../Utils/Index'
;
import
{
FadeMenu
,
Footer
,
UseWindowDimensions
}
from
'../Utils/Index'
;
...
@@ -144,6 +144,7 @@ const useStyles = makeStyles((theme) => ({
...
@@ -144,6 +144,7 @@ const useStyles = makeStyles((theme) => ({
}));
}));
export
default
function
MiniDrawer
()
{
export
default
function
MiniDrawer
()
{
let
location
=
useLocation
();
const
classes
=
useStyles
();
const
classes
=
useStyles
();
const
theme
=
useTheme
();
const
theme
=
useTheme
();
const
[
open
,
setOpen
]
=
React
.
useState
(
false
);
const
[
open
,
setOpen
]
=
React
.
useState
(
false
);
...
@@ -401,6 +402,7 @@ export default function MiniDrawer() {
...
@@ -401,6 +402,7 @@ export default function MiniDrawer() {
const
selectIndex
=
(
e
)
=>
{
const
selectIndex
=
(
e
)
=>
{
setSelectSub
(
""
)
setSelectSub
(
""
)
setSelectedIndex
(
e
)
setSelectedIndex
(
e
)
// alert(e)
// if (open === false) {
// if (open === false) {
// setOpen(true)
// setOpen(true)
// }
// }
...
@@ -652,7 +654,8 @@ export default function MiniDrawer() {
...
@@ -652,7 +654,8 @@ export default function MiniDrawer() {
key
=
{
index
}
key
=
{
index
}
path
=
{
route
.
path
}
path
=
{
route
.
path
}
// exact={route.exact}
// exact={route.exact}
children
=
{
<
route
.
main
height
=
{
height
}
width
=
{
width
}
open
=
{
open
}
/>
}
location
=
{
location
}
children
=
{
<
route
.
main
height
=
{
height
}
width
=
{
width
}
open
=
{
open
}
location
=
{
location
}
selectIndex
=
{
selectIndex
.
bind
(
this
)}
/>
}
/>
/>
))}
))}
<
/Switch
>
<
/Switch
>
...
...
src/container/HomePage.js
View file @
212abc9f
...
@@ -5,6 +5,7 @@ import Images from '../assets/Images';
...
@@ -5,6 +5,7 @@ import Images from '../assets/Images';
import
DonutChart
from
'react-d3-donut'
;
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'
;
var
ct
=
require
(
"../library/CustomTable"
);
var
ct
=
require
(
"../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -32,6 +33,13 @@ class HomePage extends Component {
...
@@ -32,6 +33,13 @@ class HomePage extends Component {
this
.
getDashboard
()
this
.
getDashboard
()
}
}
componentDidUpdate
(){
window
.
onpopstate
=
e
=>
{
//your code...
this
.
props
.
selectIndex
(
'Home'
)
}
}
getDashboard
()
{
getDashboard
()
{
let
listDashboard
=
[]
let
listDashboard
=
[]
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
...
@@ -52,6 +60,7 @@ class HomePage extends Component {
...
@@ -52,6 +60,7 @@ class HomePage extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Link
to
=
{{
pathname
:
`/home/master-budget/`
,
state
:
{
userType
:
'approver'
}}}
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
@@ -63,16 +72,7 @@ class HomePage extends Component {
...
@@ -63,16 +72,7 @@ class HomePage extends Component {
>
>
<
img
src
=
{
Images
.
editCopy2
}
/
>
<
img
src
=
{
Images
.
editCopy2
}
/
>
<
/button
>
<
/button
>
<
button
<
/Link
>
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
/button
>
<
/div
>
<
/div
>
);
);
}
}
...
@@ -126,11 +126,11 @@ class HomePage extends Component {
...
@@ -126,11 +126,11 @@ class HomePage extends Component {
return
(
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
<
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
}}
>
<
Typography
style
=
{{
fontSize
:
'24px'
,
color
:
'white'
}}
>
{
this
.
state
.
userData
===
null
?
''
:
`
Selamat Datang
,
${
this
.
state
.
userData
.
fullname
}
!`
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'24px'
,
color
:
'white'
}}
>
{
this
.
state
.
userData
===
null
?
''
:
`
Welcome
,
${
this
.
state
.
userData
.
fullname
}
!`
}
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
color
:
'#656565'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
}}
>
Menunggu
Persetujuan
Anda
<
/Typography
>
<
Typography
style
=
{{
color
:
'#656565'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
}}
>
Waiting
Your
Submission
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -138,7 +138,7 @@ class HomePage extends Component {
...
@@ -138,7 +138,7 @@ class HomePage extends Component {
<
div
>
<
div
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
this
.
state
.
listDashboard
}
data
=
{
data
}
columns
=
{
columns
}
columns
=
{
columns
}
options
=
{
options
}
options
=
{
options
}
/
>
/
>
...
...
src/container/OprIndicator/OperatingIndicatorDetail.js
View file @
212abc9f
This diff is collapsed.
Click to expand it.
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