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
f0abe878
Commit
f0abe878
authored
Aug 10, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update modal appr matrix
parent
987e37b0
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
639 additions
and
218 deletions
+639
-218
ApprovalMatrix.js
src/container/ApprovalMatrix.js
+0
-215
ApprovalMatrix.js
src/container/ApprovalMatrix/ApprovalMatrix.js
+149
-0
CreateApprovalMatrix.js
src/container/ApprovalMatrix/CreateApprovalMatrix.js
+251
-0
EditApprovalMatrix.js
src/container/ApprovalMatrix/EditApprovalMatrix.js
+236
-0
Array.js
src/library/Array.js
+1
-1
homeRoutes.js
src/router/homeRoutes.js
+2
-2
No files found.
src/container/ApprovalMatrix.js
deleted
100644 → 0
View file @
987e37b0
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
}
from
'@material-ui/core'
;
import
{
Container
,
Row
,
Col
}
from
"react-bootstrap"
;
import
{
makeStyles
,
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core/styles'
;
import
TextField
from
"@material-ui/core/TextField"
;
import
Images
from
'../assets/Images'
;
import
MUIDataTable
from
"mui-datatables"
;
import
Modal
from
'@material-ui/core/Modal'
;
var
ct
=
require
(
"../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
options
=
ct
.
customOptions
();
function
rand
()
{
return
Math
.
round
(
Math
.
random
()
*
20
)
-
10
;
}
function
getModalStyle
()
{
const
top
=
50
+
rand
();
const
left
=
50
+
rand
();
return
{
top
:
`
${
top
}
%`
,
left
:
`
${
left
}
%`
,
transform
:
`translate(-
${
top
}
%, -
${
left
}
%)`
,
};
}
const
useStyles
=
makeStyles
((
theme
)
=>
({
paper
:
{
position
:
'absolute'
,
width
:
400
,
backgroundColor
:
theme
.
palette
.
background
.
paper
,
boxShadow
:
theme
.
shadows
[
5
],
padding
:
theme
.
spacing
(
2
,
4
,
3
),
},
}));
// class ApprovalMatrix extends Component {
// render() {
export
default
function
ApprovalMatrix
()
{
const
classess
=
useStyles
();
const
[
modalStyle
]
=
React
.
useState
(
getModalStyle
);
const
[
open
,
setOpen
]
=
React
.
useState
(
false
);
const
handleOpen
=
()
=>
{
setOpen
(
true
);
};
const
handleClose
=
()
=>
{
setOpen
(
false
);
};
const
showModal
=
(
<
div
className
=
""
style
=
{{
marginTop
:
100
}}
>
<
div
className
=
"popup-content background-white border-radius"
>
<
div
className
=
"popup-panel grid grid-2x"
>
<
div
className
=
"col-1"
style
=
{{
width
:
'140%'
}}
>
<
div
className
=
"popup-title"
>
Test
<
/div
>
<
/div
>
<
div
className
=
"col-2 content-right"
style
=
{{
maxWidth
:
"inherit"
}}
>
<
button
type
=
"button"
className
=
"btn btn-circle btn-grey"
onClick
=
{()
=>
null
}
>
<
i
className
=
"fa fa-lg fa-times"
/>
<
/button
>
<
/div
>
<
/div
>
{
/* <div>
CONTENT
</div> */
}
<
/div
>
<
/div
>
);
const
columns
=
[{
name
:
"Action"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
/button
>
<
/div
>
);
}
}
},
"ID"
,
"Tipe Persetujuan"
,
"Order"
,
"Nama Pemberi Persetujuan"
,
"Operator"
,
"Status"
]
const
data
=
[
[
""
,
"1"
,
"Yearly"
,
"1"
,
"John Doe"
,
"-"
,
"Aktif"
],
[
""
,
"2"
,
"Yearly"
,
"2"
,
"John Doe"
,
"-"
,
"Aktif"
],
[
""
,
"3"
,
"Yearly"
,
"2"
,
"John Doe"
,
"AND"
,
"Aktif"
],
[
""
,
"4"
,
"Yearly"
,
"2"
,
"John Doe"
,
"AND"
,
"Non Aktif"
],
[
""
,
"5"
,
"Yearly"
,
"3"
,
"John Doe"
,
"-"
,
"Non Aktif"
],
]
const
options
=
{
filter
:
false
,
sort
:
true
,
responsive
:
"scroll"
,
print
:
false
,
download
:
false
,
selectableRows
:
false
,
viewColumns
:
false
,
rowsPerPage
:
5
,
search
:
false
}
return
(
<
Container
fluid
style
=
{{
height
:
'100vh'
,
padding
:
0
}}
>
<
div
style
=
{{
height
:
'200px'
,
width
:
'100%'
,
backgroundColor
:
'#354960'
,
padding
:
24
,
paddingTop
:
30
}}
>
<
div
style
=
{{
}}
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
}}
>
<
Typography
style
=
{{
paddingTop
:
8
,
paddingBottom
:
7
,
fontSize
:
'16px'
,
color
:
'white'
}}
>
Master
Data
-
Approval
Matrix
<
/Typography
>
<
form
style
=
{{
}}
>
<
TextField
id
=
""
label
=
""
variant
=
"outlined"
size
=
"small"
placeholder
=
"Search"
style
=
{{
width
:
423
,
backgroundColor
:
'white'
,
borderRadius
:
6
}}
/
>
<
/form
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
padding
:
0
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
16
,
padding
:
0
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
upload
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
16
,
padding
:
0
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
16
,
padding
:
0
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
visualisasi
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
16
,
padding
:
0
}}
onClick
=
{
handleOpen
}
>
<
img
src
=
{
Images
.
add
}
/
>
<
/button
>
<
/div
>
<
Modal
open
=
{
open
}
onClose
=
{
handleClose
}
aria
-
labelledby
=
"simple-modal-title"
aria
-
describedby
=
"simple-modal-description"
>
{
showModal
}
<
/Modal
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
,
width
:
'100%'
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
data
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
/Container
>
);
// }
}
// export default ApprovalMatrix;
src/container/ApprovalMatrix/ApprovalMatrix.js
0 → 100644
View file @
f0abe878
import
React
,
{
Component
}
from
'react'
;
import
{
Container
,
Row
,
Col
}
from
"react-bootstrap"
;
import
{
makeStyles
,
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core/styles'
;
import
TextField
from
"@material-ui/core/TextField"
;
import
Images
from
'../../assets/Images'
;
import
MUIDataTable
from
"mui-datatables"
;
import
CreateApprovalMatrix
from
"./CreateApprovalMatrix"
;
import
EditApprovalMatrix
from
"./EditApprovalMatrix"
;
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
options
=
ct
.
customOptions
();
export
default
class
ApprovalMatrix
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
visibleCreate
:
false
,
visibleEdit
:
false
}
}
componentDidMount
()
{
}
render
()
{
const
columns
=
[{
name
:
"Action"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
editCopy
}
onClick
=
{()
=>
this
.
setState
({
visibleEdit
:
true
})}
/
>
<
/button
>
<
/div
>
);
}
}
},
"ID"
,
"Tipe Persetujuan"
,
"Order"
,
"Nama Pemberi Persetujuan"
,
"Operator"
,
"Status"
]
const
data
=
[
[
""
,
"1"
,
"Yearly"
,
"1"
,
"John Doe"
,
"-"
,
"Aktif"
],
[
""
,
"2"
,
"Yearly"
,
"2"
,
"John Doe"
,
"-"
,
"Aktif"
],
[
""
,
"3"
,
"Yearly"
,
"2"
,
"John Doe"
,
"AND"
,
"Aktif"
],
[
""
,
"4"
,
"Yearly"
,
"2"
,
"John Doe"
,
"AND"
,
"Non Aktif"
],
[
""
,
"5"
,
"Yearly"
,
"3"
,
"John Doe"
,
"-"
,
"Non Aktif"
],
]
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
}}
>
<
div
style
=
{{
height
:
199
,
width
:
'100%'
,
backgroundColor
:
'#354960'
}}
/
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
150
}}
>
<
label
style
=
{{
color
:
'white'
,
width
:
'20%'
,
fontSize
:
16
}}
>
Master
Data
-
Approval
Matrix
<
/label
>
<
form
style
=
{{
}}
>
<
TextField
id
=
""
label
=
""
variant
=
"outlined"
size
=
"small"
placeholder
=
"Search"
style
=
{{
width
:
423
,
backgroundColor
:
'white'
,
borderRadius
:
6
}}
/
>
<
/form
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
padding
:
0
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
16
,
padding
:
0
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
upload
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
16
,
padding
:
0
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
16
,
padding
:
0
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
visualisasi
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
16
,
padding
:
0
}}
>
<
img
src
=
{
Images
.
add
}
onClick
=
{()
=>
this
.
setState
({
visibleCreate
:
true
})}
/
>
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
25
,
width
:
'100%'
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
data
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
{
this
.
state
.
visibleCreate
&&
(
<
CreateApprovalMatrix
onClickClose
=
{()
=>
this
.
setState
({
visibleCreate
:
false
})}
/
>
)}
{
this
.
state
.
visibleEdit
&&
(
<
EditApprovalMatrix
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
/
>
)}
<
/div
>
);
}
}
src/container/ApprovalMatrix/CreateApprovalMatrix.js
0 → 100644
View file @
f0abe878
This diff is collapsed.
Click to expand it.
src/container/ApprovalMatrix/EditApprovalMatrix.js
0 → 100644
View file @
f0abe878
This diff is collapsed.
Click to expand it.
src/library/Array.js
View file @
f0abe878
...
...
@@ -103,7 +103,7 @@ const arraySide = [
{
img
:
''
,
label
:
'Approval Matrix'
,
path
:
'approval'
,
path
:
'approval
-matrix
'
,
subItem
:
null
}
]
...
...
src/router/homeRoutes.js
View file @
f0abe878
...
...
@@ -2,7 +2,7 @@ import screen404 from '../container/Screen404'
import
Beranda
from
'../container/Beranda'
import
UserRole
from
'../container/Otorisasi/UserRole'
import
User
from
'../container/Otorisasi/User'
import
ApprovalMatrix
from
'../container/ApprovalMatrix'
import
ApprovalMatrix
from
'../container/ApprovalMatrix
/ApprovalMatrix
'
import
BudgetTahunan
from
'../container/BudgetTahunan'
;
import
HomePage
from
'../container/HomePage'
;
import
BalanceSheet
from
'../container/BudgetTahunan/BalanceSheet'
;
...
...
@@ -21,7 +21,7 @@ const routes = [
main
:
UserRole
},
{
path
:
"/home/approval"
,
path
:
"/home/approval
-matrix
"
,
main
:
ApprovalMatrix
},
{
...
...
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