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 {
console.log(response);
let data = response.data.data
let index = data.findIndex((val) => val.month_name == month)
console.log(index);
let monthData = []
let defaultMonth = []
data.map((item, indexs) => {
......@@ -240,7 +241,7 @@ export default class DashboardFinancial extends React.Component {
};
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)
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