Update
This commit is contained in:
@@ -350,12 +350,12 @@ function handleChangeTab(event: React.SyntheticEvent, newValue: string) {
|
|||||||
<Iconify icon="eva:eye-fill" />
|
<Iconify icon="eva:eye-fill" />
|
||||||
View
|
View
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{/* {obj.status === 'approved' ? ( */}
|
{obj.status === 'approved' ? (
|
||||||
<MenuItem onClick={() => handleDownloadLog(obj.id)}>
|
<MenuItem onClick={() => handleDownloadLog(obj.id)}>
|
||||||
<Iconify icon="eva:download-fill" />
|
<Iconify icon="eva:download-fill" />
|
||||||
Download LOG
|
Download LOG
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{/* ):''} */}
|
):''}
|
||||||
{obj.final_log === 0 && obj.status === 'approved' ? (
|
{obj.final_log === 0 && obj.status === 'approved' ? (
|
||||||
<MenuItem onClick={() => handleRequestFinalLog(obj.id, obj.full_name, obj.no_polis, obj.submission_date) }>
|
<MenuItem onClick={() => handleRequestFinalLog(obj.id, obj.full_name, obj.no_polis, obj.submission_date) }>
|
||||||
<Iconify icon="fa:file-text" />
|
<Iconify icon="fa:file-text" />
|
||||||
|
|||||||
@@ -39,23 +39,7 @@ export default function TableListFinalLog() {
|
|||||||
|
|
||||||
// Download LOG
|
// Download LOG
|
||||||
async function handleDownloadLog(claimRequest:any) {
|
async function handleDownloadLog(claimRequest:any) {
|
||||||
return axios
|
enqueueSnackbar('Sorry, this feature is currently being processed', { variant: 'error' });
|
||||||
.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) => {
|
|
||||||
console.log(response);
|
|
||||||
enqueueSnackbar(response.message, { variant: 'error' });
|
|
||||||
// setLoadingLog(false);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|||||||
Reference in New Issue
Block a user