Commit 8aa4b823 authored by Riri Novita's avatar Riri Novita

handletektektek

parent 664c4666
......@@ -419,7 +419,7 @@ export default class BalanceSheetMR extends Component {
this.props.onClickClose()
// this.props.getReport()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -429,7 +429,7 @@ export default class BalanceSheetMR extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false, handleTekTekTek: 0 })
}
})
}
......@@ -472,12 +472,12 @@ export default class BalanceSheetMR extends Component {
if (response.data.status === "success") {
this.props.saveToMonthlyReport()
} else {
this.setState({ loading: false }, () => {
this.setState({ loading: false, handleTekTekTek: 0 }, () => {
this.props.saveToMonthlyReport()
})
}
} else {
this.setState({ loading: false })
this.setState({ loading: false, handleTekTekTek: 0 })
}
})
}
......
......@@ -389,12 +389,12 @@ export default class ProfitLossMR extends Component {
if (response.data.status === "success") {
this.props.saveToMonthlyReport()
} else {
this.setState({ loading: false }, () => {
this.setState({ loading: false, handleTekTekTek: 0 }, () => {
this.props.saveToMonthlyReport()
})
}
} else {
this.setState({ loading: false })
this.setState({ loading: false, handleTekTekTek: 0 })
}
})
}
......@@ -537,7 +537,7 @@ export default class ProfitLossMR extends Component {
// this.props.onClickClose()
// this.props.getReport()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -548,10 +548,10 @@ export default class ProfitLossMR extends Component {
// alert(response.data.status)
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false, handleTekTekTek: 0 })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false, handleTekTekTek: 0 })
}
})
}
......
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