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
61a0b252
Commit
61a0b252
authored
Aug 19, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create edit report item
parent
bc0608d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
196 additions
and
207 deletions
+196
-207
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+17
-41
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+179
-166
No files found.
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
61a0b252
...
...
@@ -18,7 +18,7 @@ export default class CreateReportItems extends Component {
reportType
:
null
,
startDate
:
null
,
endDate
:
null
,
order
:
null
,
order
:
''
,
description
:
''
,
uom
:
''
,
weight
:
null
,
...
...
@@ -145,7 +145,7 @@ export default class CreateReportItems extends Component {
"company_id"
:
this
.
state
.
company
.
company_id
,
"description"
:
this
.
state
.
description
,
"orders"
:
this
.
state
.
order
,
"parent"
:
this
.
state
.
parent
.
item_report_id
,
"parent"
:
this
.
state
.
parent
===
null
?
null
:
this
.
state
.
parent
.
item_report_id
,
"type_report_id"
:
this
.
state
.
InputType
.
type_report_id
,
"formula"
:
this
.
state
.
formula
,
"uom"
:
this
.
state
.
uom
,
...
...
@@ -158,12 +158,14 @@ export default class CreateReportItems extends Component {
console
.
log
(
payload
)
api
.
create
().
createReportItems
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
}
else
{
alert
(
response
.
data
.
message
)
}
}
})
}
...
...
@@ -301,14 +303,12 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
...
...
@@ -329,12 +329,11 @@ export default class CreateReportItems extends Component {
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
font
Weight
:
600
,
font
Family
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
reportType
}
/
>
...
...
@@ -356,12 +355,11 @@ export default class CreateReportItems extends Component {
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
font
Weight
:
600
,
font
Family
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
company
}
/
>
...
...
@@ -374,22 +372,19 @@ export default class CreateReportItems extends Component {
id
=
"orders"
name
=
"order"
label
=
"Order"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
null
)}
value
=
{
this
.
state
.
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'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
...
...
@@ -416,14 +411,12 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
...
...
@@ -446,12 +439,11 @@ export default class CreateReportItems extends Component {
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
font
Weight
:
600
,
font
Family
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
parent
}
/
>
...
...
@@ -472,14 +464,12 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
...
...
@@ -500,14 +490,12 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
...
...
@@ -537,12 +525,11 @@ export default class CreateReportItems extends Component {
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
font
Weight
:
600
,
font
Family
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
InputType
}
/
>
...
...
@@ -563,14 +550,12 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
...
...
@@ -597,14 +582,12 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
...
...
@@ -628,12 +611,11 @@ export default class CreateReportItems extends Component {
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'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
<
/div
>
...
...
@@ -648,7 +630,7 @@ export default class CreateReportItems extends Component {
id
=
"startDate"
label
=
"Berlaku Mulai"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
startDate
}
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorSD
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
...
...
@@ -658,7 +640,6 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
...
...
@@ -666,7 +647,6 @@ export default class CreateReportItems extends Component {
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
...
...
@@ -682,7 +662,7 @@ export default class CreateReportItems extends Component {
id
=
"endDate"
label
=
"Berlaku Hingga"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
endDate
}
value
=
{
this
.
state
.
endDate
==
""
?
null
:
this
.
state
.
endDate
}
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorED
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'end_date'
)}
...
...
@@ -693,7 +673,6 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
...
...
@@ -701,7 +680,6 @@ export default class CreateReportItems extends Component {
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
...
...
@@ -724,14 +702,12 @@ export default class CreateReportItems extends Component {
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
61a0b252
...
...
@@ -161,12 +161,8 @@ export default class EditReportItems extends Component {
getDetailReportItems
()
{
api
.
create
().
getDetailReportItems
(
this
.
props
.
data
.
item_report_id
).
then
((
response
)
=>
{
this
.
getInputType
()
this
.
getPerusahaan
()
this
.
getReportType
()
this
.
getParent
()
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
tempData
:
response
.
data
.
data
})
this
.
setState
({
tempData
:
response
.
data
.
data
}
,
()
=>
this
.
getInputType
(),
this
.
getPerusahaan
(),
this
.
getReportType
(),
)
console
.
log
(
response
.
data
.
data
)
}
else
{
alert
(
response
.
data
.
message
)
...
...
@@ -215,7 +211,7 @@ export default class EditReportItems extends Component {
};
let
index
=
companyData
.
findIndex
((
val
)
=>
val
.
company_id
===
this
.
state
.
tempData
.
company_id
)
this
.
setState
({
listCompany
:
defaultProps
,
company
:
index
===
-
1
?
null
:
companyData
[
index
]})
this
.
setState
({
listCompany
:
defaultProps
,
company
:
index
===
-
1
?
null
:
companyData
[
index
]}
,
()
=>
this
.
getParent
()
)
}
else
{
alert
(
response
.
data
.
message
)
}
...
...
@@ -276,12 +272,11 @@ export default class EditReportItems extends Component {
}
render
()
{
const
{
startDate
,
endDate
}
=
this
.
state
;
return
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x
"
style
=
{{
backgroundColor
:
'#51c6ea'
,
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x
main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"col-1"
style
=
{{
maxWidth
:
"inherit"
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
className
=
"popup-title"
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
16
,
fontWeight
:
'bold'
}}
>
Edit
Data
<
/span
>
...
...
@@ -298,8 +293,7 @@ export default class EditReportItems 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
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
...
...
@@ -313,20 +307,45 @@ export default class EditReportItems extends Component {
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
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
Autocomplete
{...
this
.
state
.
listReportType
}
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
},
()
=>
this
.
getParent
())}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Jenis Laporan"
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
.
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
}}
>
<
Autocomplete
{...
this
.
state
.
listCompany
}
...
...
@@ -339,37 +358,36 @@ export default class EditReportItems extends Component {
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
font
Weight
:
600
,
font
Family
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
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"
error
=
{
this
.
state
.
errorDesc
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
id
=
"order"
label
=
"Order"
name
=
"order"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
order
}
error
=
{
this
.
state
.
errorOrder
}
helperText
=
{
this
.
state
.
msgErrorOrder
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
description
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
...
...
@@ -377,25 +395,29 @@ export default class EditReportItems 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"
label
=
"UOM"
name
=
"uom"
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
.
uom
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
description
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
...
...
@@ -403,152 +425,77 @@ export default class EditReportItems 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
}}
>
<
Autocomplete
{...
this
.
state
.
listInputType
}
id
=
"inputType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
InputType
:
newInputValue
},
()
=>
console
.
log
(
this
.
state
.
InputType
))}
{...
this
.
state
.
listParent
}
id
=
"parentId"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
parent
:
newInputValue
})}
disabled
=
{
this
.
state
.
reportType
==
null
||
this
.
state
.
company
==
null
}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"
Tipe Data
"
label
=
"
Parent ID
"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
font
Weight
:
600
,
font
Family
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
InputType
}
value
=
{
this
.
state
.
parent
}
/
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"condition_it_should_be"
label
=
"Nilai Seharusnya"
disabled
=
{
this
.
state
.
InputType
==
null
?
true
:
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
?
false
:
true
)}
name
=
"condition_it_should_be"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
condition_it_should_be
}
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
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
id
=
"startDate"
label
=
"Berlaku Mulai"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorSD
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
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%'
}}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
status
}
id
=
"status"
label
=
"Status"
disabled
id
=
"uom"
label
=
"UOM"
name
=
"uom"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
uom
}
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
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
>
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
Autocomplete
{...
this
.
state
.
listReportType
}
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
},
()
=>
this
.
getParent
())}
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
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"order"
label
=
"Order"
name
=
"order"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
order
}
error
=
{
this
.
state
.
errorOrder
}
helperText
=
{
this
.
state
.
msgErrorOrder
}
id
=
"weight"
label
=
"Weight"
name
=
"weight"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
weight
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
...
...
@@ -556,48 +503,53 @@ export default class EditReportItems extends Component {
>
<
/TextField
>
<
/div
>
<
div
style
=
{{
padding
:
10
}}
>
<
/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
}}
>
<
Autocomplete
{...
this
.
state
.
listParent
}
id
=
"parentId"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
parent
:
newInputValue
})}
disabled
=
{
this
.
state
.
reportType
==
null
||
this
.
state
.
company
==
null
}
{...
this
.
state
.
listInputType
}
id
=
"inputType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
InputType
:
newInputValue
},
()
=>
console
.
log
(
this
.
state
.
InputType
))}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"
Parent ID
"
label
=
"
Tipe Data
"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
font
Weight
:
600
,
font
Family
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
parent
}
value
=
{
this
.
state
.
InputType
}
/
>
<
/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
=
"weight"
label
=
"Weight"
name
=
"weight"
id
=
"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
)}
name
=
"formula"
error
=
{
this
.
state
.
errorFormula
}
helperText
=
{
this
.
state
.
msgErrorFormula
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
weight
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
formula
}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
...
...
@@ -605,35 +557,36 @@ export default class EditReportItems extends Component {
>
<
/TextField
>
<
/div
>
<
div
className
=
"margin-top-10px"
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
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"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
)}
name
=
"formula"
error
=
{
this
.
state
.
errorFormula
}
helperText
=
{
this
.
state
.
msgErrorFormula
}
id
=
"condition_it_should_be"
label
=
"Nilai Seharusnya"
disabled
=
{
this
.
state
.
InputType
==
null
?
true
:
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
?
false
:
true
)}
name
=
"condition_it_should_be"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
formula
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
condition_it_should_be
}
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
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
}}
>
<
Autocomplete
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
condition
}
...
...
@@ -649,15 +602,36 @@ export default class EditReportItems extends Component {
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
font
Weight
:
600
,
font
Family
:
'Nunito Sans, sans-serif'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
<
/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
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorSD
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
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"
...
...
@@ -677,7 +651,46 @@ export default class EditReportItems 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
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
status
}
id
=
"status"
label
=
"Status"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
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
}}
>
...
...
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