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 {
...
@@ -485,7 +485,8 @@ export default class CreateMasterDataCAT extends Component {
return
(
return
(
<
div
className
=
"test app-popup-show"
>
<
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
=
"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
=
"col-1"
style
=
{{
maxWidth
:
"inherit"
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
className
=
"popup-title"
>
<
div
className
=
"popup-title"
>
...
@@ -502,6 +503,8 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -502,6 +503,8 @@ export default class CreateMasterDataCAT extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
maxHeight
:
500
,
overflow
:
'scroll'
}}
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
{
this
.
state
.
messageAlert
}
...
@@ -510,26 +513,32 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -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
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
Autocomplete
style
=
{{
width
:
'100%'
}}
{...
this
.
state
.
listCompany
}
value
=
{
'-'
}
id
=
"company"
id
=
"ID"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
,
kpiDisable
:
false
,
maxAchDisable
:
false
},
()
=>
{
label
=
"ID"
this
.
getParent
()
disabled
this
.
clearMessage
()
inputProps
=
{{
this
.
getKPIType
()
style
:
{
this
.
getMaxAch
()
fontSize
:
11
,
})}
fontFamily
:
'Nunito Sans, sans-serif'
,
debug
}
renderInput
=
{(
params
)
=>
}}
<
TextField
{...
params
}
label
=
"Company Name"
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
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
>
<
/div
>
<
/div
>
...
@@ -545,7 +554,7 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -545,7 +554,7 @@ export default class CreateMasterDataCAT extends Component {
debug
debug
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
label
=
"Report Type
"
label
=
"Year
"
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -563,34 +572,32 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -563,34 +572,32 @@ export default class CreateMasterDataCAT extends Component {
<
/div
>
<
/div
>
<
/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
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
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
}}
>
<
Autocomplete
<
TextField
{...
this
.
state
.
listCompany
}
style
=
{{
width
:
'100%'
}}
id
=
"company"
value
=
{
'-'
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
,
kpiDisable
:
false
,
maxAchDisable
:
false
},
()
=>
{
id
=
"ID"
this
.
getParent
()
label
=
"ID"
this
.
clearMessage
()
disabled
this
.
getKPIType
()
inputProps
=
{{
this
.
getMaxAch
()
style
:
{
})}
fontSize
:
11
,
debug
fontFamily
:
'Nunito Sans, sans-serif'
,
renderInput
=
{(
params
)
=>
}
<
TextField
{...
params
}
}}
label
=
"Company Name"
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
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
>
<
/div
>
<
/div
>
...
@@ -600,12 +607,13 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -600,12 +607,13 @@ export default class CreateMasterDataCAT extends Component {
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"orders"
id
=
"orders"
name
=
"order"
name
=
"order"
label
=
"Order"
label
=
"Report Name"
type
=
"number"
// disabled
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
null
)}
// onChange={(e) => this.handleChange(e, null)}
value
=
{
this
.
state
.
order
}
// value={this.state.order}
error
=
{
this
.
state
.
errorOrder
}
value
=
{
'CAT'
}
helperText
=
{
this
.
state
.
msgErrorOrder
}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps
=
{{
inputProps
=
{{
min
:
0
,
min
:
0
,
style
:
{
style
:
{
...
@@ -628,17 +636,44 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -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
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
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
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"description"
id
=
"weight"
label
=
"Description"
label
=
"Weight"
name
=
"description"
name
=
"weight"
value
=
{
this
.
state
.
description
}
value
=
{
this
.
state
.
weight
}
error
=
{
this
.
state
.
errorDesc
}
helperText
=
{
this
.
state
.
msgErrorDesc
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
// value={this.props.data.business_unit_name}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -656,42 +691,21 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -656,42 +691,21 @@ export default class CreateMasterDataCAT extends Component {
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
<
/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
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
,
margin
:
20
,
marginBottom
:
10
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
}}
>
Item
Report
-
2
<
/Typography
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
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
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"uom"
value
=
{
'-'
}
name
=
"uom"
id
=
"ID"
label
=
"UOM"
label
=
"ID"
value
=
{
this
.
state
.
uom
}
disabled
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -705,20 +719,24 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -705,20 +719,24 @@ export default class CreateMasterDataCAT extends Component {
color
:
'#7e8085'
,
color
:
'#7e8085'
,
}
}
}}
}}
>
/
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"weight"
id
=
"orders"
label
=
"Weight"
name
=
"order"
name
=
"weight"
label
=
"Report Name"
value
=
{
this
.
state
.
weight
}
disabled
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value
=
{
'CAT'
}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps
=
{{
inputProps
=
{{
min
:
0
,
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
...
@@ -741,52 +759,16 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -741,52 +759,16 @@ export default class CreateMasterDataCAT extends Component {
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listInputType
}
{...
this
.
state
.
listReportType
}
id
=
"inputType"
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
InputType
:
newInputValue
},
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
,
kpiDisable
:
true
,
maxAchDisable
:
true
},
()
=>
{
()
=>
newInputValue
===
null
?
this
.
setState
({
disabledFormula
:
true
,
disabledCondt
:
true
,
disabledValue
:
true
,
formula
:
''
,
condition
:
''
,
realVal
:
''
})
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
},
()
=>
this
.
clearMessage
())
:
newInputValue
.
type_item_report_name
===
'Formula'
?
:
this
.
clearMessage
();
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
())
)}
debug
debug
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
label
=
"Data Type"
label
=
"Item Report Name"
error
=
{
this
.
state
.
errorTipeData
}
helperText
=
{
this
.
state
.
msgErrorTipeData
}
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -794,11 +776,13 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -794,11 +776,13 @@ export default class CreateMasterDataCAT extends Component {
color
:
'#7e8085'
color
:
'#7e8085'
}
}
}}
}}
error
=
{
this
.
state
.
errorTipeData
}
error
=
{
this
.
state
.
errorJenisLaporan
}
helperText
=
{
this
.
state
.
msgErrorTipeData
}
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
.
InputType
}
value
=
{
this
.
state
.
reportType
}
// value={'FINANCIAL PERSPECTIVE'}
// disabled
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -806,13 +790,10 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -806,13 +790,10 @@ export default class CreateMasterDataCAT extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"formula"
id
=
"weight"
label
=
"Formula"
label
=
"Weight"
name
=
"formula"
name
=
"weight"
disabled
=
{
this
.
state
.
disabledFormula
}
value
=
{
this
.
state
.
weight
}
value
=
{
this
.
state
.
formula
}
error
=
{
this
.
state
.
errorFormula
}
helperText
=
{
this
.
state
.
msgErrorFormula
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
...
@@ -833,19 +814,19 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -833,19 +814,19 @@ export default class CreateMasterDataCAT extends Component {
<
/div
>
<
/div
>
<
/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
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
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
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"realVal"
value
=
{
'-'
}
label
=
"True Value"
id
=
"ID"
name
=
"realVal"
label
=
"ID"
disabled
=
{
this
.
state
.
disabledValue
}
disabled
value
=
{
this
.
state
.
realVal
}
error
=
{
this
.
state
.
errorRV
}
helperText
=
{
this
.
state
.
msgErrorRV
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -864,49 +845,51 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -864,49 +845,51 @@ export default class CreateMasterDataCAT extends Component {
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
TextField
value
=
{
this
.
state
.
condition
}
style
=
{{
width
:
'100%'
}}
id
=
"isWrongCondition"
id
=
"orders"
disabled
=
{
this
.
state
.
disabledCondt
}
name
=
"order"
onChange
=
{(
event
,
newValue
)
=>
{
label
=
"Report Name"
this
.
setState
({
condition
:
newValue
},
()
=>
this
.
clearMessage
());
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
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
color
:
'#7e8085'
,
}
}
}}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
>
/>
}
<
/TextField
>
/>
<
/div
>
<
/div
>
<
/div
>
<
/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
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listKPI
}
{...
this
.
state
.
listReportType
}
value
=
{
this
.
state
.
kpiTypeValue
}
id
=
"reportType"
id
=
"kpiType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
,
kpiDisable
:
true
,
maxAchDisable
:
true
},
()
=>
{
onChange
=
{(
event
,
newValue
)
=>
{
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
},
()
=>
this
.
clearMessage
())
this
.
setState
({
kpiTypeValue
:
newValue
},
()
=>
this
.
clearMessage
()
);
:
this
.
clearMessage
(
);
}
}
})
}
disabled
=
{
this
.
state
.
kpiDisable
}
debug
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
<
TextField
{...
params
}
label
=
"KPI Typ
e"
label
=
"Item Report Nam
e"
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -914,85 +897,88 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -914,85 +897,88 @@ export default class CreateMasterDataCAT 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={'FINANCIAL PERSPECTIVE'}
// disabled
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
TextField
{...
this
.
state
.
listMaxAch
}
style
=
{{
width
:
'100%'
}}
value
=
{
this
.
state
.
maxAchValue
}
id
=
"weight"
id
=
"maxAch"
label
=
"Weight"
onChange
=
{(
event
,
newValue
)
=>
{
name
=
"weight"
this
.
setState
({
maxAchValue
:
newValue
},
()
=>
this
.
clearMessage
());
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
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
color
:
'#7e8085'
,
}
}
}}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
>
/>
}
<
/TextField
>
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
))}
{
this
.
state
.
reportType
!==
null
&&
(
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
,
margin
:
20
,
marginBottom
:
10
}}
>
this
.
state
.
reportType
.
report_name
===
'CAT'
&&
(
<
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
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
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
}}
>
<
Autocomplete
<
TextField
value
=
{
this
.
state
.
formulaYTDValue
}
style
=
{{
width
:
'100%'
}}
id
=
"formulaYTD"
value
=
{
'-'
}
onChange
=
{(
event
,
newValue
)
=>
{
id
=
"ID"
this
.
setState
({
formulaYTDValue
:
newValue
},
()
=>
this
.
clearMessage
());
label
=
"ID"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
}}
options
=
{
this
.
state
.
formulaYtd
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Formula YTD"
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
color
:
'#7e8085'
,
}
}
}}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
))}
<
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
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
<
TextField
margin
=
"normal"
style
=
{{
width
:
'100%'
}}
id
=
"startDate"
id
=
"orders"
label
=
"Valid From"
name
=
"order"
format
=
"dd-MM-yyyy"
label
=
"Report Name"
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
disabled
error
=
{
this
.
state
.
errorStartDate
}
// onChange={(e) => this.handleChange(e, null)}
helperText
=
{
this
.
state
.
msgErrorSD
}
// value={this.state.order}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
value
=
{
'CAT'
}
KeyboardButtonProps
=
{{
// error={this.state.errorOrder}
'aria-label'
:
'change date'
,
// helperText={this.state.msgErrorOrder}
}}
inputProps
=
{{
inputProps
=
{{
min
:
0
,
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
...
@@ -1001,30 +987,56 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -1001,30 +987,56 @@ export default class CreateMasterDataCAT extends Component {
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
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
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
<
TextField
margin
=
"normal"
style
=
{{
width
:
'100%'
}}
id
=
"endDate"
id
=
"weight"
label
=
"Valid To"
label
=
"Weight"
format
=
"dd-MM-yyyy"
name
=
"weight"
value
=
{
this
.
state
.
endDate
==
""
?
null
:
this
.
state
.
endDate
}
value
=
{
this
.
state
.
weight
}
error
=
{
this
.
state
.
errorEndDate
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
helperText
=
{
this
.
state
.
msgErrorED
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'end_date'
)}
minDate
=
{
this
.
state
.
startDate
}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
...
@@ -1034,13 +1046,12 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -1034,13 +1046,12 @@ export default class CreateMasterDataCAT extends Component {
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
color
:
'#7e8085'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
}
}
}}
}}
>
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
<
/TextField
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1082,7 +1093,8 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -1082,7 +1093,8 @@ export default class CreateMasterDataCAT extends Component {
{
/* <Typography style={{ fontSize: 11 }}>: </Typography> */
}
{
/* <Typography style={{ fontSize: 11 }}>: </Typography> */
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
<
button
...
@@ -1107,6 +1119,7 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -1107,6 +1119,7 @@ export default class CreateMasterDataCAT extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/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