Reports.vue

This component renders the Reports tab of the Sign-In App.
Info: This component is dynamically imported in the /signinsheet page.
Used by
Used Stores
Functions
onSelectionConfirmed
Called when a run is selected in the autocomplete. Downloads the Cash Flow Report for the selected run and displays the PDF viewer with the report.
Parameters:
value: - selected run object
downloadReport
Downloads the Cash Flow Report PDF for the currently selected run date. It fetches the report from the backend using the /onsite-sales/financial-report endpoint and triggers a download of the PDF file. The file is named based on the selected run date. The function handles potential errors during the fetch and download process.
Reactivity
(anonymous) (watch)
This functions fetches the PDF file with the Cash Flow Report for the selected run_date using the /onsite-sales/financial-report endpoint of the backend and stores it in the selectedPdf variable, so that it can be displayed.
Parameters:
runDate: - The date of the run for which the Cash Flow Report is to be fetched
