Commit 364abe7e authored by syadziy's avatar syadziy

update issue Dashboard Financial

parent a7699354
...@@ -220,6 +220,7 @@ export default class DashboardFinancial extends React.Component { ...@@ -220,6 +220,7 @@ export default class DashboardFinancial extends React.Component {
console.log(response); console.log(response);
let data = response.data.data let data = response.data.data
let index = data.findIndex((val) => val.month_name == month) let index = data.findIndex((val) => val.month_name == month)
console.log(index);
let monthData = [] let monthData = []
let defaultMonth = [] let defaultMonth = []
data.map((item, indexs) => { data.map((item, indexs) => {
...@@ -240,7 +241,7 @@ export default class DashboardFinancial extends React.Component { ...@@ -240,7 +241,7 @@ export default class DashboardFinancial extends React.Component {
}; };
console.log(monthData); console.log(monthData);
this.setState({ defaultMonth, listMonth: defaultProps, listMonth2: defaultProps, month: index == -1 ? monthData[0] : monthData[index], month2: index == -1 ? monthData[1] : monthData[index + 1], }, () => { this.setState({ defaultMonth, listMonth: defaultProps, listMonth2: defaultProps, month: index == -1 ? monthData[0] : monthData[index], month2: index == -1 ? monthData[1] : monthData[index], }, () => {
console.log(this.state.month) console.log(this.state.month)
this.getPeriode() this.getPeriode()
}) })
......
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