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
c922937d
Commit
c922937d
authored
Aug 20, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
validasi minor
parent
217cae5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
11 deletions
+39
-11
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+21
-5
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+18
-6
No files found.
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
c922937d
...
@@ -38,6 +38,10 @@ export default class CreateReportItems extends Component {
...
@@ -38,6 +38,10 @@ export default class CreateReportItems extends Component {
errorEndDate
:
false
,
errorEndDate
:
false
,
errorTipeData
:
false
,
errorTipeData
:
false
,
errorCondition
:
false
,
errorCondition
:
false
,
errorJenisLaporan
:
false
,
errorPerusahaan
:
false
,
msgErrorJenisLaporan
:
''
,
msgErrorPerusahaan
:
''
,
msgErrorTipeData
:
''
,
msgErrorTipeData
:
''
,
msgErrorCondition
:
''
,
msgErrorCondition
:
''
,
msgErrorOrder
:
''
,
msgErrorOrder
:
''
,
...
@@ -136,9 +140,11 @@ export default class CreateReportItems extends Component {
...
@@ -136,9 +140,11 @@ export default class CreateReportItems extends Component {
validasi
()
{
validasi
()
{
// alert('coba ya')
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
))
return
alert
(
"Jenis Laporan is Required."
);
if
(
R
.
isNil
(
this
.
state
.
reportType
))
{
if
(
R
.
isNil
(
this
.
state
.
company
))
return
alert
(
"Perusahaan is Required."
);
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Jenis Laporan Harus Diisi'
})
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Perusahaan Harus Diisi'
})
}
else
if
(
R
.
isEmpty
(
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
))
{
...
@@ -289,10 +295,14 @@ export default class CreateReportItems extends Component {
...
@@ -289,10 +295,14 @@ export default class CreateReportItems extends Component {
clearMessage
()
{
clearMessage
()
{
this
.
setState
({
this
.
setState
({
errorFormula
:
false
,
msgErrorFormula
:
''
,
errorTipeData
:
false
,
errorTipeData
:
false
,
errorCondition
:
false
,
errorCondition
:
false
,
msgErrorTipeData
:
''
,
msgErrorTipeData
:
''
,
msgErrorCondition
:
''
,
msgErrorCondition
:
''
,
errorRV
:
false
,
msgErrorRV
:
''
,
errorJenisLaporan
:
false
,
msgErrorJenisLaporan
:
''
,
errorPerusahaan
:
false
,
msgErrorPerusahaan
:
''
})
})
}
}
...
@@ -348,7 +358,7 @@ export default class CreateReportItems extends Component {
...
@@ -348,7 +358,7 @@ export default class CreateReportItems extends Component {
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listReportType
}
{...
this
.
state
.
listReportType
}
id
=
"reportType"
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
})}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
}
,
()
=>
this
.
clearMessage
()
)}
debug
debug
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
...
@@ -360,6 +370,8 @@ export default class CreateReportItems extends Component {
...
@@ -360,6 +370,8 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
color
:
'#7e8085'
}
}
}}
}}
error
=
{
this
.
state
.
errorJenisLaporan
}
helperText
=
{
this
.
state
.
msgErrorJenisLaporan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
}
value
=
{
this
.
state
.
reportType
}
value
=
{
this
.
state
.
reportType
}
...
@@ -374,7 +386,7 @@ export default class CreateReportItems extends Component {
...
@@ -374,7 +386,7 @@ export default class CreateReportItems extends Component {
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listCompany
}
{...
this
.
state
.
listCompany
}
id
=
"company"
id
=
"company"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
this
.
getParent
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
this
.
getParent
()
,
this
.
clearMessage
()
)}
debug
debug
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
...
@@ -386,6 +398,8 @@ export default class CreateReportItems extends Component {
...
@@ -386,6 +398,8 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
color
:
'#7e8085'
}
}
}}
}}
error
=
{
this
.
state
.
errorPerusahaan
}
helperText
=
{
this
.
state
.
msgErrorPerusahaan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
}
value
=
{
this
.
state
.
company
}
value
=
{
this
.
state
.
company
}
...
@@ -583,6 +597,8 @@ export default class CreateReportItems extends Component {
...
@@ -583,6 +597,8 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
color
:
'#7e8085'
}
}
}}
}}
error
=
{
this
.
state
.
errorTipeData
}
helperText
=
{
this
.
state
.
msgErrorTipeData
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
}
value
=
{
this
.
state
.
InputType
}
value
=
{
this
.
state
.
InputType
}
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
c922937d
...
@@ -41,6 +41,10 @@ export default class EditReportItems extends Component {
...
@@ -41,6 +41,10 @@ export default class EditReportItems extends Component {
errorRV
:
false
,
errorRV
:
false
,
errorStartDate
:
false
,
errorStartDate
:
false
,
errorEndDate
:
false
,
errorEndDate
:
false
,
errorJenisLaporan
:
false
,
errorPerusahaan
:
false
,
msgErrorJenisLaporan
:
''
,
msgErrorPerusahaan
:
''
,
msgErrorOrder
:
''
,
msgErrorOrder
:
''
,
msgErrorDesc
:
''
,
msgErrorDesc
:
''
,
msgErrorFormula
:
''
,
msgErrorFormula
:
''
,
...
@@ -123,9 +127,11 @@ export default class EditReportItems extends Component {
...
@@ -123,9 +127,11 @@ export default class EditReportItems extends Component {
validasi
()
{
validasi
()
{
// alert('coba ya')
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
))
return
alert
(
"Jenis Laporan is Required."
);
if
(
R
.
isNil
(
this
.
state
.
reportType
)){
if
(
R
.
isNil
(
this
.
state
.
company
))
return
alert
(
"Perusahaan is Required."
);
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Jenis Laporan Harus Diisi'
})
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
order
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Perusahaan Harus Diisi'
})
}
else
if
(
R
.
isEmpty
(
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
.
tempData
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Deskripsi Harus Diisi'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Deskripsi Harus Diisi'
})
...
@@ -306,7 +312,9 @@ export default class EditReportItems extends Component {
...
@@ -306,7 +312,9 @@ export default class EditReportItems extends Component {
errorFormula
:
false
,
msgErrorFormula
:
''
,
errorFormula
:
false
,
msgErrorFormula
:
''
,
errorTipeData
:
false
,
msgErrorTipeData
:
''
,
errorTipeData
:
false
,
msgErrorTipeData
:
''
,
errorCondition
:
false
,
msgErrorCondition
:
''
,
errorCondition
:
false
,
msgErrorCondition
:
''
,
errorRV
:
false
,
msgErrorRV
:
''
errorRV
:
false
,
msgErrorRV
:
''
,
errorJenisLaporan
:
false
,
msgErrorJenisLaporan
:
''
,
errorPerusahaan
:
false
,
msgErrorPerusahaan
:
''
})
})
}
}
...
@@ -373,7 +381,7 @@ export default class EditReportItems extends Component {
...
@@ -373,7 +381,7 @@ export default class EditReportItems extends Component {
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listReportType
}
{...
this
.
state
.
listReportType
}
id
=
"reportType"
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
},
()
=>
this
.
getParent
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
},
()
=>
this
.
getParent
()
,
this
.
clearMessage
()
)}
debug
debug
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
...
@@ -385,6 +393,8 @@ export default class EditReportItems extends Component {
...
@@ -385,6 +393,8 @@ export default class EditReportItems extends Component {
color
:
'#7e8085'
color
:
'#7e8085'
}
}
}}
}}
error
=
{
this
.
state
.
errorJenisLaporan
}
helperText
=
{
this
.
state
.
msgErrorJenisLaporan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
}
value
=
{
this
.
state
.
reportType
}
value
=
{
this
.
state
.
reportType
}
...
@@ -398,7 +408,7 @@ export default class EditReportItems extends Component {
...
@@ -398,7 +408,7 @@ export default class EditReportItems extends Component {
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listCompany
}
{...
this
.
state
.
listCompany
}
id
=
"company"
id
=
"company"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
this
.
getParent
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
this
.
getParent
()
,
this
.
clearMessage
()
)}
debug
debug
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
...
@@ -410,6 +420,8 @@ export default class EditReportItems extends Component {
...
@@ -410,6 +420,8 @@ export default class EditReportItems extends Component {
color
:
'#7e8085'
color
:
'#7e8085'
}
}
}}
}}
error
=
{
this
.
state
.
errorPerusahaan
}
helperText
=
{
this
.
state
.
msgErrorPerusahaan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
}
value
=
{
this
.
state
.
company
}
value
=
{
this
.
state
.
company
}
...
...
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