feat(export): Bestandsbuch für Tierarzneimittel nach Art. 108 VO (EU) 2019/6
- Treatment records supplier, purchase proof and prescribing vet, and keeps the apiary the colony stood at on the treatment day. - Holder name and address in site settings (never in public output; regression test in public.service.spec). - treatment-log.pdf: one sheet per apiary, identical treatments grouped, missing mandatory fields printed as FEHLT, uncertain locations marked. - Shared PDF table helpers extracted from the record card. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
f263ec79f2
commit
0d23963f07
24 files changed
+941
-113
No files matched your search
@@ -49,6 +49,16 @@ export async function exportColonyRecordCardPdf(colonyId: string, code: string):
|
||||
downloadBlob(blob, filename);
|
||||
}
|
||||
|
||||
/** Bestandsbuch (Art. 108 VO (EU) 2019/6): all treatments of a year, one sheet per apiary. */
|
||||
export async function exportTreatmentLogPdf(year: number, apiaryId?: string): Promise<void> {
|
||||
const query = apiaryId ? `year=${year}&apiaryId=${apiaryId}` : `year=${year}`;
|
||||
const { blob, filename } = await apiFetchBlob(
|
||||
`/export/treatment-log.pdf?${query}`,
|
||||
`bestandsbuch-${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}`,
|
||||
|
||||
@@ -4,6 +4,8 @@ export interface SiteSettings {
|
||||
instagramUrl: string | null;
|
||||
tiktokUrl: string | null;
|
||||
websiteUrl: string | null;
|
||||
holderName: string | null;
|
||||
holderAddress: string | null;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
@@ -12,4 +14,6 @@ export interface UpdateSiteSettingsInput {
|
||||
instagramUrl?: string;
|
||||
tiktokUrl?: string;
|
||||
websiteUrl?: string;
|
||||
holderName?: string;
|
||||
holderAddress?: string;
|
||||
}
|
||||
@@ -13,6 +13,9 @@ export interface Treatment {
|
||||
batchNumber: string | null;
|
||||
notes: string | null;
|
||||
withdrawalPeriodDays: number | null;
|
||||
supplier: string | null;
|
||||
purchaseProof: string | null;
|
||||
prescribingVet: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@@ -29,6 +32,9 @@ export interface CreateTreatmentInput {
|
||||
batchNumber?: string;
|
||||
notes?: string;
|
||||
withdrawalPeriodDays?: number;
|
||||
supplier?: string;
|
||||
purchaseProof?: string;
|
||||
prescribingVet?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTreatmentInput {
|
||||
@@ -45,6 +51,9 @@ export interface UpdateTreatmentInput {
|
||||
batchNumber?: string;
|
||||
notes?: string;
|
||||
withdrawalPeriodDays?: number;
|
||||
supplier?: string;
|
||||
purchaseProof?: string;
|
||||
prescribingVet?: string;
|
||||
}
|
||||
|
||||
export interface WithdrawalStatus {
|
||||
|
||||
Reference in new issue
Block a user