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
049b1f4a
Commit
049b1f4a
authored
Feb 23, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create master data cat
parent
75ee7b2a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
586 additions
and
573 deletions
+586
-573
CreateMasterDataCAT.js
...container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
+586
-573
No files found.
src/container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
View file @
049b1f4a
...
...
@@ -485,7 +485,8 @@ export default class CreateMasterDataCAT extends Component {
return
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
,
maxHeight
:
600
}}
>
<
div
>
<
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"
>
...
...
@@ -502,6 +503,8 @@ export default class CreateMasterDataCAT extends Component {
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
maxHeight
:
500
,
overflow
:
'scroll'
}}
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
...
...
@@ -510,26 +513,32 @@ export default class CreateMasterDataCAT extends Component {
<
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
=
{
'-'
}
id
=
"ID"
label
=
"ID"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
listCompany
}
id
=
"company"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
,
kpiDisable
:
false
,
maxAchDisable
:
false
},
()
=>
{
this
.
getParent
()
this
.
clearMessage
()
this
.
getKPIType
()
this
.
getMaxAch
()
})}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Company Name"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorPerusahaan
}
helperText
=
{
this
.
state
.
msgErrorPerusahaan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
company
}
/
>
<
/div
>
<
/div
>
...
...
@@ -545,7 +554,7 @@ export default class CreateMasterDataCAT extends Component {
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Report Type
"
label
=
"Year
"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -563,34 +572,32 @@ export default class CreateMasterDataCAT extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
,
margin
:
20
,
marginBottom
:
10
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
}}
>
Item
Report
-
1
<
/Typography
>
<
/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"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
,
kpiDisable
:
false
,
maxAchDisable
:
false
},
()
=>
{
this
.
getParent
()
this
.
clearMessage
()
this
.
getKPIType
()
this
.
getMaxAch
()
})}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Company Name"
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
{
'-'
}
id
=
"ID"
label
=
"ID"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
color
:
'#7e8085'
,
}
}}
error
=
{
this
.
state
.
errorPerusahaan
}
helperText
=
{
this
.
state
.
msgErrorPerusahaan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
company
}
/
>
<
/div
>
<
/div
>
...
...
@@ -600,12 +607,13 @@ export default class CreateMasterDataCAT extends Component {
style
=
{{
width
:
'100%'
}}
id
=
"orders"
name
=
"order"
label
=
"Order"
type
=
"number"
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
null
)}
value
=
{
this
.
state
.
order
}
error
=
{
this
.
state
.
errorOrder
}
helperText
=
{
this
.
state
.
msgErrorOrder
}
label
=
"Report Name"
// disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value
=
{
'CAT'
}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps
=
{{
min
:
0
,
style
:
{
...
...
@@ -628,17 +636,44 @@ export default class CreateMasterDataCAT extends Component {
<
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
=
"reportName1"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
,
kpiDisable
:
true
,
maxAchDisable
:
true
},
()
=>
{
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
},
()
=>
this
.
clearMessage
())
:
this
.
clearMessage
();
})}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Item Report Name"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorJenisLaporan
}
helperText
=
{
this
.
state
.
msgErrorJenisLaporan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
reportType
}
// value={'FINANCIAL PERSPECTIVE'}
// disabled
/
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"description"
label
=
"Description"
name
=
"description"
value
=
{
this
.
state
.
description
}
error
=
{
this
.
state
.
errorDesc
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
id
=
"weight"
label
=
"Weight"
name
=
"weight"
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
// value={this.props.data.business_unit_name}
inputProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -656,42 +691,21 @@ export default class CreateMasterDataCAT extends Component {
<
/TextField
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
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
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
parent
}
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
,
margin
:
20
,
marginBottom
:
10
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
}}
>
Item
Report
-
2
<
/Typography
>
<
/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
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"uom"
name
=
"uom"
label
=
"UOM"
value
=
{
this
.
state
.
uom
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
'-'
}
id
=
"ID"
label
=
"ID"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -705,20 +719,24 @@ export default class CreateMasterDataCAT extends Component {
color
:
'#7e8085'
,
}
}}
>
<
/TextField
>
/
>
<
/div
>
<
/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"
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
id
=
"orders"
name
=
"order"
label
=
"Report Name"
disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value
=
{
'CAT'
}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps
=
{{
min
:
0
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
...
...
@@ -741,52 +759,16 @@ export default class CreateMasterDataCAT extends Component {
<
div
className
=
"column-1"
>
<
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_item_report_name
===
'Formula'
?
this
.
setState
({
disabledFormula
:
false
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
},
()
=>
this
.
clearMessage
())
:
newInputValue
.
type_item_report_name
===
'Validation'
?
this
.
setState
({
disabledFormula
:
false
,
disabledCondt
:
false
,
disabledValue
:
false
,
formula
:
''
,
condition
:
''
,
realVal
:
''
},
()
=>
this
.
clearMessage
())
:
newInputValue
.
type_item_report_name
===
'Formula - Summary'
?
this
.
setState
({
disabledFormula
:
false
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
},
()
=>
this
.
clearMessage
())
:
this
.
setState
({
disabledFormula
:
true
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
},
()
=>
this
.
clearMessage
())
)}
{...
this
.
state
.
listReportType
}
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
,
kpiDisable
:
true
,
maxAchDisable
:
true
},
()
=>
{
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
},
()
=>
this
.
clearMessage
())
:
this
.
clearMessage
();
})}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Data Type"
error
=
{
this
.
state
.
errorTipeData
}
helperText
=
{
this
.
state
.
msgErrorTipeData
}
label
=
"Item Report Name"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -794,11 +776,13 @@ export default class CreateMasterDataCAT extends Component {
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorTipeData
}
helperText
=
{
this
.
state
.
msgErrorTipeData
}
error
=
{
this
.
state
.
errorJenisLaporan
}
helperText
=
{
this
.
state
.
msgErrorJenisLaporan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
InputType
}
value
=
{
this
.
state
.
reportType
}
// value={'FINANCIAL PERSPECTIVE'}
// disabled
/
>
<
/div
>
<
/div
>
...
...
@@ -806,13 +790,10 @@ export default class CreateMasterDataCAT extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"formula"
label
=
"Formula"
name
=
"formula"
disabled
=
{
this
.
state
.
disabledFormula
}
value
=
{
this
.
state
.
formula
}
error
=
{
this
.
state
.
errorFormula
}
helperText
=
{
this
.
state
.
msgErrorFormula
}
id
=
"weight"
label
=
"Weight"
name
=
"weight"
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
...
...
@@ -833,19 +814,19 @@ export default class CreateMasterDataCAT extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
,
margin
:
20
,
marginBottom
:
10
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
}}
>
Item
Report
-
3
<
/Typography
>
<
/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
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"realVal"
label
=
"True Value"
name
=
"realVal"
disabled
=
{
this
.
state
.
disabledValue
}
value
=
{
this
.
state
.
realVal
}
error
=
{
this
.
state
.
errorRV
}
helperText
=
{
this
.
state
.
msgErrorRV
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
'-'
}
id
=
"ID"
label
=
"ID"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -864,49 +845,51 @@ export default class CreateMasterDataCAT extends Component {
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
value
=
{
this
.
state
.
condition
}
id
=
"isWrongCondition"
disabled
=
{
this
.
state
.
disabledCondt
}
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
condition
:
newValue
},
()
=>
this
.
clearMessage
());
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"orders"
name
=
"order"
label
=
"Report Name"
disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value
=
{
'CAT'
}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps
=
{{
min
:
0
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
options
=
{
this
.
state
.
options
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
error
=
{
this
.
state
.
errorCondition
}
helperText
=
{
this
.
state
.
msgErrorCondition
}
label
=
"False Condition"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
color
:
'#7e8085'
,
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
reportType
!==
null
&&
(
this
.
state
.
reportType
.
report_name
===
'CAT'
&&
(
<
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
.
listKPI
}
value
=
{
this
.
state
.
kpiTypeValue
}
id
=
"kpiType"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
kpiTypeValue
:
newValue
},
()
=>
this
.
clearMessage
()
);
}
}
disabled
=
{
this
.
state
.
kpiDisable
}
{...
this
.
state
.
listReportType
}
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
,
kpiDisable
:
true
,
maxAchDisable
:
true
},
()
=>
{
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
},
()
=>
this
.
clearMessage
())
:
this
.
clearMessage
(
);
})
}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"KPI Typ
e"
label
=
"Item Report Nam
e"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -914,85 +897,88 @@ export default class CreateMasterDataCAT extends Component {
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorJenisLaporan
}
helperText
=
{
this
.
state
.
msgErrorJenisLaporan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
reportType
}
// value={'FINANCIAL PERSPECTIVE'}
// disabled
/
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
listMaxAch
}
value
=
{
this
.
state
.
maxAchValue
}
id
=
"maxAch"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
maxAchValue
:
newValue
},
()
=>
this
.
clearMessage
());
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"weight"
label
=
"Weight"
name
=
"weight"
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
disabled
=
{
this
.
state
.
maxAchDisable
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Max Achievement"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
color
:
'#7e8085'
,
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
))}
{
this
.
state
.
reportType
!==
null
&&
(
this
.
state
.
reportType
.
report_name
===
'CAT'
&&
(
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
,
margin
:
20
,
marginBottom
:
10
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
}}
>
Item
Report
-
4
<
/Typography
>
<
/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
value
=
{
this
.
state
.
formulaYTDValue
}
id
=
"formulaYTD"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
formulaYTDValue
:
newValue
},
()
=>
this
.
clearMessage
());
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
{
'-'
}
id
=
"ID"
label
=
"ID"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
options
=
{
this
.
state
.
formulaYtd
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Formula YTD"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
color
:
'#7e8085'
,
}
}}
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
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
id
=
"startDate"
label
=
"Valid From"
format
=
"dd-MM-yyyy"
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorSD
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"orders"
name
=
"order"
label
=
"Report Name"
disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value
=
{
'CAT'
}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps
=
{{
min
:
0
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
...
...
@@ -1001,30 +987,56 @@ export default class CreateMasterDataCAT extends Component {
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
<
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
,
kpiDisable
:
true
,
maxAchDisable
:
true
},
()
=>
{
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
},
()
=>
this
.
clearMessage
())
:
this
.
clearMessage
();
})}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Item Report Name"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorJenisLaporan
}
helperText
=
{
this
.
state
.
msgErrorJenisLaporan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
reportType
}
// value={'FINANCIAL PERSPECTIVE'}
// disabled
/
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
id
=
"endDate"
label
=
"Valid To"
format
=
"dd-MM-yyyy"
value
=
{
this
.
state
.
endDate
==
""
?
null
:
this
.
state
.
endDate
}
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorED
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'end_date'
)}
minDate
=
{
this
.
state
.
startDate
}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"weight"
label
=
"Weight"
name
=
"weight"
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -1034,13 +1046,12 @@ export default class CreateMasterDataCAT extends Component {
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -1082,7 +1093,8 @@ export default class CreateMasterDataCAT extends Component {
{
/* <Typography style={{ fontSize: 11 }}>: </Typography> */
}
<
/div
>
<
/div
>
<
/div
>
<
div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
...
...
@@ -1107,6 +1119,7 @@ export default class CreateMasterDataCAT extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/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