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
a2f5a327
Commit
a2f5a327
authored
Aug 10, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update layout approval matrix
parent
f7e0b15f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
14 deletions
+93
-14
ApprovalMatrix.js
src/container/ApprovalMatrix.js
+93
-14
No files found.
src/container/ApprovalMatrix.js
View file @
a2f5a327
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
}
from
'@material-ui/core'
;
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
TextField
from
"@material-ui/core/TextField"
;
import
Images
from
'../assets/Images'
;
import
Images
from
'../assets/Images'
;
import
MUIDataTable
from
"mui-datatables"
;
import
MUIDataTable
from
"mui-datatables"
;
import
Modal
from
'@material-ui/core/Modal'
;
class
ApprovalMatrix
extends
Component
{
var
ct
=
require
(
"../library/CustomTable"
);
render
()
{
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
=
[{
const
columns
=
[{
name
:
"Action"
,
name
:
"Action"
,
options
:
{
options
:
{
...
@@ -36,7 +106,7 @@ class ApprovalMatrix extends Component {
...
@@ -36,7 +106,7 @@ class ApprovalMatrix extends Component {
]
]
const
options
=
{
const
options
=
{
filter
:
false
,
filter
:
false
,
sort
:
fals
e
,
sort
:
tru
e
,
responsive
:
"scroll"
,
responsive
:
"scroll"
,
print
:
false
,
print
:
false
,
download
:
false
,
download
:
false
,
...
@@ -47,11 +117,12 @@ class ApprovalMatrix extends Component {
...
@@ -47,11 +117,12 @@ class ApprovalMatrix extends Component {
}
}
return
(
return
(
<
div
style
=
{{
flex
:
1
}}
>
<
Container
fluid
style
=
{{
height
:
'100vh'
,
padding
:
0
}}
>
<
div
style
=
{{
height
:
150
,
width
:
'100%'
,
backgroundColor
:
'#354960'
,
padding
:
24
,
paddingTop
:
30
}}
>
<
div
style
=
{{
height
:
'200px'
,
width
:
'100%'
,
backgroundColor
:
'#354960'
,
padding
:
24
,
paddingTop
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
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
>
<
Typography
style
=
{{
paddingTop
:
8
,
paddingBottom
:
7
,
fontSize
:
'16px'
,
color
:
'white'
}}
>
Master
Data
-
Approval
Matrix
<
/Typography
>
<
form
style
=
{{
marginLeft
:
110
}}
>
<
form
style
=
{{
}}
>
<
TextField
id
=
""
label
=
""
variant
=
"outlined"
size
=
"small"
placeholder
=
"Search"
style
=
{{
width
:
423
,
backgroundColor
:
'white'
,
borderRadius
:
6
}}
/
>
<
TextField
id
=
""
label
=
""
variant
=
"outlined"
size
=
"small"
placeholder
=
"Search"
style
=
{{
width
:
423
,
backgroundColor
:
'white'
,
borderRadius
:
6
}}
/
>
<
/form
>
<
/form
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
...
@@ -60,7 +131,6 @@ class ApprovalMatrix extends Component {
...
@@ -60,7 +131,6 @@ class ApprovalMatrix extends Component {
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
marginLeft
:
82
,
padding
:
0
padding
:
0
}}
}}
onClick
=
{()
=>
null
}
onClick
=
{()
=>
null
}
...
@@ -111,26 +181,35 @@ class ApprovalMatrix extends Component {
...
@@ -111,26 +181,35 @@ class ApprovalMatrix extends Component {
marginLeft
:
16
,
marginLeft
:
16
,
padding
:
0
padding
:
0
}}
}}
onClick
=
{
()
=>
null
}
onClick
=
{
handleOpen
}
>
>
<
img
src
=
{
Images
.
add
}
/
>
<
img
src
=
{
Images
.
add
}
/
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
Modal
open
=
{
open
}
onClose
=
{
handleClose
}
aria
-
labelledby
=
"simple-modal-title"
aria
-
describedby
=
"simple-modal-description"
>
{
showModal
}
<
/Modal
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
padding
:
20
,
width
:
'100%'
}}
>
<
div
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
data
}
data
=
{
data
}
columns
=
{
columns
}
columns
=
{
columns
}
options
=
{
options
}
options
=
{
options
}
/
>
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/
div
>
<
/
Container
>
);
);
}
//
}
}
}
export
default
ApprovalMatrix
;
// export default ApprovalMatrix;
\ No newline at end of file
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