feat: warn against harvesting honey during a treatment's Wartezeit

Treatments (Ameisensäure, Oxalsäure, etc.) can require a legally
mandated withdrawal period before honey from that colony may be sold.
Nothing in the app tracked this before, so a beekeeper had no
safeguard against harvesting into an active withdrawal window.

Treatments now optionally record withdrawalPeriodDays (from the
product's Packungsbeilage). The new harvest form fetches each
candidate colony's active withdrawal window and shows an inline
warning naming the product and the date it clears, computed as
max(endDate ?? date) + withdrawalPeriodDays across a colony's
treatments, restricted to windows still in the future.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Nick SzaunigandClaude Sonnet 5 committed 2026-09-06 02:50:34 +02:00
1 parent 0881a38800
commit d42f8331f9
13 files changed
+270 -56

No files matched your search

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Treatment" ADD COLUMN "withdrawalPeriodDays" INTEGER;