Update cetak final LOG
This commit is contained in:
@@ -38,8 +38,17 @@ export default function TableListFinalLog() {
|
||||
const [data, setData] = useState([]);
|
||||
|
||||
// Download LOG
|
||||
async function handleDownloadLog(claimRequest:any) {
|
||||
enqueueSnackbar('Sorry, this feature is currently being processed', { variant: 'error' });
|
||||
async function handleDownloadLog(request_log_id:any) {
|
||||
return axios
|
||||
.get(`download-final-log/${request_log_id}`, {
|
||||
responseType: 'blob',
|
||||
})
|
||||
.then((response) => {
|
||||
window.open(URL.createObjectURL(response.data), '_blank');
|
||||
})
|
||||
.catch((response) => {
|
||||
enqueueSnackbar(response.message, { variant: 'error' });
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
@@ -334,9 +343,9 @@ export default function TableListFinalLog() {
|
||||
View
|
||||
</MenuItem>
|
||||
{obj.status === 'approved' ? (
|
||||
<MenuItem onClick={() => handleDownloadLog(obj.claim_request_id)}>
|
||||
<MenuItem onClick={() => handleDownloadLog(obj.id)}>
|
||||
<Iconify icon="eva:download-fill" />
|
||||
Download LOG
|
||||
Download Final LOG
|
||||
</MenuItem>
|
||||
):''}
|
||||
{!obj.check_claim && obj.status === 'approved' ? (
|
||||
|
||||
Reference in New Issue
Block a user