Commit 4212cf00 authored by rifkaki's avatar rifkaki

download master data cat

parent e9162c5d
......@@ -765,8 +765,10 @@ export default class MasterDataCAT extends Component {
}
downloadDataTable = async () => {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/item_report_company/export_item_report_company`
console.log(url)
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/item_report/export_item_report`
`${process.env.REACT_APP_URL_MAIN_BE}/item_report_company/export_item_report_company`
)
res = await res.blob()
// console.log(res)
......@@ -774,7 +776,7 @@ export default class MasterDataCAT extends Component {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
a.download = 'Report Items.xlsx';
a.download = 'Master Data - CAT.xlsx';
a.click();
}
}
......
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