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
8e7b2e63
Commit
8e7b2e63
authored
Aug 24, 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
071fa016
6e15c15d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
49 deletions
+47
-49
CreatePerusahaan.js
src/container/MasterData/Perusahaan/CreatePerusahaan.js
+25
-27
AddUser.js
src/container/Otorisasi/User/AddUser.js
+6
-6
EditUser.js
src/container/Otorisasi/User/EditUser.js
+6
-6
UserRole.js
src/container/Otorisasi/UserRole.js
+2
-2
AddRole.js
src/container/Otorisasi/UserRole/AddRole.js
+4
-4
EditRole.js
src/container/Otorisasi/UserRole/EditRole.js
+4
-4
No files found.
src/container/MasterData/Perusahaan/CreatePerusahaan.js
View file @
8e7b2e63
...
@@ -186,13 +186,13 @@ export default class CreatePerusahaan extends Component {
...
@@ -186,13 +186,13 @@ export default class CreatePerusahaan extends Component {
validasiEdit
()
{
validasiEdit
()
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'
Nama perusahaan harus diisi
'
})
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'
Company Name required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'
Unit Bisnis harus diisi
'
})
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'
Business Unit required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Start Date
tidak boleh kosong
'
})
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Start Date
required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'End Date
tidak boleh kosong
'
})
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'End Date
required
'
})
}
else
{
}
else
{
let
payload
=
{
let
payload
=
{
"company_id"
:
this
.
state
.
companyID
,
"company_id"
:
this
.
state
.
companyID
,
...
@@ -210,15 +210,13 @@ export default class CreatePerusahaan extends Component {
...
@@ -210,15 +210,13 @@ export default class CreatePerusahaan extends Component {
validasi
()
{
validasi
()
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'
Nama perusahaan harus diisi
'
})
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'
Company Name required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'
Unit Bisnis harus diisi
'
})
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'
Business Unit required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Start Date
tidak boleh kosong
'
})
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Start Date
required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'End Date tidak boleh kosong'
})
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'End Date required'
})
}
else
if
(
!
R
.
isEmpty
(
this
.
state
.
startDate
)
&&
!
R
.
isEmpty
(
this
.
state
.
endDate
)
&&
(
this
.
state
.
startDate
>
this
.
state
.
endDate
))
{
return
alert
(
"Masa Berlaku Tidak Boleh Kurang Dari Tanggal Mulai"
)
}
}
// else if (R.isEmpty(this.state.totalReport)) {
// else if (R.isEmpty(this.state.totalReport)) {
// this.setState({ errorJL: true, msgErrorJL: 'Total Report harus diisi' })
// this.setState({ errorJL: true, msgErrorJL: 'Total Report harus diisi' })
...
@@ -244,7 +242,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -244,7 +242,7 @@ export default class CreatePerusahaan extends Component {
<
div
className
=
"popup-panel grid grid-2x main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"col-1"
style
=
{{
maxWidth
:
"inherit"
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
className
=
"col-1"
style
=
{{
maxWidth
:
"inherit"
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
className
=
"popup-title"
>
<
div
className
=
"popup-title"
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
16
,
fontWeight
:
'bold'
}}
>
Ubah
Data
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
16
,
fontWeight
:
'bold'
}}
>
Edit
Data
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"col-2 content-right"
style
=
{{
maxWidth
:
"inherit"
,
alignSelf
:
'center'
}}
>
<
div
className
=
"col-2 content-right"
style
=
{{
maxWidth
:
"inherit"
,
alignSelf
:
'center'
}}
>
...
@@ -292,7 +290,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -292,7 +290,7 @@ export default class CreatePerusahaan extends Component {
{...
params
}
{...
params
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
label
=
"
Unit Bisnis
"
label
=
"
Business Unit
"
error
=
{
this
.
state
.
errorUB
}
error
=
{
this
.
state
.
errorUB
}
helperText
=
{
this
.
state
.
msgErrorUB
}
helperText
=
{
this
.
state
.
msgErrorUB
}
/
>
/
>
...
@@ -304,7 +302,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -304,7 +302,7 @@ export default class CreatePerusahaan extends Component {
<
DatePicker
<
DatePicker
margin
=
"normal"
margin
=
"normal"
id
=
"startDate"
id
=
"startDate"
label
=
"
Berlaku Mulai
"
label
=
"
Start Date
"
format
=
"dd MMMM yyyy"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
startDate
}
value
=
{
this
.
state
.
startDate
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
...
@@ -350,11 +348,11 @@ export default class CreatePerusahaan extends Component {
...
@@ -350,11 +348,11 @@ export default class CreatePerusahaan extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Dibuat
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Created
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
created
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
created
}
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Diubah
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Edited
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
updated
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
updated
}
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -365,7 +363,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -365,7 +363,7 @@ export default class CreatePerusahaan extends Component {
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"perusahaan"
id
=
"perusahaan"
label
=
"
Nama Perusahaan
"
label
=
"
Company Name
"
value
=
{
this
.
state
.
company
}
value
=
{
this
.
state
.
company
}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
...
@@ -398,7 +396,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -398,7 +396,7 @@ export default class CreatePerusahaan extends Component {
<
DatePicker
<
DatePicker
margin
=
"normal"
margin
=
"normal"
id
=
"endDate"
id
=
"endDate"
label
=
"
Berlaku Hingga
"
label
=
"
End Date
"
format
=
"dd MMMM yyyy"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
endDate
}
value
=
{
this
.
state
.
endDate
}
minDate
=
{
this
.
state
.
startDate
}
minDate
=
{
this
.
state
.
startDate
}
...
@@ -455,7 +453,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -455,7 +453,7 @@ export default class CreatePerusahaan extends Component {
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Bata
l
<
/span
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cance
l
<
/span
>
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
...
@@ -465,7 +463,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -465,7 +463,7 @@ export default class CreatePerusahaan extends Component {
onClick
=
{()
=>
this
.
validasiEdit
()}
onClick
=
{()
=>
this
.
validasiEdit
()}
>
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
S
impan
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
S
ave
<
/span
>
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
...
@@ -527,7 +525,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -527,7 +525,7 @@ export default class CreatePerusahaan extends Component {
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
<
TextField
{...
params
}
{...
params
}
label
=
"
Unit Bisnis
"
label
=
"
Business Unit
"
margin
=
"normal"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
style
=
{{
marginTop
:
7
}}
error
=
{
this
.
state
.
errorUB
}
error
=
{
this
.
state
.
errorUB
}
...
@@ -550,7 +548,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -550,7 +548,7 @@ export default class CreatePerusahaan extends Component {
<
DatePicker
<
DatePicker
margin
=
"normal"
margin
=
"normal"
id
=
"startDate"
id
=
"startDate"
label
=
"
Berlaku Mulai
"
label
=
"
Start Date
"
format
=
"dd MMMM yyyy"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
...
@@ -594,8 +592,8 @@ export default class CreatePerusahaan extends Component {
...
@@ -594,8 +592,8 @@ export default class CreatePerusahaan extends Component {
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Dibuat
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Created
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Diubah
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Edited
:
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -604,7 +602,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -604,7 +602,7 @@ export default class CreatePerusahaan extends Component {
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"perusahaan"
id
=
"perusahaan"
label
=
"
Nama Perusahaan
"
label
=
"
Company Name
"
value
=
{
this
.
state
.
company
}
value
=
{
this
.
state
.
company
}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
...
@@ -637,7 +635,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -637,7 +635,7 @@ export default class CreatePerusahaan extends Component {
<
DatePicker
<
DatePicker
margin
=
"normal"
margin
=
"normal"
id
=
"endDate"
id
=
"endDate"
label
=
"
Berlaku Hingga
"
label
=
"
End Date
"
format
=
"dd MMMM yyyy"
format
=
"dd MMMM yyyy"
error
=
{
this
.
state
.
errorED
}
error
=
{
this
.
state
.
errorED
}
helperText
=
{
this
.
state
.
msgErrorED
}
helperText
=
{
this
.
state
.
msgErrorED
}
...
@@ -697,7 +695,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -697,7 +695,7 @@ export default class CreatePerusahaan extends Component {
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Bata
l
<
/span
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cance
l
<
/span
>
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
...
@@ -707,7 +705,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -707,7 +705,7 @@ export default class CreatePerusahaan extends Component {
onClick
=
{()
=>
this
.
validasi
()}
onClick
=
{()
=>
this
.
validasi
()}
>
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
S
impan
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
S
ave
<
/span
>
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
...
...
src/container/Otorisasi/User/AddUser.js
View file @
8e7b2e63
...
@@ -158,17 +158,17 @@ export default class AddUser extends Component {
...
@@ -158,17 +158,17 @@ export default class AddUser extends Component {
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
R
.
isEmpty
(
this
.
state
.
fullname
))
{
if
(
R
.
isEmpty
(
this
.
state
.
fullname
))
{
this
.
setState
({
errorFullname
:
true
,
msgErrorFN
:
'
Nama Lengkap tidak boleh kosong
'
})
this
.
setState
({
errorFullname
:
true
,
msgErrorFN
:
'
Full Name is Required
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
email
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
email
))
{
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'Email
tidak boleh kosong
'
})
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'Email
is Required
'
})
}
else
if
(
!
isEmail
)
{
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'
Format email tidak sesuai
!'
})
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'
Email format not recognized
!'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
role
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
role
))
{
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name
tidak boleh kosong
'
})
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name
is Required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date
tidak boleh kosong
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date
is Required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date
tidak boleh kosong
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date
is Required
'
})
}
}
// else if (this.state.privileges.length < 1) {
// else if (this.state.privileges.length < 1) {
// alert('Hak Akses belum di pilih !!')
// alert('Hak Akses belum di pilih !!')
...
...
src/container/Otorisasi/User/EditUser.js
View file @
8e7b2e63
...
@@ -166,17 +166,17 @@ export default class EditUser extends Component {
...
@@ -166,17 +166,17 @@ export default class EditUser extends Component {
// console.log(this.state.tempData)
// console.log(this.state.tempData)
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
fullname
))
{
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
fullname
))
{
this
.
setState
({
errorFullname
:
true
,
msgErrorFN
:
'
Nama Lengkap tidak boleh kosong
'
})
this
.
setState
({
errorFullname
:
true
,
msgErrorFN
:
'
Full Name is Required
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
email
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
email
))
{
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'Email
tidak boleh kosong
'
})
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'Email
is Required
'
})
}
else
if
(
!
isEmail
)
{
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'
Format email tidak sesuai
!'
})
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'
Email format not recognized
!'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
role
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
role
))
{
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name
tidak boleh kosong
'
})
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name
is Required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date
tidak boleh kosong
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date
is Required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date
tidak boleh kosong
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date
is Required
'
})
}
}
// else if (this.state.privileges.length < 1) {
// else if (this.state.privileges.length < 1) {
// alert('Hak Akses belum di pilih !!')
// alert('Hak Akses belum di pilih !!')
...
...
src/container/Otorisasi/UserRole.js
View file @
8e7b2e63
...
@@ -174,7 +174,7 @@ class UserRole extends Component {
...
@@ -174,7 +174,7 @@ class UserRole extends Component {
}
}
}
}
},
{
},
{
name
:
"
Hak Akse
s"
,
name
:
"
Access Right
s"
,
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
...
@@ -207,7 +207,7 @@ class UserRole extends Component {
...
@@ -207,7 +207,7 @@ class UserRole extends Component {
<
/Snackbar
>
<
/Snackbar
>
<
div
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
118
}}
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
118
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'20%'
,
}}
>
Master
Data
-
Role
&
Otorisasi
<
/label
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'20%'
,
}}
>
Master
Data
-
Role
&
Authorization
<
/label
>
<
div
style
=
{{
color
:
'white'
,
width
:
'50%'
,
height
:
37
,
display
:
'flex'
,
backgroundColor
:
'white'
,
borderWidth
:
2
,
alignItems
:
'center'
,
borderRadius
:
6
,
paddingLeft
:
5
,
paddingRight
:
5
,
alignSelf
:
'center'
}}
>
<
div
style
=
{{
color
:
'white'
,
width
:
'50%'
,
height
:
37
,
display
:
'flex'
,
backgroundColor
:
'white'
,
borderWidth
:
2
,
alignItems
:
'center'
,
borderRadius
:
6
,
paddingLeft
:
5
,
paddingRight
:
5
,
alignSelf
:
'center'
}}
>
<
img
src
=
{
Images
.
searchBlack
}
style
=
{{
marginRight
:
10
}}
/
>
<
img
src
=
{
Images
.
searchBlack
}
style
=
{{
marginRight
:
10
}}
/
>
<
InputBase
<
InputBase
...
...
src/container/Otorisasi/UserRole/AddRole.js
View file @
8e7b2e63
...
@@ -110,13 +110,13 @@ export default class AddRole extends Component {
...
@@ -110,13 +110,13 @@ export default class AddRole extends Component {
validasi
()
{
validasi
()
{
if
(
R
.
isEmpty
(
this
.
state
.
roleName
))
{
if
(
R
.
isEmpty
(
this
.
state
.
roleName
))
{
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name
tidak boleh kosong
'
})
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name
is Required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date
tidak boleh kosong
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date
is Required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date
tidak boleh kosong
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date
is Required
'
})
}
else
if
(
this
.
state
.
privileges
.
length
<
1
)
{
}
else
if
(
this
.
state
.
privileges
.
length
<
1
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'
Hak Akses belum di pilih
!!'
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'
You must choose the Access Rights
!!'
,
tipeAlert
:
'warning'
})
}
else
{
}
else
{
this
.
addRole
()
this
.
addRole
()
}
}
...
...
src/container/Otorisasi/UserRole/EditRole.js
View file @
8e7b2e63
...
@@ -116,13 +116,13 @@ export default class EditRole extends Component {
...
@@ -116,13 +116,13 @@ export default class EditRole extends Component {
validasi
()
{
validasi
()
{
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
role_name
))
{
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
role_name
))
{
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name
tidak boleh kosong
'
})
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name
is Required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date
tidak boleh kosong
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date
is Required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date
tidak boleh kosong
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date
is Required
'
})
}
else
if
(
this
.
state
.
privileges
.
length
<
1
)
{
}
else
if
(
this
.
state
.
privileges
.
length
<
1
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'
Hak Akses belum di pilih !!
'
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'
You must choose the Access Rights
'
,
tipeAlert
:
'warning'
})
}
else
{
}
else
{
this
.
updateRole
()
this
.
updateRole
()
}
}
...
...
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