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
457e97e2
Commit
457e97e2
authored
Aug 19, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into deni-dev(pc)
parents
92e9e0de
387cb89d
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
786 additions
and
327 deletions
+786
-327
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+213
-162
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+14
-23
VisualReportItems.js
...container/MasterData/formReportItems/VisualReportItems.js
+4
-2
User.js
src/container/Otorisasi/User.js
+120
-118
AddUser.js
src/container/Otorisasi/User/AddUser.js
+175
-19
EditUser.js
src/container/Otorisasi/User/EditUser.js
+119
-3
AddRole.js
src/container/Otorisasi/UserRole/AddRole.js
+76
-0
EditRole.js
src/container/Otorisasi/UserRole/EditRole.js
+65
-0
No files found.
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
457e97e2
...
@@ -113,14 +113,13 @@ export default class CreateReportItems extends Component {
...
@@ -113,14 +113,13 @@ export default class CreateReportItems extends Component {
// alert('coba ya')
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
))
return
alert
(
"Jenis Laporan is Required."
);
if
(
R
.
isNil
(
this
.
state
.
reportType
))
return
alert
(
"Jenis Laporan is Required."
);
if
(
R
.
isNil
(
this
.
state
.
company
))
return
alert
(
"Perusahaan is Required."
);
if
(
R
.
isNil
(
this
.
state
.
company
))
return
alert
(
"Perusahaan is Required."
);
else
if
(
R
.
is
Nil
(
this
.
state
.
order
))
{
else
if
(
R
.
is
Empty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order Harus Diisi'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order Harus Diisi'
})
}
}
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Deskripsi Harus Diisi'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Deskripsi Harus Diisi'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
parent
))
return
alert
(
"Parent ID is Required."
)
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
return
alert
(
"Tipe Data is Required."
)
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
return
alert
(
"Tipe Data is Required."
);
else
if
(
this
.
state
.
disabledFormula
===
false
&&
R
.
isEmpty
(
this
.
state
.
formula
))
{
else
if
(
this
.
state
.
disabledFormula
===
false
&&
R
.
isEmpty
(
this
.
state
.
formula
))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula Harus Diisi'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula Harus Diisi'
})
}
}
...
@@ -290,8 +289,7 @@ export default class CreateReportItems extends Component {
...
@@ -290,8 +289,7 @@ export default class CreateReportItems extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"border-bottom grid grid-2x grid-mobile-none gap-15px"
style
=
{{
padding
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
...
@@ -317,7 +315,36 @@ export default class CreateReportItems extends Component {
...
@@ -317,7 +315,36 @@ export default class CreateReportItems extends Component {
}}
}}
/
>
/
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
listReportType
}
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
})}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Jenis Laporan"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
reportType
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listCompany
}
{...
this
.
state
.
listCompany
}
id
=
"company"
id
=
"company"
...
@@ -339,17 +366,19 @@ export default class CreateReportItems extends Component {
...
@@ -339,17 +366,19 @@ export default class CreateReportItems extends Component {
value
=
{
this
.
state
.
company
}
value
=
{
this
.
state
.
company
}
/
>
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"description"
id
=
"orders"
label
=
"Deskripsi"
name
=
"order"
name
=
"description"
label
=
"Order"
value
=
{
this
.
state
.
description
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
error
=
{
this
.
state
.
errorDesc
}
value
=
{
this
.
state
.
order
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
error
=
{
this
.
state
.
errorOrder
}
helperText
=
{
this
.
state
.
msgErrorOrder
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
// value={this.props.data.business_unit_name}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -368,14 +397,22 @@ export default class CreateReportItems extends Component {
...
@@ -368,14 +397,22 @@ export default class CreateReportItems extends Component {
>
>
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"uom"
id
=
"description"
name
=
"uom"
label
=
"Deskripsi"
label
=
"UOM"
name
=
"description"
value
=
{
this
.
state
.
uom
}
value
=
{
this
.
state
.
description
}
error
=
{
this
.
state
.
errorDesc
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
// value={this.props.data.business_unit_name}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -394,20 +431,18 @@ export default class CreateReportItems extends Component {
...
@@ -394,20 +431,18 @@ export default class CreateReportItems extends Component {
>
>
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listInputType
}
{...
this
.
state
.
listParent
}
id
=
"inputType"
id
=
"parentId"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
InputType
:
newInputValue
},
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
parent
:
newInputValue
})}
()
=>
newInputValue
===
null
?
this
.
setState
({
disabledFormula
:
true
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
:
newInputValue
.
type_report_name
===
'Formula'
?
this
.
setState
({
disabledFormula
:
false
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
:
newInputValue
.
type_report_name
===
'Validation'
?
this
.
setState
({
disabledFormula
:
false
,
disabledCondt
:
false
,
disabledValue
:
false
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
:
this
.
setState
({
disabledFormula
:
true
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
)}
debug
debug
disabled
=
{
this
.
state
.
reportType
==
null
||
this
.
state
.
company
==
null
}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
label
=
"
Tipe Data
"
label
=
"
Parent ID
"
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -418,20 +453,21 @@ export default class CreateReportItems extends Component {
...
@@ -418,20 +453,21 @@ export default class CreateReportItems extends Component {
}}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
}
value
=
{
this
.
state
.
InputType
}
value
=
{
this
.
state
.
parent
}
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"realVal"
id
=
"uom"
label
=
"Nilai Seharusnya"
name
=
"uom"
name
=
"realVal"
label
=
"UOM"
disabled
=
{
this
.
state
.
disabledValue
}
value
=
{
this
.
state
.
uom
}
value
=
{
this
.
state
.
realVal
}
error
=
{
this
.
state
.
errorRV
}
helperText
=
{
this
.
state
.
msgErrorRV
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
...
@@ -448,47 +484,19 @@ export default class CreateReportItems extends Component {
...
@@ -448,47 +484,19 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
,
color
:
'#7e8085'
,
}
}
}}
}}
/
>
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
id
=
"startDate"
label
=
"Berlaku Mulai"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
startDate
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorSD
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
value
=
{
'Aktif'
}
id
=
"weight"
id
=
"status"
label
=
"Weight"
label
=
"Status"
name
=
"weight"
disabled
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -504,31 +512,28 @@ export default class CreateReportItems extends Component {
...
@@ -504,31 +512,28 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
,
color
:
'#7e8085'
,
}
}
}}
}}
/
>
>
<
/div
>
<
/TextField
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Dibuat
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
Admin
-
21
Jul
2020
,
18
:
45
<
/Typography
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Diubah
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
Admin
-
21
Jul
2020
,
18
:
45
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listReportType
}
{...
this
.
state
.
listInputType
}
id
=
"reportType"
id
=
"inputType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
})}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
InputType
:
newInputValue
},
()
=>
newInputValue
===
null
?
this
.
setState
({
disabledFormula
:
true
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
:
newInputValue
.
type_report_name
===
'Formula'
?
this
.
setState
({
disabledFormula
:
false
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
:
newInputValue
.
type_report_name
===
'Validation'
?
this
.
setState
({
disabledFormula
:
false
,
disabledCondt
:
false
,
disabledValue
:
false
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
:
this
.
setState
({
disabledFormula
:
true
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
)}
debug
debug
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
label
=
"
Jenis Laporan
"
label
=
"
Tipe Data
"
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -539,19 +544,21 @@ export default class CreateReportItems extends Component {
...
@@ -539,19 +544,21 @@ export default class CreateReportItems extends Component {
}}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
}
value
=
{
this
.
state
.
repor
tType
}
value
=
{
this
.
state
.
Inpu
tType
}
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"
orders
"
id
=
"
formula
"
name
=
"order
"
label
=
"Formula
"
label
=
"Order
"
name
=
"formula
"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)
}
disabled
=
{
this
.
state
.
disabledFormula
}
value
=
{
this
.
state
.
order
}
value
=
{
this
.
state
.
formula
}
error
=
{
this
.
state
.
error
Order
}
error
=
{
this
.
state
.
error
Formula
}
helperText
=
{
this
.
state
.
msgError
Order
}
helperText
=
{
this
.
state
.
msgError
Formula
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
...
@@ -571,65 +578,21 @@ export default class CreateReportItems extends Component {
...
@@ -571,65 +578,21 @@ export default class CreateReportItems extends Component {
>
>
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
10
}}
>
<
Autocomplete
{...
this
.
state
.
listParent
}
id
=
"parentId"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
parent
:
newInputValue
})}
debug
disabled
=
{
this
.
state
.
reportType
==
null
||
this
.
state
.
company
==
null
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Parent ID"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
parent
}
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"weight"
label
=
"Weight"
name
=
"weight"
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"
formula
"
id
=
"
realVal
"
label
=
"
Formul
a"
label
=
"
Nilai Seharusny
a"
name
=
"
formula
"
name
=
"
realVal
"
disabled
=
{
this
.
state
.
disabled
Formula
}
disabled
=
{
this
.
state
.
disabled
Value
}
value
=
{
this
.
state
.
formula
}
value
=
{
this
.
state
.
realVal
}
error
=
{
this
.
state
.
error
Formula
}
error
=
{
this
.
state
.
error
RV
}
helperText
=
{
this
.
state
.
msgError
Formula
}
helperText
=
{
this
.
state
.
msgError
RV
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
...
@@ -646,10 +609,11 @@ export default class CreateReportItems extends Component {
...
@@ -646,10 +609,11 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
,
color
:
'#7e8085'
,
}
}
}}
}}
>
/
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
value
=
{
this
.
state
.
condition
}
value
=
{
this
.
state
.
condition
}
id
=
"isWrongCondition"
id
=
"isWrongCondition"
...
@@ -673,6 +637,45 @@ export default class CreateReportItems extends Component {
...
@@ -673,6 +637,45 @@ export default class CreateReportItems extends Component {
/>
}
/>
}
/>
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
id
=
"startDate"
label
=
"Berlaku Mulai"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
startDate
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorSD
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
<
DatePicker
margin
=
"normal"
margin
=
"normal"
...
@@ -707,7 +710,50 @@ export default class CreateReportItems extends Component {
...
@@ -707,7 +710,50 @@ export default class CreateReportItems extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
{
'Aktif'
}
id
=
"status"
label
=
"Status"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Dibuat
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
Admin
-
21
Jul
2020
,
18
:
45
<
/Typography
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Diubah
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
Admin
-
21
Jul
2020
,
18
:
45
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
...
@@ -722,9 +768,14 @@ export default class CreateReportItems extends Component {
...
@@ -722,9 +768,14 @@ export default class CreateReportItems extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
div
onClick
=
{()
=>
this
.
validasi
()}
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
validasi
()}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
/div
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
457e97e2
...
@@ -116,27 +116,14 @@ export default class EditReportItems extends Component {
...
@@ -116,27 +116,14 @@ export default class EditReportItems extends Component {
// alert('coba ya')
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
))
return
alert
(
"Jenis Laporan is Required."
);
if
(
R
.
isNil
(
this
.
state
.
reportType
))
return
alert
(
"Jenis Laporan is Required."
);
if
(
R
.
isNil
(
this
.
state
.
company
))
return
alert
(
"Perusahaan is Required."
);
if
(
R
.
isNil
(
this
.
state
.
company
))
return
alert
(
"Perusahaan is Required."
);
else
if
(
R
.
is
Nil
(
this
.
state
.
order
))
{
else
if
(
R
.
is
Empty
(
this
.
state
.
tempData
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order Harus Diisi'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order Harus Diisi'
})
}
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
description
))
{
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Deskripsi Harus Diisi'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Deskripsi Harus Diisi'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
return
alert
(
"Tipe Data harus dipilih."
)
else
if
(
R
.
isNil
(
this
.
state
.
parent
))
return
alert
(
"Parent ID is Required."
)
else
if
(
this
.
state
.
InputType
.
type_report_name
===
'Formula'
||
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
))
{
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
return
alert
(
"Tipe Data is Required."
);
else
if
(
this
.
state
.
disabledFormula
===
false
&&
R
.
isEmpty
(
this
.
state
.
formula
))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula Harus Diisi'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula Harus Diisi'
})
}
}
else
if
(
this
.
state
.
disabledValue
===
false
&&
R
.
isEmpty
(
this
.
state
.
realVal
))
{
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'Nilai Seharusnya Harus Diisi'
})
}
else
if
(
this
.
state
.
disabledCondt
===
false
&&
R
.
isEmpty
(
this
.
state
.
condition
))
return
alert
(
"Kondisi Jika Salah is Required."
)
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date tidak boleh kosong'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date tidak boleh kosong'
})
}
else
{
else
{
this
.
updateReportItems
()
this
.
updateReportItems
()
}
}
...
@@ -368,6 +355,8 @@ export default class EditReportItems extends Component {
...
@@ -368,6 +355,8 @@ export default class EditReportItems extends Component {
id
=
"description"
id
=
"description"
label
=
"Deskripsi"
label
=
"Deskripsi"
name
=
"description"
name
=
"description"
error
=
{
this
.
state
.
errorDesc
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
description
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
description
}
inputProps
=
{{
inputProps
=
{{
...
@@ -545,14 +534,15 @@ export default class EditReportItems extends Component {
...
@@ -545,14 +534,15 @@ export default class EditReportItems extends Component {
id
=
"order"
id
=
"order"
label
=
"Order"
label
=
"Order"
name
=
"order"
name
=
"order"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
order
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
order
}
error
=
{
this
.
state
.
errorOrder
}
helperText
=
{
this
.
state
.
msgErrorOrder
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
fontWeight
:
600
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
fontFamily
:
'Nunito Sans, sans-serif'
paddingLeft
:
10
}
}
}}
}}
InputLabelProps
=
{{
InputLabelProps
=
{{
...
@@ -560,8 +550,7 @@ export default class EditReportItems extends Component {
...
@@ -560,8 +550,7 @@ export default class EditReportItems extends Component {
fontSize
:
11
,
fontSize
:
11
,
fontWeight
:
600
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
color
:
'#7e8085'
paddingLeft
:
10
}
}
}}
}}
>
>
...
@@ -623,6 +612,8 @@ export default class EditReportItems extends Component {
...
@@ -623,6 +612,8 @@ export default class EditReportItems extends Component {
label
=
"Formula"
label
=
"Formula"
disabled
=
{
this
.
state
.
InputType
==
null
?
true
:
(
this
.
state
.
InputType
.
type_report_name
===
'Formula'
||
this
.
state
.
InputType
.
type_report_name
===
'Validation'
?
false
:
true
)}
disabled
=
{
this
.
state
.
InputType
==
null
?
true
:
(
this
.
state
.
InputType
.
type_report_name
===
'Formula'
||
this
.
state
.
InputType
.
type_report_name
===
'Validation'
?
false
:
true
)}
name
=
"formula"
name
=
"formula"
error
=
{
this
.
state
.
errorFormula
}
helperText
=
{
this
.
state
.
msgErrorFormula
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
formula
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
formula
}
inputProps
=
{{
inputProps
=
{{
...
@@ -701,7 +692,7 @@ export default class EditReportItems extends Component {
...
@@ -701,7 +692,7 @@ export default class EditReportItems extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
button
onClick
=
{()
=>
this
.
updateReportItems
()}
>
<
button
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
}}
>
Simpan
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
/div
>
<
/div
>
...
...
src/container/MasterData/formReportItems/VisualReportItems.js
View file @
457e97e2
...
@@ -143,9 +143,11 @@ export default class VisualReportItems extends Component {
...
@@ -143,9 +143,11 @@ export default class VisualReportItems extends Component {
}
}
api
.
create
().
getItemReportHierarki
(
payload
).
then
((
response
)
=>
{
api
.
create
().
getItemReportHierarki
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
.
data
)
console
.
log
(
response
.
data
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
setState
({
items
:
response
.
data
.
data
})
this
.
setState
({
items
:
response
.
data
.
data
})
}
}
}
})
})
}
}
...
...
src/container/Otorisasi/User.js
View file @
457e97e2
...
@@ -102,6 +102,7 @@ export default class UserRole extends Component {
...
@@ -102,6 +102,7 @@ export default class UserRole extends Component {
this
.
setState
({
payload
:
body
})
this
.
setState
({
payload
:
body
})
api
.
create
().
checkUploadUser
(
body
).
then
(
response
=>
{
api
.
create
().
checkUploadUser
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataRow
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
dataRow
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
return
[
...
@@ -233,6 +234,7 @@ export default class UserRole extends Component {
...
@@ -233,6 +234,7 @@ export default class UserRole extends Component {
rows
:
dataRow
rows
:
dataRow
});
});
}
}
}
})
})
}
}
});
});
...
@@ -261,7 +263,7 @@ export default class UserRole extends Component {
...
@@ -261,7 +263,7 @@ export default class UserRole extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
href
=
url
;
a
.
download
=
'
Data
User.xlsx'
;
a
.
download
=
'User.xlsx'
;
a
.
click
();
a
.
click
();
}
}
}
}
...
...
src/container/Otorisasi/User/AddUser.js
View file @
457e97e2
...
@@ -70,37 +70,56 @@ export default class AddUser extends Component {
...
@@ -70,37 +70,56 @@ export default class AddUser extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getRole
()
this
.
getRole
()
this
.
getPerusahaan
()
this
.
getPerusahaan
()
if
(
this
.
props
.
type
===
'edit'
)
{
//
}
else
{
let
date
=
format
(
new
Date
,
'yyyy-MM-dd'
)
console
.
log
(
date
);
this
.
setState
({
startDate
:
date
,
endDate
:
date
})
}
}
}
handleChange
(
e
,
type
)
{
handleChange
(
e
,
type
)
{
let
data
=
this
.
state
let
data
=
this
.
state
let
isDate
=
type
!==
''
?
true
:
false
let
isDate
=
type
!==
''
?
true
:
false
if
(
isDate
&&
type
===
'start_date'
)
{
if
(
isDate
&&
type
===
'start_date'
)
{
this
.
setState
({
this
.
setState
({
...
data
,
startDate
:
format
(
e
,
'yyyy-MM-dd'
),
endDate
:
null
,
...
data
,
startDate
:
format
(
e
,
'yyyy-MM-dd'
),
endDate
:
null
,
errorFullname
:
false
,
errorEmail
:
false
,
errorRoleName
:
false
,
errorRoleName
:
false
,
errorStartDate
:
false
,
errorStartDate
:
false
,
errorEndDate
:
false
,
errorEndDate
:
false
,
msgErrorFN
:
''
,
msgErrorEM
:
''
,
msgErrorRN
:
''
,
msgErrorRN
:
''
,
msgErrorSD
:
''
,
msgErrorSD
:
''
,
msgErrorED
:
''
,
msgErrorED
:
''
,
})
})
}
else
if
(
isDate
&&
type
===
'end_date'
)
{
}
else
if
(
isDate
&&
type
===
'end_date'
)
{
this
.
setState
({
this
.
setState
({
...
data
,
endDate
:
format
(
e
,
'yyyy-MM-dd'
)
,
...
data
,
endDate
:
format
(
e
,
'yyyy-MM-dd'
),
errorFullname
:
false
,
errorEmail
:
false
,
errorRoleName
:
false
,
errorRoleName
:
false
,
errorStartDate
:
false
,
errorStartDate
:
false
,
errorEndDate
:
false
,
errorEndDate
:
false
,
msgErrorFN
:
''
,
msgErrorEM
:
''
,
msgErrorRN
:
''
,
msgErrorRN
:
''
,
msgErrorSD
:
''
,
msgErrorSD
:
''
,
msgErrorED
:
''
,
msgErrorED
:
''
,
})
})
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
,
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
,
errorFullname
:
false
,
errorEmail
:
false
,
errorRoleName
:
false
,
errorRoleName
:
false
,
errorStartDate
:
false
,
errorStartDate
:
false
,
errorEndDate
:
false
,
errorEndDate
:
false
,
msgErrorFN
:
''
,
msgErrorEM
:
''
,
msgErrorRN
:
''
,
msgErrorRN
:
''
,
msgErrorSD
:
''
,
msgErrorSD
:
''
,
msgErrorED
:
''
,
msgErrorED
:
''
,
...
@@ -108,9 +127,34 @@ export default class AddUser extends Component {
...
@@ -108,9 +127,34 @@ export default class AddUser extends Component {
}
}
}
}
isEmail
(
email
)
{
const
re
=
/^
(([^
<>()
\[\]\\
.,;:
\s
@"
]
+
(\.[^
<>()
\[\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
;
return
re
.
test
(
String
(
email
).
toLowerCase
());
}
validasi
()
{
validasi
()
{
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
R
.
isEmpty
(
this
.
state
.
fullname
))
{
this
.
setState
({
errorFullname
:
true
,
msgErrorFN
:
'Nama Lengkap tidak boleh kosong'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
email
))
{
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'Email tidak boleh kosong'
})
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'Format email tidak sesuai!'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
role
))
{
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name tidak boleh kosong'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start Date tidak boleh kosong'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End Date tidak boleh kosong'
})
}
// else if (this.state.privileges.length < 1) {
// alert('Hak Akses belum di pilih !!')
// }
else
{
this
.
createUser
()
this
.
createUser
()
}
}
}
createUser
()
{
createUser
()
{
let
payload
=
{
let
payload
=
{
...
@@ -316,6 +360,19 @@ export default class AddUser extends Component {
...
@@ -316,6 +360,19 @@ export default class AddUser extends Component {
variant
=
"filled"
variant
=
"filled"
value
=
{
'-'
}
value
=
{
'-'
}
onChange
=
{(
e
)
=>
null
}
onChange
=
{(
e
)
=>
null
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
@@ -329,12 +386,27 @@ export default class AddUser extends Component {
...
@@ -329,12 +386,27 @@ export default class AddUser extends Component {
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
className
=
""
>
<
div
className
=
""
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
,
marginTop
:
7
}}
style
=
{{
width
:
'100%'
,
marginTop
:
7
}}
id
=
"fullname"
id
=
"fullname"
name
=
"fullname"
name
=
"fullname"
label
=
"Nama Lengkap"
label
=
"Nama Lengkap"
value
=
{
this
.
state
.
fullname
}
value
=
{
this
.
state
.
fullname
}
error
=
{
this
.
state
.
errorFullname
}
helperText
=
{
this
.
state
.
msgErrorFN
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
// defaultValue="Default Value"
// defaultValue="Default Value"
// helperText="Some important text"
// helperText="Some important text"
/
>
/
>
...
@@ -346,12 +418,27 @@ export default class AddUser extends Component {
...
@@ -346,12 +418,27 @@ export default class AddUser extends Component {
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-bottom-20px"
>
<
div
className
=
"margin-bottom-20px"
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
,
marginTop
:
7
}}
style
=
{{
width
:
'100%'
,
marginTop
:
7
}}
id
=
"email"
id
=
"email"
name
=
"email"
name
=
"email"
label
=
"Email"
label
=
"Email"
value
=
{
this
.
state
.
email
}
value
=
{
this
.
state
.
email
}
error
=
{
this
.
state
.
errorEmail
}
helperText
=
{
this
.
state
.
msgErrorEM
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
// defaultValue="Default Value"
// defaultValue="Default Value"
// helperText="Some important text"
// helperText="Some important text"
/
>
/
>
...
@@ -365,7 +452,24 @@ export default class AddUser extends Component {
...
@@ -365,7 +452,24 @@ export default class AddUser extends Component {
id
=
"role"
id
=
"role"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
role
:
newInputValue
})}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
role
:
newInputValue
})}
debug
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Role"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Role"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
error
=
{
this
.
state
.
errorRoleName
}
helperText
=
{
this
.
state
.
msgErrorRN
}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
role
}
value
=
{
this
.
state
.
role
}
/
>
/
>
<
/div
>
<
/div
>
...
@@ -387,6 +491,19 @@ export default class AddUser extends Component {
...
@@ -387,6 +491,19 @@ export default class AddUser extends Component {
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
...
@@ -408,6 +525,19 @@ export default class AddUser extends Component {
...
@@ -408,6 +525,19 @@ export default class AddUser extends Component {
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
...
@@ -426,6 +556,19 @@ export default class AddUser extends Component {
...
@@ -426,6 +556,19 @@ export default class AddUser extends Component {
// id="outlined-read-only-input"
// id="outlined-read-only-input"
variant
=
"filled"
variant
=
"filled"
value
=
{
'Aktif'
}
value
=
{
'Aktif'
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
@@ -447,6 +590,19 @@ export default class AddUser extends Component {
...
@@ -447,6 +590,19 @@ export default class AddUser extends Component {
// id="outlined-read-only-input"
// id="outlined-read-only-input"
variant
=
"filled"
variant
=
"filled"
value
=
{
'T'
}
value
=
{
'T'
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
...
src/container/Otorisasi/User/EditUser.js
View file @
457e97e2
...
@@ -126,12 +126,22 @@ export default class EditUser extends Component {
...
@@ -126,12 +126,22 @@ export default class EditUser extends Component {
})
})
}
}
isEmail
(
email
)
{
const
re
=
/^
(([^
<>()
\[\]\\
.,;:
\s
@"
]
+
(\.[^
<>()
\[\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
;
return
re
.
test
(
String
(
email
).
toLowerCase
());
}
validasi
()
{
validasi
()
{
var
isEmail
=
this
.
isEmail
(
this
.
state
.
tempData
.
email
)
// 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
:
'Nama Lengkap tidak boleh kosong'
})
}
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 tidak boleh kosong'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
role_name
))
{
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgErrorEM
:
'Format email tidak sesuai!'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
role
))
{
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name tidak boleh kosong'
})
this
.
setState
({
errorRoleName
:
true
,
msgErrorRN
:
'Role Name tidak boleh kosong'
})
}
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 tidak boleh kosong'
})
...
@@ -349,6 +359,19 @@ export default class EditUser extends Component {
...
@@ -349,6 +359,19 @@ export default class EditUser extends Component {
variant
=
"filled"
variant
=
"filled"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
user_id
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
user_id
}
onChange
=
{(
e
)
=>
null
}
onChange
=
{(
e
)
=>
null
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
@@ -371,6 +394,19 @@ export default class EditUser extends Component {
...
@@ -371,6 +394,19 @@ export default class EditUser extends Component {
// defaultValue="Default Value"
// defaultValue="Default Value"
error
=
{
this
.
state
.
errorFullname
}
error
=
{
this
.
state
.
errorFullname
}
helperText
=
{
this
.
state
.
msgErrorFN
}
helperText
=
{
this
.
state
.
msgErrorFN
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -388,6 +424,19 @@ export default class EditUser extends Component {
...
@@ -388,6 +424,19 @@ export default class EditUser extends Component {
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
error
=
{
this
.
state
.
errorEmail
}
error
=
{
this
.
state
.
errorEmail
}
helperText
=
{
this
.
state
.
msgErrorEM
}
helperText
=
{
this
.
state
.
msgErrorEM
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -400,7 +449,23 @@ export default class EditUser extends Component {
...
@@ -400,7 +449,23 @@ export default class EditUser extends Component {
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
role
:
newInputValue
})}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
role
:
newInputValue
})}
debug
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Role"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Role"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
error
=
{
this
.
state
.
errorRoleName
}
helperText
=
{
this
.
state
.
msgErrorRN
}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
role
}
value
=
{
this
.
state
.
role
}
/
>
/
>
<
/div
>
<
/div
>
...
@@ -422,6 +487,19 @@ export default class EditUser extends Component {
...
@@ -422,6 +487,19 @@ export default class EditUser extends Component {
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
<
/div
>
<
/div
>
...
@@ -442,7 +520,19 @@ export default class EditUser extends Component {
...
@@ -442,7 +520,19 @@ export default class EditUser extends Component {
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
<
/div
>
<
/div
>
...
@@ -460,6 +550,19 @@ export default class EditUser extends Component {
...
@@ -460,6 +550,19 @@ export default class EditUser extends Component {
// id="outlined-read-only-input"
// id="outlined-read-only-input"
variant
=
"filled"
variant
=
"filled"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
status
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
status
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
@@ -481,6 +584,19 @@ export default class EditUser extends Component {
...
@@ -481,6 +584,19 @@ export default class EditUser extends Component {
// id="outlined-read-only-input"
// id="outlined-read-only-input"
variant
=
"filled"
variant
=
"filled"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
is_expired
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
is_expired
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
...
src/container/Otorisasi/UserRole/AddRole.js
View file @
457e97e2
...
@@ -52,6 +52,16 @@ export default class AddRole extends Component {
...
@@ -52,6 +52,16 @@ export default class AddRole extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getMenu
()
this
.
getMenu
()
if
(
this
.
props
.
type
===
'edit'
)
{
//
}
else
{
let
date
=
format
(
new
Date
,
'yyyy-MM-dd'
)
console
.
log
(
date
);
this
.
setState
({
startDate
:
date
,
endDate
:
date
})
}
}
}
handleChange
(
e
,
type
)
{
handleChange
(
e
,
type
)
{
...
@@ -266,6 +276,19 @@ export default class AddRole extends Component {
...
@@ -266,6 +276,19 @@ export default class AddRole extends Component {
variant
=
"filled"
variant
=
"filled"
value
=
{
'-'
}
value
=
{
'-'
}
onChange
=
{(
e
)
=>
null
}
onChange
=
{(
e
)
=>
null
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
@@ -287,6 +310,19 @@ export default class AddRole extends Component {
...
@@ -287,6 +310,19 @@ export default class AddRole extends Component {
error
=
{
this
.
state
.
errorRoleName
}
error
=
{
this
.
state
.
errorRoleName
}
helperText
=
{
this
.
state
.
msgErrorRN
}
helperText
=
{
this
.
state
.
msgErrorRN
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
// defaultValue="Default Value"
// defaultValue="Default Value"
// helperText="Some important text"
// helperText="Some important text"
/
>
/
>
...
@@ -309,6 +345,19 @@ export default class AddRole extends Component {
...
@@ -309,6 +345,19 @@ export default class AddRole extends Component {
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
...
@@ -330,6 +379,19 @@ export default class AddRole extends Component {
...
@@ -330,6 +379,19 @@ export default class AddRole extends Component {
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
...
@@ -348,6 +410,20 @@ export default class AddRole extends Component {
...
@@ -348,6 +410,20 @@ export default class AddRole extends Component {
// id="outlined-read-only-input"
// id="outlined-read-only-input"
variant
=
"filled"
variant
=
"filled"
value
=
{
'Aktif'
}
value
=
{
'Aktif'
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
...
src/container/Otorisasi/UserRole/EditRole.js
View file @
457e97e2
...
@@ -274,6 +274,19 @@ export default class EditRole extends Component {
...
@@ -274,6 +274,19 @@ export default class EditRole extends Component {
variant
=
"filled"
variant
=
"filled"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
role_id
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
role_id
}
onChange
=
{(
e
)
=>
null
}
onChange
=
{(
e
)
=>
null
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
@@ -295,6 +308,19 @@ export default class EditRole extends Component {
...
@@ -295,6 +308,19 @@ export default class EditRole extends Component {
error
=
{
this
.
state
.
errorRoleName
}
error
=
{
this
.
state
.
errorRoleName
}
helperText
=
{
this
.
state
.
msgErrorRN
}
helperText
=
{
this
.
state
.
msgErrorRN
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
// defaultValue="Default Value"
// defaultValue="Default Value"
// helperText="Some important text"
// helperText="Some important text"
/
>
/
>
...
@@ -317,6 +343,19 @@ export default class EditRole extends Component {
...
@@ -317,6 +343,19 @@ export default class EditRole extends Component {
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
...
@@ -338,6 +377,19 @@ export default class EditRole extends Component {
...
@@ -338,6 +377,19 @@ export default class EditRole extends Component {
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
...
@@ -356,6 +408,19 @@ export default class EditRole extends Component {
...
@@ -356,6 +408,19 @@ export default class EditRole extends Component {
// id="outlined-read-only-input"
// id="outlined-read-only-input"
variant
=
"filled"
variant
=
"filled"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
status
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
status
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
>
>
{
/* {periode.map((option) => (
{
/* {periode.map((option) => (
<MenuItem key={option.value} value={option.value}>
<MenuItem key={option.value} value={option.value}>
...
...
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