invoice preview and csv down issue resolved
This commit is contained in:
parent
8940a8981e
commit
2a5fef6b45
@ -1537,11 +1537,12 @@ export function DealerClaimWorkflowTab({
|
||||
return;
|
||||
}
|
||||
|
||||
const baseUrl = import.meta.env.VITE_API_BASE_URL || 'http://localhost:5000/api/v1';
|
||||
const baseUrl = import.meta.env.VITE_API_BASE_URL || '';
|
||||
const response = await fetch(`${baseUrl}/dealer-claims/${requestId}/e-invoice/csv`, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${TokenManager.getAccessToken()}`
|
||||
}
|
||||
'Authorization': `Bearer ${TokenManager.getAccessToken() || ''}`
|
||||
},
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
@ -1582,11 +1583,12 @@ export function DealerClaimWorkflowTab({
|
||||
setShowInvoicePdfModal(true);
|
||||
|
||||
// Fetch PDF securely via Authorization header (not in URL query)
|
||||
const baseUrl = import.meta.env.VITE_API_BASE_URL || 'http://localhost:5000/api/v1';
|
||||
const baseUrl = import.meta.env.VITE_API_BASE_URL || '';
|
||||
const response = await fetch(`${baseUrl}/dealer-claims/${requestId}/e-invoice/pdf`, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${TokenManager.getAccessToken()}`
|
||||
}
|
||||
'Authorization': `Bearer ${TokenManager.getAccessToken() || ''}`
|
||||
},
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user