Skip to content

Commit

Permalink
Fix PDF preview for Bank Account Statement
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanDragicevic committed Sep 5, 2024
1 parent 3ba1a3b commit f8310c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/bank-transactions/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ export default function BankTransactions() {
};

const getReportPdfFile = async () => {
window.open(`/api/get-report-pdf?reportId=1628`);
let { previewUrl } = await fetch(
`/api/get-report-preview-url?reportId=1628&params=${encodeURIComponent(
JSON.stringify({ dateFrom, dateTo })
)}&data=${encodeURIComponent(JSON.stringify({ account }))}`
).then((res) => res?.json());

window.open(previewUrl);
};

useEffect(() => {
Expand Down
Binary file modified app/favicon.ico
Binary file not shown.

0 comments on commit f8310c5

Please sign in to comment.