Commit 9523c2a0 authored by Riri Novita's avatar Riri Novita

harusnya udah

parent d3d9d426
...@@ -187,7 +187,7 @@ export default class ProfitLoss extends Component { ...@@ -187,7 +187,7 @@ export default class ProfitLoss extends Component {
this.setState({ dataTable, loading: false, buttonError: true, editable: true }, () => { this.setState({ dataTable, loading: false, buttonError: true, editable: true }, () => {
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
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)
...@@ -426,7 +426,7 @@ export default class ProfitLoss extends Component { ...@@ -426,7 +426,7 @@ export default class ProfitLoss 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' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
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)
...@@ -434,7 +434,6 @@ export default class ProfitLoss extends Component { ...@@ -434,7 +434,6 @@ export default class ProfitLoss extends Component {
}, 1000); }, 1000);
} }
}) })
// 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 })
......
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