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
bc96792c
Commit
bc96792c
authored
Aug 18, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update lagi
parent
81961ca8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
218 additions
and
162 deletions
+218
-162
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+212
-161
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+6
-1
No files found.
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
bc96792c
...
...
@@ -113,13 +113,12 @@ export default class CreateReportItems extends Component {
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
))
return
alert
(
"Jenis Laporan 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'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
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
(
this
.
state
.
disabledFormula
===
false
&&
R
.
isEmpty
(
this
.
state
.
formula
))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula Harus Diisi'
})
...
...
@@ -290,8 +289,7 @@ export default class CreateReportItems extends Component {
<
/div
>
<
/div
>
<
div
className
=
"border-bottom grid grid-2x grid-mobile-none gap-15px"
style
=
{{
padding
:
20
}}
>
<
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
...
...
@@ -317,7 +315,36 @@ export default class CreateReportItems extends Component {
}}
/
>
<
/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
{...
this
.
state
.
listCompany
}
id
=
"company"
...
...
@@ -339,17 +366,19 @@ export default class CreateReportItems extends Component {
value
=
{
this
.
state
.
company
}
/
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"description"
label
=
"Deskripsi"
name
=
"description"
value
=
{
this
.
state
.
description
}
error
=
{
this
.
state
.
errorDesc
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
id
=
"orders"
name
=
"order"
label
=
"Order"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
order
}
error
=
{
this
.
state
.
errorOrder
}
helperText
=
{
this
.
state
.
msgErrorOrder
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
// value={this.props.data.business_unit_name}
inputProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -368,14 +397,22 @@ export default class CreateReportItems extends Component {
>
<
/TextField
>
<
/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
style
=
{{
width
:
'100%'
}}
id
=
"uom"
name
=
"uom"
label
=
"UOM"
value
=
{
this
.
state
.
uom
}
id
=
"description"
label
=
"Deskripsi"
name
=
"description"
value
=
{
this
.
state
.
description
}
error
=
{
this
.
state
.
errorDesc
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
// value={this.props.data.business_unit_name}
inputProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -394,20 +431,18 @@ export default class CreateReportItems extends Component {
>
<
/TextField
>
<
/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
.
listInputType
}
id
=
"inputType"
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
:
''
})
)}
{...
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
=
"
Tipe Data
"
label
=
"
Parent ID
"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -418,20 +453,21 @@ export default class CreateReportItems extends Component {
}}
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
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
style
=
{{
width
:
'100%'
}}
id
=
"realVal"
label
=
"Nilai Seharusnya"
name
=
"realVal"
disabled
=
{
this
.
state
.
disabledValue
}
value
=
{
this
.
state
.
realVal
}
error
=
{
this
.
state
.
errorRV
}
helperText
=
{
this
.
state
.
msgErrorRV
}
id
=
"uom"
name
=
"uom"
label
=
"UOM"
value
=
{
this
.
state
.
uom
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
...
...
@@ -448,47 +484,19 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
,
}
}}
/
>
>
<
/TextField
>
<
/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
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
style
=
{{
width
:
'100%'
}}
value
=
{
'Aktif'
}
id
=
"status"
label
=
"Status"
disabled
id
=
"weight"
label
=
"Weight"
name
=
"weight"
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -504,31 +512,28 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
,
}
}}
/
>
<
/div
>
<
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
>
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
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
}}
>
<
Autocomplete
{...
this
.
state
.
listReportType
}
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
})}
{...
this
.
state
.
listInputType
}
id
=
"inputType"
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
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"
Jenis Laporan
"
label
=
"
Tipe Data
"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -539,19 +544,21 @@ export default class CreateReportItems extends Component {
}}
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
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"
orders
"
name
=
"order
"
label
=
"Order
"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)
}
value
=
{
this
.
state
.
order
}
error
=
{
this
.
state
.
error
Order
}
helperText
=
{
this
.
state
.
msgError
Order
}
id
=
"
formula
"
label
=
"Formula
"
name
=
"formula
"
disabled
=
{
this
.
state
.
disabledFormula
}
value
=
{
this
.
state
.
formula
}
error
=
{
this
.
state
.
error
Formula
}
helperText
=
{
this
.
state
.
msgError
Formula
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
...
...
@@ -571,65 +578,21 @@ export default class CreateReportItems extends Component {
>
<
/TextField
>
<
/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
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
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
style
=
{{
width
:
'100%'
}}
id
=
"
formula
"
label
=
"
Formul
a"
name
=
"
formula
"
disabled
=
{
this
.
state
.
disabled
Formula
}
value
=
{
this
.
state
.
formula
}
error
=
{
this
.
state
.
error
Formula
}
helperText
=
{
this
.
state
.
msgError
Formula
}
id
=
"
realVal
"
label
=
"
Nilai Seharusny
a"
name
=
"
realVal
"
disabled
=
{
this
.
state
.
disabled
Value
}
value
=
{
this
.
state
.
realVal
}
error
=
{
this
.
state
.
error
RV
}
helperText
=
{
this
.
state
.
msgError
RV
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
...
...
@@ -646,10 +609,11 @@ export default class CreateReportItems extends Component {
color
:
'#7e8085'
,
}
}}
>
<
/TextField
>
/
>
<
/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
value
=
{
this
.
state
.
condition
}
id
=
"isWrongCondition"
...
...
@@ -673,6 +637,45 @@ export default class CreateReportItems extends Component {
/>
}
/>
<
/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
}}
>
<
DatePicker
margin
=
"normal"
...
...
@@ -707,7 +710,50 @@ export default class CreateReportItems extends Component {
/
>
<
/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
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 {
<
/button
>
<
/div
>
<
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
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
bc96792c
...
...
@@ -120,7 +120,10 @@ export default class EditReportItems extends Component {
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order Harus Diisi'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Deskripsi Harus Diisi'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
InputType
))
return
alert
(
"Tipe Data is Required."
)
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
return
alert
(
"Tipe Data harus dipilih."
)
else
if
(
this
.
state
.
InputType
.
type_report_name
===
'Formula'
||
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula Harus Diisi'
})
}
else
{
this
.
updateReportItems
()
}
...
...
@@ -609,6 +612,8 @@ export default class EditReportItems extends Component {
label
=
"Formula"
disabled
=
{
this
.
state
.
InputType
==
null
?
true
:
(
this
.
state
.
InputType
.
type_report_name
===
'Formula'
||
this
.
state
.
InputType
.
type_report_name
===
'Validation'
?
false
:
true
)}
name
=
"formula"
error
=
{
this
.
state
.
errorFormula
}
helperText
=
{
this
.
state
.
msgErrorFormula
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
formula
}
inputProps
=
{{
...
...
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