Commit 3c6dfd0e authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

download md caat

See merge request !1211
parents f55320fd 70ba7a05
...@@ -765,8 +765,10 @@ export default class MasterDataCAT extends Component { ...@@ -765,8 +765,10 @@ export default class MasterDataCAT extends Component {
} }
downloadDataTable = async () => { 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( 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() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -774,7 +776,7 @@ export default class MasterDataCAT extends Component { ...@@ -774,7 +776,7 @@ export default class MasterDataCAT extends Component {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
a.href = url; a.href = url;
a.download = 'Report Items.xlsx'; a.download = 'Master Data - CAT.xlsx';
a.click(); 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