feat: Jahresbericht-PDF pro Volk/Stand
Neue PDF-Reports im Export-Modul: colony-annual-report (Durchsichten, Behandlungen, Varroakontrollen, Schwarmkontrolle, Ernten eines Volkes fuer ein Jahr) und apiary-annual-report (Voelker-Uebersicht + Ernten eines Stands fuer ein Jahr). Jahr ist optional, faellt auf das aktuelle Jahr zurueck. Frontend: "Jahresbericht"-Button auf Volk- und Stand-Detailseite, laedt das PDF ueber den bestehenden Blob-Download-Mechanismus herunter.
This commit is contained in:
1 parent
f1298eff08
commit
3f7c4ed404
8 files changed
+630
-26
No files matched your search
@@ -31,3 +31,19 @@ export async function exportHoneyBatchTraceabilityPdf(honeyBatchId: string): Pro
|
||||
);
|
||||
downloadBlob(blob, filename);
|
||||
}
|
||||
|
||||
export async function exportColonyAnnualReportPdf(colonyId: string, year: number): Promise<void> {
|
||||
const { blob, filename } = await apiFetchBlob(
|
||||
`/export/colony-annual-report.pdf?colonyId=${colonyId}&year=${year}`,
|
||||
`jahresbericht-volk-${year}.pdf`,
|
||||
);
|
||||
downloadBlob(blob, filename);
|
||||
}
|
||||
|
||||
export async function exportApiaryAnnualReportPdf(apiaryId: string, year: number): Promise<void> {
|
||||
const { blob, filename } = await apiFetchBlob(
|
||||
`/export/apiary-annual-report.pdf?apiaryId=${apiaryId}&year=${year}`,
|
||||
`jahresbericht-stand-${year}.pdf`,
|
||||
);
|
||||
downloadBlob(blob, filename);
|
||||
}
|
||||
Reference in new issue
Block a user