Commit c6bec937 authored by Deni Rinaldi's avatar Deni Rinaldi

isu

parent 0255d61f
......@@ -136,7 +136,7 @@ export default class CreateParameter extends Component {
options: perusahaanData,
getOptionLabel: (option) => option.company_name,
};
this.setState({ perusahaan: typeProps, perusahaanData: response.data.data, getPerusahaan: index == -1 ? null : perusahaanData[index], msgErrorPerusahaan: 'Company has been inactive', errorPerusahaan: true })
this.setState({ perusahaan: typeProps, perusahaanData: response.data.data, getPerusahaan: index == -1 ? null : perusahaanData[index], msgErrorPerusahaan: index === -1 ? 'Company has been inactive' : "", errorPerusahaan: index === -1 ? true : false })
} else {
alert(response.data.message)
}
......@@ -698,14 +698,15 @@ export default class CreateParameter extends Component {
}}
name="order"
onChange={(e) => {
let coba = String(e.target.value).replace(/[^\d]/g,'');
let coba = String(e.target.value).replace(/[^\d]/g, '');
this.setState({
tempData: {
...this.state.tempData,
order: coba
}
})
this.clearMessage()}
this.clearMessage()
}
// this.handleChange(coba, 'value')}
}
// error={this.state.errorOrder}
......@@ -914,11 +915,12 @@ export default class CreateParameter extends Component {
}}
name="value"
onChange={(e) => {
let coba = String(e.target.value).replace(/[^\d]/g,'');
let coba = String(e.target.value).replace(/[^\d]/g, '');
this.setState({
value: coba
})
this.clearMessage()}
this.clearMessage()
}
// this.handleChange(coba, 'value')}
}
// error={this.state.errorValue}
......@@ -946,11 +948,12 @@ export default class CreateParameter extends Component {
}}
name="minValue"
onChange={(e) => {
let coba = String(e.target.value).replace(/[^\d]/g,'');
let coba = String(e.target.value).replace(/[^\d]/g, '');
this.setState({
minValue: coba
})
this.clearMessage()}
this.clearMessage()
}
// this.handleChange(coba, 'value')}
}
error={this.state.errorMinValue}
......@@ -1071,11 +1074,12 @@ export default class CreateParameter extends Component {
}}
name="order"
onChange={(e) => {
let coba = String(e.target.value).replace(/[^\d]/g,'');
let coba = String(e.target.value).replace(/[^\d]/g, '');
this.setState({
order: coba
})
this.clearMessage()}
this.clearMessage()
}
// this.handleChange(coba, 'value')}
}
// error={this.state.errorOrder}
......@@ -1103,11 +1107,12 @@ export default class CreateParameter extends Component {
}}
name="maxValue"
onChange={(e) => {
let coba = String(e.target.value).replace(/[^\d]/g,'');
let coba = String(e.target.value).replace(/[^\d]/g, '');
this.setState({
maxValue: coba
})
this.clearMessage()}
this.clearMessage()
}
// this.handleChange(coba, 'value')}
}
error={this.state.errorMaxValue}
......
......@@ -246,7 +246,7 @@ export default class EditReportItems extends Component {
getOptionLabel: (option) => option.company_name,
};
// let index = companyData.findIndex((val) => val.company_id === this.state.tempData.company_id)
this.setState({ listCompany: defaultProps, companyData: response.data.data, company: index === -1 ? null : companyData[index] }, () => this.getParent())
this.setState({ listCompany: defaultProps, companyData: response.data.data, company: index === -1 ? null : companyData[index], msgErrorPerusahaan: index === -1 ? 'Company has been Inactive.' : "", errorPerusahaan: index === -1 ? true : false }, () => this.getParent())
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment