Commit e39bca93 authored by Dida Adams Arizona's avatar Dida Adams Arizona

update home task list

parent 8ce64de1
...@@ -126,8 +126,13 @@ export default class BudgetTahunan extends Component { ...@@ -126,8 +126,13 @@ export default class BudgetTahunan extends Component {
let defaultProps = { let defaultProps = {
options: companyData, options: companyData,
getOptionLabel: (option) => titleCase(option.company_name), getOptionLabel: (option) => titleCase(option.company_name),
}; }
this.setState({ listCompany: defaultProps, company: companyData[0] }, () => { let indexID = null
if (this.state.rawData !== undefined) {
indexID = companyData.findIndex((val) => val.company_id == this.state.rawData.company_id)
}
this.setState({ listCompany: defaultProps, company: indexID == null? companyData[0] : companyData[indexID]}, () => {
// console.log(response.data.data); // console.log(response.data.data);
if (response.data.data.length > 0) { if (response.data.data.length > 0) {
this.getRevision() this.getRevision()
......
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