Update
This commit is contained in:
@@ -38,7 +38,7 @@ export default function TableListFinalLog() {
|
|||||||
const [data, setData] = useState([]);
|
const [data, setData] = useState([]);
|
||||||
|
|
||||||
// Download LOG
|
// Download LOG
|
||||||
async function handleDownloadLog(request_log_id: any, service_code:any, no_polis:any, full_name:any) {
|
async function handleDownloadLog(request_log_id: any, service_code:any, no_polis:any, full_name:any, provider:any) {
|
||||||
return axios
|
return axios
|
||||||
.get(`download-final-log/${request_log_id}`, {
|
.get(`download-final-log/${request_log_id}`, {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
@@ -46,7 +46,7 @@ export default function TableListFinalLog() {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
// GL Akhir-010124-OP-00001234 Ratih-LinkSehat
|
// GL Akhir-010124-OP-00001234 Ratih-LinkSehat
|
||||||
const namaFile = 'GL Akhir-'+getFormattedToday()+'-'+service_code+'-'+no_polis+'-'+full_name+'-LinkSehat.pdf';
|
const namaFile = 'GL Akhir-'+provider+'-'+getFormattedToday()+'-'+service_code+'-'+no_polis+'-'+full_name+'-LinkSehat.pdf';
|
||||||
const url = URL.createObjectURL(response.data);
|
const url = URL.createObjectURL(response.data);
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
link.href = url;
|
link.href = url;
|
||||||
@@ -369,7 +369,7 @@ export default function TableListFinalLog() {
|
|||||||
View
|
View
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{obj.status === 'approved' ? (
|
{obj.status === 'approved' ? (
|
||||||
<MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name)}>
|
<MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name, obj.provider)}>
|
||||||
<Iconify icon="eva:download-fill" />
|
<Iconify icon="eva:download-fill" />
|
||||||
Download Final LOG
|
Download Final LOG
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|||||||
@@ -42,15 +42,14 @@ export default function TableList() {
|
|||||||
const [data, setData] = useState([]);
|
const [data, setData] = useState([]);
|
||||||
|
|
||||||
// Download LOG
|
// Download LOG
|
||||||
async function handleDownloadLog(request_log_id: any, service_code:any, no_polis:any, full_name:any) {
|
async function handleDownloadLog(request_log_id: any, service_code:any, no_polis:any, full_name:any, provider:any) {
|
||||||
return axios
|
return axios
|
||||||
.get(`download-log/${request_log_id}`, {
|
.get(`download-log/${request_log_id}`, {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response);
|
|
||||||
// GL Awal-010124-OP-00001234 Ratih-LinkSehat
|
// GL Awal-010124-OP-00001234 Ratih-LinkSehat
|
||||||
const namaFile = 'GL Awal-'+getFormattedToday()+'-'+service_code+'-'+no_polis+'-'+full_name+'-LinkSehat.pdf';
|
const namaFile = 'GL Awal-'+provider+'-'+getFormattedToday()+'-'+service_code+'-'+no_polis+'-'+full_name+'-LinkSehat.pdf';
|
||||||
const url = URL.createObjectURL(response.data);
|
const url = URL.createObjectURL(response.data);
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
link.href = url;
|
link.href = url;
|
||||||
@@ -368,7 +367,7 @@ export default function TableList() {
|
|||||||
View
|
View
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{obj.status === 'approved' ? (
|
{obj.status === 'approved' ? (
|
||||||
<MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name)}>
|
<MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name, obj.provider)}>
|
||||||
<Iconify icon="eva:download-fill" />
|
<Iconify icon="eva:download-fill" />
|
||||||
Download LOG
|
Download LOG
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user