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
cc4f8884
Commit
cc4f8884
authored
Aug 11, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
02eca02a
8fa58802
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
527 additions
and
178 deletions
+527
-178
index.js
src/api/index.js
+6
-0
Perusahaan.js
src/container/MasterData/Perusahaan/Perusahaan.js
+300
-0
UserRole.js
src/container/Otorisasi/UserRole.js
+9
-7
AddRole.js
src/container/Otorisasi/UserRole/AddRole.js
+1
-1
EditRole.js
src/container/Otorisasi/UserRole/EditRole.js
+210
-33
Perusahaan.js
src/container/Perusahaan.js
+0
-136
homeRoutes.js
src/router/homeRoutes.js
+1
-1
No files found.
src/api/index.js
View file @
cc4f8884
...
...
@@ -67,9 +67,13 @@ const create = (baseURL = 'https://trftia.eksad.com/tia-reporting-dev/public/')
//Role
const
getRole
=
()
=>
api
.
get
(
'role/get_all_role'
)
const
getDetailRole
=
(
roleId
)
=>
api
.
get
(
`role/get_role_by_id/
${
roleId
}
`
)
const
addRole
=
(
body
)
=>
api
.
post
(
'role/create_role'
,
body
)
const
editRole
=
(
body
)
=>
api
.
post
(
'role/update_role'
,
body
)
const
deleteRole
=
(
roleId
)
=>
api
.
post
(
`role/delete_role/
${
roleId
}
`
)
//Menu
const
getMenu
=
()
=>
api
.
get
(
'menu/get_menu_hierarki'
)
// ------
// STEP 3
// ------
...
...
@@ -88,9 +92,11 @@ const create = (baseURL = 'https://trftia.eksad.com/tia-reporting-dev/public/')
login
,
verification
,
getRole
,
getDetailRole
,
addRole
,
editRole
,
deleteRole
,
getMenu
}
}
...
...
src/container/MasterData/Perusahaan/Perusahaan.js
0 → 100644
View file @
cc4f8884
This diff is collapsed.
Click to expand it.
src/container/Otorisasi/UserRole.js
View file @
cc4f8884
...
...
@@ -18,7 +18,7 @@ export default class UserRole extends Component {
super
(
props
)
this
.
state
=
{
listRole
:
[],
params
Data
:
{},
index
Data
:
{},
add
:
false
,
edit
:
false
}
...
...
@@ -38,6 +38,7 @@ export default class UserRole extends Component {
getRole
()
{
api
.
create
().
getRole
().
then
((
response
)
=>
{
// console.log(response)
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
let
listData
=
data
.
map
((
item
,
index
)
=>
{
...
...
@@ -52,7 +53,7 @@ export default class UserRole extends Component {
}
else
{
alert
(
response
.
data
.
message
)
}
//
console.log(response.data.data)
console
.
log
(
response
.
data
.
data
)
})
}
...
...
@@ -69,7 +70,8 @@ export default class UserRole extends Component {
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
}}
onClick
=
{()
=>
this
.
setState
({
edit
:
true
,
paramsData
:
tableMeta
.
rowData
})}
// onClick={() => console.log(tableMeta.rowData[1])}
onClick
=
{()
=>
this
.
setState
({
edit
:
true
,
indexData
:
tableMeta
.
rowData
[
1
]})}
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
/button
>
...
...
@@ -148,14 +150,14 @@ export default class UserRole extends Component {
<
/div
>
{
this
.
state
.
add
&&
(
<
AddRole
onClickClose
=
{
this
.
closeAdd
.
bind
(
this
)}
data
=
{
this
.
state
.
params
Data
}
onClickClose
=
{
this
.
closeAdd
.
bind
(
this
)}
data
=
{
this
.
state
.
index
Data
}
/
>
)}
{
this
.
state
.
edit
&&
(
<
EditRole
onClickClose
=
{
this
.
closeEdit
.
bind
(
this
)}
data
=
{
this
.
state
.
params
Data
}
onClickClose
=
{
this
.
closeEdit
.
bind
(
this
)}
data
=
{
this
.
state
.
index
Data
}
/
>
)}
<
/div
>
...
...
src/container/Otorisasi/UserRole/AddRole.js
View file @
cc4f8884
import
React
,
{
Component
}
from
'react'
;
import
{
TextField
}
from
'@material-ui/core'
;
export
default
class
CreateUnitBisnis
extends
Component
{
export
default
class
AddRole
extends
Component
{
render
()
{
return
(
<
div
className
=
"test app-popup-show"
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
...
...
src/container/Otorisasi/UserRole/EditRole.js
View file @
cc4f8884
This diff is collapsed.
Click to expand it.
src/container/Perusahaan.js
deleted
100644 → 0
View file @
02eca02a
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
}
from
'@material-ui/core'
;
import
TextField
from
"@material-ui/core/TextField"
;
import
Images
from
'../assets/Images'
;
import
MUIDataTable
from
"mui-datatables"
;
class
Perusahaan
extends
Component
{
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
}
/
>
<
/button
>
<
/div
>
);
}
}
},
"ID"
,
"Nama Perusahaan"
,
"Nama Perusahaan"
,
"Unit Bisnis"
,
"Jumlah Laporan"
,
"Status"
]
const
data
=
[
[
""
,
"1"
,
"Triputra Agro Persada Group"
,
"Triputra Investindo Arya"
,
"Agrobisnis"
,
"5"
,
"Aktif"
],
[
""
,
"2"
,
"Gawi Bahandep Sawit Mekar"
,
"Triputra Agro Persada Group"
,
"Agrobisnis"
,
"2"
,
"Aktif"
],
[
""
,
"3"
,
"Puninar Group"
,
"Triputra Investindo Arya"
,
"Service"
,
"5"
,
"Aktif"
],
[
""
,
"4"
,
"Puninar Infinite Raya"
,
"Puninar Group"
,
"Service"
,
"5"
,
"Non Aktif"
],
[
""
,
"-"
,
"-"
,
"-"
,
"-"
,
"-"
,
"-"
],
]
const
options
=
{
filter
:
false
,
sort
:
false
,
responsive
:
"scroll"
,
print
:
false
,
download
:
false
,
selectableRows
:
false
,
viewColumns
:
false
,
rowsPerPage
:
5
,
search
:
false
}
return
(
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
height
:
150
,
width
:
'100%'
,
backgroundColor
:
'#354960'
,
padding
:
24
,
paddingTop
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
paddingTop
:
8
,
paddingBottom
:
7
,
fontSize
:
'16px'
,
color
:
'white'
}}
>
Master
Data
-
Perusahaan
<
/Typography
>
<
form
style
=
{{
marginLeft
:
110
}}
>
<
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'
,
marginLeft
:
82
,
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
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
add
}
/
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
>
<
MUIDataTable
data
=
{
data
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
export
default
Perusahaan
;
\ No newline at end of file
src/router/homeRoutes.js
View file @
cc4f8884
...
...
@@ -8,7 +8,7 @@ import HomePage from '../container/HomePage';
import
BalanceSheet
from
'../container/BudgetTahunan/BalanceSheet'
;
import
Profile
from
'../container/Profile'
;
import
ItemLaporan
from
'../container/ItemLaporan'
;
import
Perusahaan
from
'../container/Perusahaan'
;
import
Perusahaan
from
'../container/
MasterData/Perusahaan/
Perusahaan'
;
import
UnitBisnis
from
'../container/MasterData/UnitBisnis'
const
routes
=
[
...
...
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