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
cd16493d
Commit
cd16493d
authored
Aug 24, 2020
by
a.bairuha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update permission
parent
d05b5115
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
11 deletions
+37
-11
ReportItems.js
src/container/MasterData/ReportItems.js
+37
-11
No files found.
src/container/MasterData/ReportItems.js
View file @
cd16493d
...
...
@@ -39,7 +39,9 @@ export default class ReportItems extends Component {
popupError
:
false
,
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
messageAlert
:
''
,
create
:
false
,
edit
:
false
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -452,6 +454,24 @@ export default class ReportItems extends Component {
componentDidMount
()
{
this
.
getData
()
// this.getPermission()
}
getPermission
()
{
let
payload
=
{
menu
:
"report items"
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
create
:
response
.
data
.
data
.
create
,
edit
:
response
.
data
.
data
.
edit
})
}
}
})
}
getData
()
{
...
...
@@ -599,6 +619,7 @@ export default class ReportItems extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
this
.
state
.
edit
&&
(
<
button
style
=
{{
backgroundColor
:
'transparent'
,
...
...
@@ -610,6 +631,7 @@ export default class ReportItems extends Component {
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
/button
>
)}
<
/div
>
);
}
...
...
@@ -782,6 +804,7 @@ export default class ReportItems extends Component {
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
this
.
state
.
create
&&
(
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
style
=
{{
...
...
@@ -795,6 +818,7 @@ export default class ReportItems extends Component {
<
img
src
=
{
Images
.
upload
}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
/
>
<
/button
>
<
/a
>
)}
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
...
...
@@ -824,6 +848,7 @@ export default class ReportItems extends Component {
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"visualisasi"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
this
.
state
.
create
&&
(
<
a
data
-
tip
=
{
'Add New'
}
data
-
for
=
"tambah"
>
<
button
style
=
{{
...
...
@@ -836,6 +861,7 @@ export default class ReportItems extends Component {
<
img
src
=
{
Images
.
add
}
onClick
=
{()
=>
this
.
setState
({
add
:
true
})}
/
>
<
/button
>
<
/a
>
)}
<
ReactTooltip
border
=
{
true
}
id
=
"tambah"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
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