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() {
...@@ -589,6 +589,9 @@ export default class ProfitLossROO extends Component { ...@@ -589,6 +589,9 @@ export default class ProfitLossROO extends Component {
} }
// this.props.onClickClose() // this.props.onClickClose()
// this.props.getReport() // this.props.getReport()
} else {
if (response.data?.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => { 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")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
...@@ -597,9 +600,10 @@ export default class ProfitLossROO extends Component { ...@@ -597,9 +600,10 @@ export default class ProfitLossROO extends Component {
window.location.reload(); window.location.reload();
}, 1000); }, 1000);
} }
this.props.onClickClose() // this.props.onClickClose()
this.props.refresh() 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