Commit 5f49be2c authored by d.arizona's avatar d.arizona

apdet

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