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 {
downloadTemplate = async () => {
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()
// // // // console.log(res)
......
......@@ -343,7 +343,7 @@ export default class CorporateAnnualTargetRO extends Component {
downloadTemplate = async () => {
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()
if (res.size > 0) {
......
......@@ -98,7 +98,7 @@ export default class ProfitLossROO extends Component {
this.getLatestUpdate()
console.log(this.props);
// this.getSettingControl()
// this.handleViewOnly()
this.handleViewOnly()
}
handleViewOnly() {
......@@ -590,16 +590,20 @@ export default class ProfitLossROO extends Component {
// this.props.onClickClose()
// this.props.getReport()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
this.props.onClickClose()
this.props.refresh()
})
if (response.data?.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
// this.props.onClickClose()
this.props.refresh()
})
}
// alert(response.data.status)
}
} 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