Commit 01be1e41 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

Didam

See merge request !821
parents 4b0d7bea 5f49be2c
......@@ -38,7 +38,7 @@ const create = (type = "") => {
'Content-Type': 'application/json',
},
// 40 second timeout...
timeout: 100000
timeout: 40000
})
break;
default:
......
......@@ -744,18 +744,25 @@ export default class BudgetTahunan extends Component {
})
// // console.log(JSON.stringify(data));
api.create('UPLOAD').createSubmitReport(data).then(response => {
// // console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.getSubmission()
if (response.ok) {
if (response.data.status === 'success') {
this.getSubmission()
} else {
this.setState({ loading: false }, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
})
}
} else {
this.setState({ loading: false }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false}, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
})
})
}
} else {
this.setState({ loading: false }, () => {
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false }, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
})
......
......@@ -442,7 +442,7 @@ export default class BalanceSheet extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -183,7 +183,7 @@ export default class CashFlow extends Component {
// } else {
api.create().getDetailReportCF(payload).then(response => {
let dataTable = []
// console.log(response)
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
......@@ -278,7 +278,7 @@ export default class CashFlow extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
}
})
// }
......
......@@ -269,7 +269,7 @@ export default class CorporateAnnualTarget extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
}
......@@ -670,7 +670,7 @@ export default class CorporateAnnualTarget extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -195,7 +195,7 @@ export default class FixedAssetsMovement extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......@@ -447,7 +447,7 @@ export default class FixedAssetsMovement extends Component {
} else {
// this.setState({ loading: false })
// alert(response.problem)
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -205,7 +205,7 @@ export default class ProfitLoss extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
}
})
......@@ -447,7 +447,7 @@ export default class ProfitLoss extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -230,7 +230,7 @@ export default class TaxPlanning extends Component {
})
}
} else {
this.setState({ dataTable, loading: false, buttonError: true, editable: true })
this.setState({ dataTable, loading: false, buttonError: true, editable: true, alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error'})
}
})
}
......@@ -632,7 +632,7 @@ export default class TaxPlanning extends Component {
// alert(response.data.status)
}
} else {
this.setState({ loading: false, alert: true, messageAlert: response.problem, tipeAlert: 'error' })
this.setState({ loading: false, alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error' })
}
})
}
......
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