This commit is contained in:
ivan-sim
2024-10-04 10:46:03 +07:00
parent 2663a7bfbe
commit 8d5c7e4cb4
2 changed files with 28 additions and 20 deletions

View File

@@ -37,24 +37,9 @@ export default function TableList() {
const [data, setData] = useState([]);
// Download LOG
async function handleDownloadLog(claimRequest:any) {
return axios
.get(`claim-requests/${claimRequest}/log`, {
responseType: 'blob',
})
.then((response) => {
window.open(URL.createObjectURL(response.data));
// setLoadingLog(false);
})
// .then((blobFile) => {
// new File([blobFile], 'asdads.pdf', { type: blobFile.type })
// setLoadingLog(false);
// })
.catch((response) => {
enqueueSnackbar(response.message, { variant: 'error' });
// setLoadingLog(false);
});
// Download Resep
async function handleDownloadPrescription(link_download:any) {
window.open(link_download, '_blank');
}
/* -------------------------------------------------------------------------- */
@@ -390,10 +375,10 @@ export default function TableList() {
<Iconify icon="eva:eye-fill" />
{localeData.txtPrescriptionDetail}
</MenuItem>
{/* <MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name, obj.provider, obj.approved_at)}>
<MenuItem onClick={() => handleDownloadPrescription(obj.link_download)}>
<Iconify icon="eva:download-fill" />
{localeData.txtPrescriptionDownload}
</MenuItem> */}
</MenuItem>
</>
} />
}))