Commit af8b2c11 authored by faisalhamdi's avatar faisalhamdi

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into faisal

parents d6caf99e e985683f
// contents of .env
REACT_APP_URL_MAIN_BE=https://dashboard.triputra-group.com/tia-reporting
REACT_APP_URL_MAIN_FE=/tia-web
\ No newline at end of file
REACT_APP_URL_MAIN_FE=/web
\ No newline at end of file
......@@ -248,7 +248,7 @@ export default class ProfitLossMR extends Component {
item.formula,
item.level,
item.description,
item.profit_loss.notes === "" ? null : item.profit_loss.notes,
item.profit_loss.notes == null || item.profit_loss.notes == "null" ? "" : item.profit_loss.notes,
item.profit_loss.rolling_outlook === null ? "0.0" : item.profit_loss.rolling_outlook === "" ? "0.0" : item.profit_loss.rolling_outlook === "0" ? "0.0" : item.profit_loss.rolling_outlook,
item.profit_loss.master_budget === null ? "0.0" : item.profit_loss.master_budget === "" ? "0.0" : item.profit_loss.master_budget,
item.profit_loss.rolling_budget === null ? "0.0" : item.profit_loss.rolling_budget === "" ? "0.0" : item.profit_loss.rolling_budget,
......@@ -289,7 +289,7 @@ export default class ProfitLossMR extends Component {
item.formula,
item.level,
item.description,
item.profit_loss.notes === "" ? null : item.profit_loss.notes,
item.profit_loss.notes == null || item.profit_loss.notes == "null" ? "" : item.profit_loss.notes,
item.profit_loss.rolling_outlook === null ? "0.0" : item.profit_loss.rolling_outlook === "" ? "0.0" : item.profit_loss.rolling_outlook,
item.profit_loss.master_budget === null ? "0.0" : item.profit_loss.master_budget === "" ? "0.0" : item.profit_loss.master_budget,
item.profit_loss.rolling_budget === null ? "0.0" : item.profit_loss.rolling_budget === "" ? "0.0" : item.profit_loss.rolling_budget,
......@@ -405,31 +405,31 @@ export default class ProfitLossMR extends Component {
}
console.log(payload);
// console.log(JSON.stringify(payload));
// api.create('UPLOAD').createMonthlyReportPL(payload).then(response => {
// console.log(response);
// if (response.data) {
// if (response.data.status === "success") {
// if (type == 'submitted') {
// this.props.saveToMonthlyReport('PL')
// } else {
// this.props.saveToMonthlyReport()
// }
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
// document.body.style.overflow = 'unset';
// if (response.data.message.includes("Someone Logged In")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// this.props.saveToMonthlyReport()
// })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 })
// }
// })
api.create('UPLOAD').createMonthlyReportPL(payload).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
if (type == 'submitted') {
this.props.saveToMonthlyReport('PL')
} else {
this.props.saveToMonthlyReport()
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
document.body.style.overflow = 'unset';
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
this.props.saveToMonthlyReport()
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 })
}
})
}
fileHandler = (event) => {
......@@ -487,7 +487,7 @@ export default class ProfitLossMR extends Component {
item.formula,
item.level,
item.item_report,
item.notes,
item.notes == null || item.notes == "null" ? "" : item.notes,
item.rolling_outlook === null ? "" : item.rolling_outlook === "" ? "" : item.rolling_outlook,
item.master_budget === "" ? "" : item.master_budget,
item.rolling_budget === "" ? "" : item.rolling_budget,
......
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