Commit 55c9eb6e authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

Update Issue TP

See merge request !1992
parents 5f486deb e70bba9a
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -553,13 +553,13 @@ export default class TaxPlanning extends Component {
}
console.log(payload);
// console.log(JSON.stringify(data))
// this.props.saveToMasterBudget(payload)
// this.props.onClickClose()
// if (type == 'submitted') {
// this.props.saveToMasterBudget(payload, 'TP')
// } else {
// this.props.saveToMasterBudget(payload, 'DraftTP')
// }
this.props.saveToMasterBudget(payload)
this.props.onClickClose()
if (type == 'submitted') {
this.props.saveToMasterBudget(payload, 'TP')
} else {
this.props.saveToMasterBudget(payload, 'DraftTP')
}
}
fileHandler = (event) => {
......@@ -913,31 +913,31 @@ export default class TaxPlanning extends Component {
status: type
}
console.log(body);
// api.create('UPLOAD').uploadMasterBudget(body).then(response => {
// // console.log(response);
// if (response.data) {
// if (response.data.status === "success") {
// this.props.onClickClose()
// this.props.getReport()
// } else {
// if (response.data.message == "Please Set Up Rate Currency First") {
// this.setState({ visibleAlertSave: true })
// } else {
// this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
// if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
// }
// // alert(response.data.status)
// }
// } else {
// this.setState({ loading: false, alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error' })
// }
// })
api.create('UPLOAD').uploadMasterBudget(body).then(response => {
// console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.props.onClickClose()
this.props.getReport()
} else {
if (response.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
// alert(response.data.status)
}
} else {
this.setState({ loading: false, alert: true, messageAlert: 'Error saving data. Please try again', tipeAlert: 'error' })
}
})
}
handleValidate() {
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