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

handletektektek

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