Commit dd87395c authored by rifkaki's avatar rifkaki

cpsm

parent 1921b4c3
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -807,19 +807,22 @@ export default class SummaryOfTriputra extends Component { ...@@ -807,19 +807,22 @@ export default class SummaryOfTriputra extends Component {
a.click(); a.click();
} }
} else if (this.state.report.value === 3) { } else if (this.state.report.value === 3) {
alert("Download CPSM Report Coming Soon") // alert("Download CPSM Report Coming Soon")
// let res = await fetch( let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cpsm/export_report?year=${this.state.periode.periode}&&months=${this.state.month.month_id}`
// `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report_detail/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.lastRevision}` let sub_null = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cpsm/export_report?year=${this.state.periode.periode}&&months=${this.state.month.month_id}`
// ) console.log(url);
// res = await res.blob() let res = await fetch(
// this.setState({ loading: false }) this.state.submissionID == null ? sub_null : url
// if (res.size > 0) { )
// let url = window.URL.createObjectURL(res); res = await res.blob()
// let a = document.createElement('a'); this.setState({ loading: false })
// a.href = url; if (res.size > 0) {
// a.download = 'Report DB Profit & Loss.xlsx'; let url = window.URL.createObjectURL(res);
// a.click(); let a = document.createElement('a');
// } a.href = url;
a.download = 'Report CPSM.xlsx';
a.click();
}
} else if (this.state.report.value === 4) { } else if (this.state.report.value === 4) {
// alert("Download Historical Report Coming Soon") // alert("Download Historical Report Coming Soon")
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_historical/export_report?year=${this.state.periode.periode}` let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_historical/export_report?year=${this.state.periode.periode}`
......
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