Commit Graph
6 Commits
Author SHA1 Message Date
Malek TellissiandClaude Sonnet 4.6 e9734c2590 Preserve existing origin entries when switching recipe version
Deploy / deploy (push) Successful in 14s
When the recipe is changed in a batch form, keep origin data for spices
that exist in both the old and new recipe. Only add empty rows for
spices that are new to the selected recipe version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-12 20:20:07 +02:00
Malek TellissiandClaude Sonnet 4.6 4a98beeb45 Restructure batch origins: nested entries per ingredient with Supplier/Farmer selects
Deploy / deploy (push) Successful in 14s
Each BatchOrigin (spice) now has multiple BatchOriginEntry rows, replacing the flat
single-supplier/farmer fields. Lieferant and Landwirt are Select fields backed by
dedicated tables with inline create support. Migration preserves existing data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-12 20:03:05 +02:00
Malek TellissiandClaude Sonnet 4.6 400237aa5b Allow multiple supplier/farmer entries per ingredient in batch origins
Deploy / deploy (push) Successful in 14s
Each batch origin row now shows a searchable Rohstoff Select so the same
ingredient can appear in multiple rows with different suppliers or farmers.
Pre-fill from recipe still works (one row per ingredient); user clicks
'Eintrag hinzufügen' to add a second entry for the same ingredient.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-12 19:46:17 +02:00
Malek TellissiandClaude Sonnet 4.6 62be3761a9 Pre-fill batch origin rows from recipe spices automatically
Deploy / deploy (push) Successful in 14s
When creating a new batch, the Herkunft-Repeater is automatically populated
with one row per Rohstoff from the product's current recipe. The Rohstoff
field is shown as a read-only label (Hidden spice_id + Placeholder name)
so the user only fills in supplier, origin country, farmer and notes.

Changing the recipe field updates the origin rows accordingly.
On edit, existing origin data is preserved unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-12 18:54:00 +02:00
Malek TellissiandClaude Sonnet 4.6 a34bb29620 Auto-deduct spice inventory when batch is created/updated/deleted
Deploy / deploy (push) Successful in 14s
- Add size_id, units_produced, quantity_g to batches table
- quantity_g auto-calculated from units × packing size on save
- Batch model deducts spice quantities on create, reverses on delete,
  recalculates on update when relevant fields change
- Batch form shows live total weight preview
- Chargen table shows units + grams produced

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-12 05:34:09 +02:00
Malek TellissiandClaude Sonnet 4.6 6e28984278 Add recipe inline create/edit and batches relation on product page
Deploy / deploy (push) Successful in 14s
- Recipe select now has a create/edit modal (name + description)
- Batches RelationManager shows all LOT charges for the product below
  the form, sorted newest first, with create/edit/delete actions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-12 05:10:04 +02:00