Commit 658db32e authored by Riri Novita's avatar Riri Novita

Update CAT MB & RO

parent f2c636a6
...@@ -280,7 +280,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -280,7 +280,7 @@ export default class CorporateAnnualTarget extends Component {
downloadTemplate = async () => { downloadTemplate = async () => {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&currency_id=${this.props.defaultCurrency.id}`
) )
res = await res.blob() res = await res.blob()
// // // // console.log(res) // // // // console.log(res)
......
...@@ -343,7 +343,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -343,7 +343,7 @@ export default class CorporateAnnualTargetRO extends Component {
downloadTemplate = async () => { downloadTemplate = async () => {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/rolling_outlook/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&quartal=${this.props.quarter}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/rolling_outlook/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&quartal=${this.props.quarter}&&currency_id=${this.props.defaultCurrency.id}`
) )
res = await res.blob() res = await res.blob()
if (res.size > 0) { if (res.size > 0) {
......
...@@ -98,7 +98,7 @@ export default class ProfitLossROO extends Component { ...@@ -98,7 +98,7 @@ export default class ProfitLossROO extends Component {
this.getLatestUpdate() this.getLatestUpdate()
console.log(this.props); console.log(this.props);
// this.getSettingControl() // this.getSettingControl()
// this.handleViewOnly() this.handleViewOnly()
} }
handleViewOnly() { handleViewOnly() {
...@@ -590,16 +590,20 @@ export default class ProfitLossROO extends Component { ...@@ -590,16 +590,20 @@ export default class ProfitLossROO 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', loading: false, handleDoubleClick: 0 }, () => { if (response.data?.message == "Please Set Up Rate Currency First") {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) { this.setState({ visibleAlertSave: true })
setTimeout(() => { } else {
localStorage.removeItem(Constant.TOKEN) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
window.location.reload(); if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
}, 1000); setTimeout(() => {
} localStorage.removeItem(Constant.TOKEN)
this.props.onClickClose() window.location.reload();
this.props.refresh() }, 1000);
}) }
// this.props.onClickClose()
this.props.refresh()
})
}
// alert(response.data.status) // alert(response.data.status)
} }
} else { } else {
......
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