Merge remote-tracking branch 'origin/staging' into origin/production

This commit is contained in:
Linksehat Staging Server
2023-12-29 13:57:34 +07:00
9 changed files with 691 additions and 19 deletions

View File

@@ -86,10 +86,10 @@ export default function AccountPopover() {
>
<Box sx={{ my: 1.5, px: 2.5 }}>
<Typography variant="subtitle2" noWrap>
Rayan Moran
Hospital Admin
</Typography>
<Typography variant="body2" sx={{ color: 'text.secondary' }} noWrap>
rayan.moran@gmail.com
hospitaladmin@gmail.com
</Typography>
</Box>

View File

@@ -16,7 +16,7 @@ export default function NavbarDocs() {
<div>
<Typography gutterBottom variant="subtitle1">
Hi, Rayan Moran
Hi, Hospital Admin
</Typography>
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
Need help?
@@ -25,7 +25,7 @@ export default function NavbarDocs() {
</div>
<Button variant="contained">Documentation</Button>
<Typography variant='body2'>Hak Cipta © 2023 - 2024 Link Medis Sehat</Typography>
<Typography variant='body2'>Hak Cipta © 2023 - 2024 Link Sehat</Typography>
</Stack>
</>
);

View File

@@ -350,12 +350,12 @@ function handleChangeTab(event: React.SyntheticEvent, newValue: string) {
<Iconify icon="eva:eye-fill" />
View
</MenuItem>
{/* {obj.status === 'approved' ? ( */}
{obj.status === 'approved' ? (
<MenuItem onClick={() => handleDownloadLog(obj.id)}>
<Iconify icon="eva:download-fill" />
Download LOG
</MenuItem>
{/* ):''} */}
):''}
{obj.final_log === 0 && obj.status === 'approved' ? (
<MenuItem onClick={() => handleRequestFinalLog(obj.id, obj.full_name, obj.no_polis, obj.submission_date) }>
<Iconify icon="fa:file-text" />

View File

@@ -38,23 +38,16 @@ export default function TableListFinalLog() {
const [data, setData] = useState([]);
// Download LOG
async function handleDownloadLog(claimRequest:any) {
async function handleDownloadLog(request_log_id:any) {
return axios
.get(`claim-requests/${claimRequest}/log`, {
.get(`download-final-log/${request_log_id}`, {
responseType: 'blob',
})
.then((response) => {
window.open(URL.createObjectURL(response.data));
// setLoadingLog(false);
window.open(URL.createObjectURL(response.data), '_blank');
})
// .then((blobFile) => {
// new File([blobFile], 'asdads.pdf', { type: blobFile.type })
// setLoadingLog(false);
// })
.catch((response) => {
console.log(response);
enqueueSnackbar(response.message, { variant: 'error' });
// setLoadingLog(false);
});
}
@@ -350,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' ? (