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
8febeda9
Commit
8febeda9
authored
Aug 10, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
Deni dev(pc) See merge request
!34
parents
1426fa62
1bdaa9f7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
212 additions
and
38 deletions
+212
-38
UnitBisnis.js
src/container/MasterData/UnitBisnis.js
+76
-23
CreateUnitBisnis.js
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
+136
-15
EditUnitBisnis.js
src/container/MasterData/formUnitBisnis/EditUnitBisnis.js
+0
-0
No files found.
src/container/MasterData/UnitBisnis.js
View file @
8febeda9
...
...
@@ -5,6 +5,7 @@ import SearchIcon from '@material-ui/icons/Search';
import
Images
from
"../../assets/Images"
;
import
MUIDataTable
from
"mui-datatables"
;
import
CreateUnitBisnis
from
"./formUnitBisnis/CreateUnitBisnis"
;
import
{
TextField
,
InputBase
}
from
"@material-ui/core"
;
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
...
@@ -14,7 +15,9 @@ export default class UnitBisnis extends Component {
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
visibleCreate
:
false
visibleCreate
:
false
,
visibleEdit
:
false
,
data
:
[]
}
}
...
...
@@ -22,9 +25,9 @@ export default class UnitBisnis extends Component {
}
render
()
{
console
.
log
(
this
.
props
.
height
)
const
columns
=
[
"#"
,
"Nama Perusahaan"
,
"Revisi"
,
"Status"
,
{
const
columns
=
[{
name
:
"Action"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
...
...
@@ -36,17 +39,7 @@ export default class UnitBisnis extends Component {
cursor
:
'pointer'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
editCopy2
}
/
>
<
/button
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
null
}
onClick
=
{()
=>
this
.
setState
({
visibleEdit
:
true
,
data
:
tableMeta
.
rowData
})}
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
/button
>
...
...
@@ -54,13 +47,46 @@ export default class UnitBisnis extends Component {
);
}
}
},
{
name
:
"ID"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"Aktif"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
}
},
{
name
:
"Unit Bisnis"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"Aktif"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
}
},
{
name
:
"Status"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"Aktif"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
}
}]
const
data
=
[
[
"
1"
,
"TRIPUTRA AGRO PERSADA"
,
"Laporan Bulanan - September 2020"
,
"1 (20 Oktober 2020)"
,
"Belum Disetujui
"
],
[
"
2"
,
"DAYA GROUP"
,
"Laporan Bulanan - September 2020"
,
"1 (20 Oktober 2020)"
,
"Belum Disetujui
"
],
[
"
3"
,
"PUNINAR INFINITE RAYA"
,
"Budget Tahunan 2021"
,
"0 (20 Oktober 2020)"
,
"Belum Disetujui
"
],
[
"
4"
,
"DHARMA GROUP"
,
"Laporan Bulanan - September 2020"
,
"0 (20 Oktober 2020)"
,
"Belum Disetujui
"
],
[
"
5"
,
"PUNINAR INFINITE RAYA"
,
"Budget Tahunan 2021"
,
"0 (20 Oktober 2020)"
,
"Belum Disetujui
"
],
[
"
"
,
"1"
,
"Agribisnis"
,
"Aktif
"
],
[
"
"
,
"2"
,
"Manufacturing"
,
"Aktif
"
],
[
"
"
,
"3"
,
"Trading"
,
"Aktif
"
],
[
"
"
,
"4"
,
"Service"
,
"Non Aktif
"
],
[
"
"
,
"-"
,
"-"
,
"-
"
],
]
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
}}
>
...
...
@@ -68,10 +94,29 @@ export default class UnitBisnis extends Component {
<
div
style
=
{{
height
:
199
,
backgroundColor
:
'#354960'
,
width
:
'100%'
}}
/
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
150
}}
>
<
label
style
=
{{
color
:
'white'
,
width
:
'20%'
}}
>
Master
Data
-
Unit
Bisnis
<
/label
>
<
label
style
=
{{
color
:
'white'
,
width
:
'60%'
,
justifyContent
:
'center'
,
display
:
'flex'
,
backgroundColor
:
'white'
,
borderWidth
:
2
,
alignItems
:
'center'
}}
>
Search
<
/label
>
<
div
style
=
{{
width
:
'20%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
}}
>
<
img
src
=
{
Images
.
add
}
onClick
=
{()
=>
this
.
setState
({
visibleCreate
:
true
})}
/
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
>
Master
Data
-
Unit
Bisnis
<
/label
>
<
div
style
=
{{
color
:
'white'
,
width
:
'50%'
,
height
:
37
,
display
:
'flex'
,
backgroundColor
:
'white'
,
borderWidth
:
2
,
alignItems
:
'center'
,
borderRadius
:
6
,
paddingLeft
:
5
,
paddingRight
:
5
}}
>
<
img
src
=
{
Images
.
searchBlack
}
style
=
{{
marginRight
:
10
}}
/
>
<
InputBase
style
=
{{
width
:
'100%'
}}
placeholder
=
"Search"
inputProps
=
{{
'aria-label'
:
'naked'
}}
/
>
<
/div
>
<
div
style
=
{{
width
:
'20%'
,
justifyContent
:
'space-around'
,
display
:
'flex'
}}
>
<
img
src
=
{
Images
.
template
}
/
>
<
img
src
=
{
Images
.
upload
}
/
>
<
img
src
=
{
Images
.
download
}
/
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
this
.
setState
({
visibleCreate
:
true
})}
>
<
img
src
=
{
Images
.
add
}
/
>
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
25
}}
>
...
...
@@ -91,6 +136,14 @@ export default class UnitBisnis extends Component {
onClickClose
=
{()
=>
this
.
setState
({
visibleCreate
:
false
})}
/
>
)}
{
this
.
state
.
visibleEdit
&&
(
<
CreateUnitBisnis
type
=
{
"edit"
}
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
data
=
{
this
.
state
.
data
}
/
>
)}
<
/div
>
);
}
...
...
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
View file @
8febeda9
This diff is collapsed.
Click to expand it.
src/container/MasterData/formUnitBisnis/EditUnitBisnis.js
0 → 100644
View file @
8febeda9
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