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
0acb657b
Commit
0acb657b
authored
Feb 24, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
72c88f73
6d12fce3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
369 additions
and
258 deletions
+369
-258
index.js
src/api/index.js
+5
-1
CreateMasterDataCAT.js
...container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
+364
-257
No files found.
src/api/index.js
View file @
0acb657b
...
...
@@ -185,6 +185,9 @@ const create = (type = "") => {
const
searchParameter
=
(
body
)
=>
api
.
post
(
'setting/search_setting'
,
body
)
const
deleteParameter
=
(
id
)
=>
api
.
post
(
`setting/delete_setting/
${
id
}
`
)
// MASTER DATA - CAT
const
getParentItemReport
=
(
body
)
=>
api
.
post
(
'item_report/get_parent_item_report_default'
,
body
)
//Transaction
const
getReportTypeBody
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_all_report'
,
body
)
const
getMasterBudgetAtt
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_report_attachment'
,
body
)
...
...
@@ -683,7 +686,8 @@ const create = (type = "") => {
getHierarkiCronJobMRCF
,
getHierarkiCronJobMRRatio
,
getRollingOutlookID
,
getRollingOutlookBS
getRollingOutlookBS
,
getParentItemReport
}
}
...
...
src/container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
View file @
0acb657b
...
...
@@ -72,7 +72,10 @@ export default class CreateMasterDataCAT extends Component {
maxAchValue
:
null
,
formulaYTDValue
:
null
,
kpiDisable
:
true
,
maxAchDisable
:
true
maxAchDisable
:
true
,
listPeriode
:
null
,
// periode: null,
getParent
:
[]
}
}
...
...
@@ -87,73 +90,148 @@ export default class CreateMasterDataCAT extends Component {
startDate
:
date
,
endDate
:
date
})
this
.
getPeriode
()
}
handleChange
(
e
,
type
)
{
let
data
=
this
.
state
let
isDate
=
type
!==
''
?
true
:
false
if
(
isDate
&&
type
===
'start_date'
)
{
this
.
setState
({
...
data
,
startDate
:
format
(
e
,
'yyyy-MM-dd'
),
endDate
:
null
,
errorOrder
:
false
,
errorDesc
:
false
,
errorFormula
:
false
,
errorRV
:
false
,
errorStartDate
:
false
,
errorEndDate
:
false
,
errorTipeData
:
false
,
errorCondition
:
false
,
msgErrorTipeData
:
''
,
msgErrorCondition
:
''
,
msgErrorOrder
:
''
,
msgErrorDesc
:
''
,
msgErrorFormula
:
''
,
msgErrorRV
:
''
,
msgErrorSD
:
''
,
msgErrorED
:
''
,
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
currentYear
=
new
Date
().
getFullYear
()
console
.
log
(
currentYear
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
[]
response
.
data
.
data
.
map
((
item
)
=>
{
// if (this.state.isApprover) {
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)
+
1
))
{
data
.
push
(
item
)
}
// } else {
// if ((item >= 2000) && (item == this.state.lastPeriod || item < this.state.lastPeriod)) {
// data.push(item)
// }
// }
})
}
else
if
(
isDate
&&
type
===
'end_date'
)
{
this
.
setState
({
...
data
,
endDate
:
format
(
e
,
'yyyy-MM-dd'
),
errorOrder
:
false
,
errorDesc
:
false
,
errorFormula
:
false
,
errorRV
:
false
,
errorStartDate
:
false
,
errorEndDate
:
false
,
errorTipeData
:
false
,
errorCondition
:
false
,
msgErrorTipeData
:
''
,
msgErrorCondition
:
''
,
msgErrorOrder
:
''
,
msgErrorDesc
:
''
,
msgErrorFormula
:
''
,
msgErrorRV
:
''
,
msgErrorSD
:
''
,
msgErrorED
:
''
,
let
periodeData
=
data
.
map
((
item
)
=>
{
return
{
periode
:
item
,
}
})
let
defaultProps
=
{
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
// let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod)
let
periode
=
String
(
Number
(
currentYear
))
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
periode
)
// console.log(data)
// console.log(this.state.latestPeriode)
// console.log(periodeData)
console
.
log
(
index
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
],
loading
:
false
})
}
}
})
}
getParentIR
()
{
let
payload
=
{
"report_id"
:
3
,
"years"
:
this
.
state
.
periode
.
periode
}
api
.
create
().
getParentItemReport
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
getParent
:
response
.
data
.
data
.
filter
((
val
)
=>
String
(
val
.
type_item_report_name
).
toLocaleLowerCase
()
!=
'break'
)})
// response.data.data.map((item) => {
// console.log(item.description)
// this.setState({
// itemReport1: String(item.description).toLocaleLowerCase().includes("financial").tolocal ? item.description : null
// })
// })
}
}
else
{
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
,
errorOrder
:
false
,
errorDesc
:
false
,
errorFormula
:
false
,
errorRV
:
false
,
errorStartDate
:
false
,
errorEndDate
:
false
,
errorTipeData
:
false
,
errorCondition
:
false
,
msgErrorTipeData
:
''
,
msgErrorCondition
:
''
,
msgErrorOrder
:
''
,
msgErrorDesc
:
''
,
msgErrorFormula
:
''
,
msgErrorRV
:
''
,
msgErrorSD
:
''
,
msgErrorED
:
''
,
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
console
.
log
(
this
.
state
.
itemReport1
)
})
}
handleChange
(
e
,
item
)
{
// let data = this.state
// let isDate = type !== '' ? true : false
let
dataSource
=
this
.
state
.
getParent
let
indexID
=
dataSource
.
findIndex
((
val
)
=>
val
.
item_report_id
==
item
.
item_report_id
)
// console.log(indexID)
if
(
indexID
!=
-
1
)
{
dataSource
[
indexID
].
weight
=
e
.
target
.
value
this
.
setState
({
getParent
:
dataSource
},
()
=>
{
console
.
log
(
this
.
state
.
getParent
);
})
}
// if (isDate && type === 'start_date') {
// this.setState({
// ...data, startDate: format(e, 'yyyy-MM-dd'), endDate: null,
// errorOrder: false,
// errorDesc: false,
// errorFormula: false,
// errorRV: false,
// errorStartDate: false,
// errorEndDate: false,
// errorTipeData: false,
// errorCondition: false,
// msgErrorTipeData: '',
// msgErrorCondition: '',
// msgErrorOrder: '',
// msgErrorDesc: '',
// msgErrorFormula: '',
// msgErrorRV: '',
// msgErrorSD: '',
// msgErrorED: '',
// })
// } else if (isDate && type === 'end_date') {
// this.setState({
// ...data, endDate: format(e, 'yyyy-MM-dd'),
// errorOrder: false,
// errorDesc: false,
// errorFormula: false,
// errorRV: false,
// errorStartDate: false,
// errorEndDate: false,
// errorTipeData: false,
// errorCondition: false,
// msgErrorTipeData: '',
// msgErrorCondition: '',
// msgErrorOrder: '',
// msgErrorDesc: '',
// msgErrorFormula: '',
// msgErrorRV: '',
// msgErrorSD: '',
// msgErrorED: '',
// })
// } else {
// this.setState({
// ...data, [e.target.name]: e.target.value,
// errorOrder: false,
// errorDesc: false,
// errorFormula: false,
// errorRV: false,
// errorStartDate: false,
// errorEndDate: false,
// errorTipeData: false,
// errorCondition: false,
// msgErrorTipeData: '',
// msgErrorCondition: '',
// msgErrorOrder: '',
// msgErrorDesc: '',
// msgErrorFormula: '',
// msgErrorRV: '',
// msgErrorSD: '',
// msgErrorED: '',
// })
// }
}
validasi
()
{
...
...
@@ -545,11 +623,14 @@ export default class CreateMasterDataCAT extends Component {
<
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
,
kpiDisable
:
true
,
maxAchDisable
:
true
},
()
=>
{
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
},
()
=>
this
.
clearMessage
())
:
this
.
clearMessage
();
{...
this
.
state
.
listPeriode
}
id
=
"year"
// 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();
// })}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
,
loading
:
true
,
previewTable
:
false
},
()
=>
{
this
.
getParentIR
()
})}
debug
renderInput
=
{(
params
)
=>
...
...
@@ -566,14 +647,32 @@ export default class CreateMasterDataCAT extends Component {
helperText
=
{
this
.
state
.
msgErrorJenisLaporan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
value
=
{
this
.
state
.
reportTyp
e
}
value
=
{
this
.
state
.
period
e
}
/
>
{
/* <Autocomplete
{...this.state.listPeriode}
id="periode"
onChange={(event, newInputValue) => this.setState({ periode: newInputValue, loading: true, previewTable: false }, () => {
// this.getSubmission()
this.getDataTable()
})}
disabled={this.state.intent === 'Home' ? true : false}
disableClearable
style={{ width: 250 }}
renderInput={(params) =>
<TextField {...params} label="Period" margin="normal" style={{ marginTop: 7 }}
/>}
value={this.state.periode}
/> */
}
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
getParent
.
map
((
item
,
index
)
=>
{
return
(
<
div
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
,
margin
:
20
,
marginBottom
:
10
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
}}
>
Item
Report
-
1
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
,
fontWeight
:
'bold'
}}
>
{
`Item Report -
${
index
+
1
}
`
}
<
/Typography
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
...
...
@@ -581,7 +680,7 @@ export default class CreateMasterDataCAT extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
{
'-'
}
value
=
{
item
.
item_report_id
}
id
=
"ID"
label
=
"ID"
disabled
...
...
@@ -605,13 +704,13 @@ export default class CreateMasterDataCAT extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"orders
"
name
=
"order
"
id
=
"reportName1
"
name
=
"reportName1
"
label
=
"Report Name"
//
disabled
disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value
=
{
'CAT'
}
value
=
{
item
.
report_name
}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps
=
{{
...
...
@@ -637,43 +736,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
}
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"itemReportName1"
name
=
"itemReportName1"
label
=
"Item Report Name"
disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value
=
{
item
.
description
}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps
=
{{
min
:
0
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
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
/
>
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"weight"
id
=
"weight1"
name
=
"weight1"
label
=
"Weight"
name
=
"weight"
value
=
{
this
.
state
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
''
)}
value
=
{
item
.
weight
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
item
)}
inputProps
=
{{
style
:
{
fontSize
:
11
,
...
...
@@ -692,9 +792,13 @@ 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
-
2
<
/Typography
>
{
/* <div style={{ borderBottom: 'solid 1px #c4c4c4', margin: 20, marginBottom: 10 }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', padding: 10, fontWeight: 'bold' }}>Item Report - 2</Typography>
</div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
...
...
@@ -758,41 +862,42 @@ 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
=
"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
}
<TextField
style={{ width: '100%' }}
id="itemReportName2"
name="itemReportName2"
label="Item Report Name"
disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value={'item report name'}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps={{
min: 0,
style: {
fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif',
}
}}
InputLabelProps={{
style: {
fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif',
color
:
'#7e8085'
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
/
>
>
</TextField>
</div>
</div>
<div className="column-2">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<TextField
style={{ width: '100%' }}
id
=
"weight"
id="weight2"
name="weight2"
label="Weight"
name
=
"weight"
value={this.state.weight}
onChange={(e) => this.handleChange(e, '')}
inputProps={{
...
...
@@ -815,7 +920,7 @@ export default class CreateMasterDataCAT extends Component {
</div>
<div style={{ borderBottom: 'solid 1px #c4c4c4', margin: 20, marginBottom: 10 }} >
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
}}
>
Item
Report
-
3
<
/Typography
>
<Typography style={{ fontSize: '12px', color: '#4b4b4b', padding: 10
, fontWeight: 'bold'
}}>Item Report - 3</Typography>
</div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
...
...
@@ -879,41 +984,42 @@ 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
=
"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
}
<TextField
style={{ width: '100%' }}
id="itemReportName3"
name="itemReportName3"
label="Item Report Name"
disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value={'item report name'}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps={{
min: 0,
style: {
fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif',
}
}}
InputLabelProps={{
style: {
fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif',
color
:
'#7e8085'
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
/
>
>
</TextField>
</div>
</div>
<div className="column-2">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<TextField
style={{ width: '100%' }}
id
=
"weight"
id="weight3"
name="weight3"
label="Weight"
name
=
"weight"
value={this.state.weight}
onChange={(e) => this.handleChange(e, '')}
inputProps={{
...
...
@@ -936,7 +1042,7 @@ export default class CreateMasterDataCAT extends Component {
</div>
<div style={{ borderBottom: 'solid 1px #c4c4c4', margin: 20, marginBottom: 10 }} >
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
padding
:
10
}}
>
Item
Report
-
4
<
/Typography
>
<Typography style={{ fontSize: '12px', color: '#4b4b4b', padding: 10
, fontWeight: 'bold'
}}>Item Report - 4</Typography>
</div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
...
...
@@ -1000,41 +1106,42 @@ 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
=
"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
}
<TextField
style={{ width: '100%' }}
id="itemReportName4"
name="itemReportName4"
label="Item Report Name"
disabled
// onChange={(e) => this.handleChange(e, null)}
// value={this.state.order}
value={'item report name'}
// error={this.state.errorOrder}
// helperText={this.state.msgErrorOrder}
inputProps={{
min: 0,
style: {
fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif',
}
}}
InputLabelProps={{
style: {
fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif',
color
:
'#7e8085'
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
/
>
>
</TextField>
</div>
</div>
<div className="column-2">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<TextField
style={{ width: '100%' }}
id
=
"weight"
id="weight4"
name="weight4"
label="Weight"
name
=
"weight"
value={this.state.weight}
onChange={(e) => this.handleChange(e, '')}
inputProps={{
...
...
@@ -1054,7 +1161,7 @@ export default class CreateMasterDataCAT extends Component {
</TextField>
</div>
</div>
<
/div
>
</div>
*/
}
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
...
...
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