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
b5f16e69
Commit
b5f16e69
authored
Aug 19, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Toast ++
parent
ab6b1382
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
171 additions
and
62 deletions
+171
-62
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+130
-47
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+2
-0
UnitBisnis.js
src/container/MasterData/UnitBisnis.js
+29
-9
User.js
src/container/Otorisasi/User.js
+3
-3
EditUser.js
src/container/Otorisasi/User/EditUser.js
+6
-2
UserRole.js
src/container/Otorisasi/UserRole.js
+1
-1
No files found.
src/container/MasterData/Parameter/CreateParameter.js
View file @
b5f16e69
This diff is collapsed.
Click to expand it.
src/container/MasterData/Parameter/Parameter.js
View file @
b5f16e69
...
@@ -78,6 +78,7 @@ export default class Parameter extends Component {
...
@@ -78,6 +78,7 @@ export default class Parameter extends Component {
api
.
create
().
updateParameter
(
payload
).
then
(
response
=>
{
api
.
create
().
updateParameter
(
payload
).
then
(
response
=>
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
getAllParameter
()
this
.
getAllParameter
()
alert
(
response
.
data
.
message
)
}
else
{
}
else
{
alert
(
response
.
data
.
message
)
alert
(
response
.
data
.
message
)
}
}
...
@@ -89,6 +90,7 @@ export default class Parameter extends Component {
...
@@ -89,6 +90,7 @@ export default class Parameter extends Component {
api
.
create
().
createParameter
(
payload
).
then
(
response
=>
{
api
.
create
().
createParameter
(
payload
).
then
(
response
=>
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
getAllParameter
()
this
.
getAllParameter
()
alert
(
response
.
data
.
message
)
}
else
{
}
else
{
alert
(
response
.
data
.
message
)
alert
(
response
.
data
.
message
)
}
}
...
...
src/container/MasterData/UnitBisnis.js
View file @
b5f16e69
...
@@ -7,7 +7,8 @@ import UploadFile from "../../library/Upload";
...
@@ -7,7 +7,8 @@ import UploadFile from "../../library/Upload";
import
MUIDataTable
from
"mui-datatables"
;
import
MUIDataTable
from
"mui-datatables"
;
import
CreateUnitBisnis
from
"./formUnitBisnis/CreateUnitBisnis"
;
import
CreateUnitBisnis
from
"./formUnitBisnis/CreateUnitBisnis"
;
import
ReactTooltip
from
'react-tooltip'
;
import
ReactTooltip
from
'react-tooltip'
;
import
{
TextField
,
InputBase
}
from
"@material-ui/core"
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
{
TextField
,
InputBase
,
Snackbar
,
withStyles
}
from
"@material-ui/core"
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
api
from
"../../api"
;
import
api
from
"../../api"
;
import
{
isThisSecond
}
from
"date-fns"
;
import
{
isThisSecond
}
from
"date-fns"
;
...
@@ -18,6 +19,9 @@ const getMuiTheme = () => createMuiTheme(ct.customTable());
...
@@ -18,6 +19,9 @@ const getMuiTheme = () => createMuiTheme(ct.customTable());
const
options
=
ct
.
customOptions
();
const
options
=
ct
.
customOptions
();
const
options2
=
ct
.
customOptions2
();
const
options2
=
ct
.
customOptions2
();
const
Alert
=
withStyles
({
})((
props
)
=>
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
)
;
export
default
class
UnitBisnis
extends
Component
{
export
default
class
UnitBisnis
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
...
@@ -32,7 +36,10 @@ export default class UnitBisnis extends Component {
...
@@ -32,7 +36,10 @@ export default class UnitBisnis extends Component {
cols
:
null
,
cols
:
null
,
rows
:
null
,
rows
:
null
,
dataLoaded
:
false
,
dataLoaded
:
false
,
popupError
:
false
popupError
:
false
,
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
@@ -238,10 +245,10 @@ export default class UnitBisnis extends Component {
...
@@ -238,10 +245,10 @@ export default class UnitBisnis extends Component {
this
.
setState
({
visibleEdit
:
false
})
this
.
setState
({
visibleEdit
:
false
})
api
.
create
().
updateUnitBisnis
(
payload
).
then
(
response
=>
{
api
.
create
().
updateUnitBisnis
(
payload
).
then
(
response
=>
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
alert
(
response
.
data
.
message
)
this
.
getData
()
this
.
getData
()
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
}
else
{
}
else
{
alert
(
response
.
data
.
message
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
}
)
}
}
})
})
}
}
...
@@ -251,8 +258,9 @@ export default class UnitBisnis extends Component {
...
@@ -251,8 +258,9 @@ export default class UnitBisnis extends Component {
api
.
create
().
createUnitBisnis
(
payload
).
then
(
response
=>
{
api
.
create
().
createUnitBisnis
(
payload
).
then
(
response
=>
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
getData
()
this
.
getData
()
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
}
else
{
}
else
{
alert
(
response
.
data
.
message
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
}
)
}
}
})
})
}
}
...
@@ -290,14 +298,21 @@ export default class UnitBisnis extends Component {
...
@@ -290,14 +298,21 @@ export default class UnitBisnis extends Component {
uploadUnitBisnis
()
{
uploadUnitBisnis
()
{
api
.
create
().
uploadUnitBisnis
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
uploadUnitBisnis
(
this
.
state
.
payload
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
alert
(
response
.
data
.
message
)
this
.
getData
()
this
.
getData
()
this
.
setState
({
visibleUnitBisnis
:
true
})
this
.
setState
({
visibleUnitBisnis
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
}
})
})
}
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
render
()
{
const
columns
=
[{
const
columns
=
[{
name
:
"Action"
,
name
:
"Action"
,
...
@@ -366,6 +381,11 @@ export default class UnitBisnis extends Component {
...
@@ -366,6 +381,11 @@ export default class UnitBisnis extends Component {
<
div
style
=
{{
height
:
this
.
props
.
height
}}
>
<
div
style
=
{{
height
:
this
.
props
.
height
}}
>
{
/* <Row> */
}
{
/* <Row> */
}
<
div
style
=
{{
height
:
199
,
width
:
'100%'
}}
className
=
{
"main-color"
}
/
>
<
div
style
=
{{
height
:
199
,
width
:
'100%'
}}
className
=
{
"main-color"
}
/
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
{
this
.
state
.
visibleUnitBisnis
===
true
?
{
this
.
state
.
visibleUnitBisnis
===
true
?
<
div
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
150
}}
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
150
}}
>
...
...
src/container/Otorisasi/User.js
View file @
b5f16e69
...
@@ -298,7 +298,7 @@ export default class UserRole extends Component {
...
@@ -298,7 +298,7 @@ export default class UserRole extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
===
"Aktif"
?
{
/* {tableMeta.rowData[6] === "Aktif" ? */
}
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
@@ -310,9 +310,9 @@ export default class UserRole extends Component {
...
@@ -310,9 +310,9 @@ export default class UserRole extends Component {
>
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
/button
>
<
/button
>
:
{
/*
:
null
null
}
}
*/
}
<
/div
>
<
/div
>
);
);
}
}
...
...
src/container/Otorisasi/User/EditUser.js
View file @
b5f16e69
...
@@ -202,9 +202,13 @@ export default class EditUser extends Component {
...
@@ -202,9 +202,13 @@ export default class EditUser extends Component {
getPerusahaan
()
{
getPerusahaan
()
{
api
.
create
().
getPerusahaanHierarki
().
then
((
response
)
=>
{
api
.
create
().
getPerusahaanHierarki
().
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
listCompany
:
response
.
data
.
data
})
this
.
setState
({
listCompany
:
response
.
data
.
data
})
}
}
}
else
{
alert
(
response
.
problem
)
}
})
})
}
}
...
...
src/container/Otorisasi/UserRole.js
View file @
b5f16e69
...
@@ -113,7 +113,7 @@ class UserRole extends Component {
...
@@ -113,7 +113,7 @@ class UserRole extends Component {
onClick
=
{()
=>
this
.
setState
({
edit
:
true
,
indexData
:
tableMeta
.
rowData
[
1
]
})}
onClick
=
{()
=>
this
.
setState
({
edit
:
true
,
indexData
:
tableMeta
.
rowData
[
1
]
})}
>
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
2
]
!==
"superadmin"
&&
tableMeta
.
rowData
[
4
]
===
"Aktif"
?
{
tableMeta
.
rowData
[
2
]
!==
"superadmin"
?
<
img
src
=
{
Images
.
editCopy
}
/>
:
<
img
src
=
{
Images
.
editCopy
}
/>
:
null
null
}
}
...
...
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