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
208c0945
Commit
208c0945
authored
Aug 18, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
update See merge request
!119
parents
34a1f518
bc96792c
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
227 additions
and
185 deletions
+227
-185
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+213
-162
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+14
-23
No files found.
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
208c0945
This diff is collapsed.
Click to expand it.
src/container/MasterData/formReportItems/EditReportItems.js
View file @
208c0945
...
...
@@ -116,27 +116,14 @@ export default class EditReportItems 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
.
tempData
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order Harus Diisi'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
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
))
{
}
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
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
{
this
.
updateReportItems
()
}
...
...
@@ -368,6 +355,8 @@ export default class EditReportItems extends Component {
id
=
"description"
label
=
"Deskripsi"
name
=
"description"
error
=
{
this
.
state
.
errorDesc
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
description
}
inputProps
=
{{
...
...
@@ -545,14 +534,15 @@ export default class EditReportItems extends Component {
id
=
"order"
label
=
"Order"
name
=
"order"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
order
}
error
=
{
this
.
state
.
errorOrder
}
helperText
=
{
this
.
state
.
msgErrorOrder
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputLabelProps
=
{{
...
...
@@ -560,8 +550,7 @@ export default class EditReportItems extends Component {
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
color
:
'#7e8085'
}
}}
>
...
...
@@ -623,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
=
{{
...
...
@@ -701,7 +692,7 @@ export default class EditReportItems extends Component {
<
/button
>
<
/div
>
<
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'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
/div
>
...
...
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