feat(block1): variety detail + edit screen with reactive lots

Tapping an inventory item now opens its detail (the /variety/:id route was a
placeholder). Read + edit one variety end-to-end:

- Detail view: photo, category, "also known as" names, notes and lots, driven
  by a reactive VarietyDetailCubit.
- Edit core fields (label/category/notes, LWW) via a bottom sheet.
- Add a lot (harvest year + quantity) — the list refreshes reactively.
- Soft-delete (tombstone) with a confirm dialog.

Repository:
- watchVariety(id): merges Drift table-change streams (variety, lots, names,
  attachments) via StreamGroup and reloads the full detail on any change, so a
  lot added to a *different* table still refreshes the view.
- updateVariety (LWW), addLot, softDeleteVariety.

i18n: detail/edit/addLot strings (ES/EN); switched slang to {param} braces
interpolation (translator- and Weblate-friendly).

Tests: repository (reactive watchVariety, update, soft-delete) and widget tests
(render, edit updates title, add-lot appears, delete shows not-found). Full
suite green: 23 passing, 1 skipped (SQLCipher-only encryption guard).
This commit is contained in:
vjrj 2026-07-07 15:56:03 +02:00
parent 040f15a898
commit 7ff4e38a15
15 changed files with 1093 additions and 18 deletions

View file

@ -2,6 +2,12 @@
"app": {
"title": "Tanemaki"
},
"common": {
"save": "Save",
"cancel": "Cancel",
"delete": "Delete",
"edit": "Edit"
},
"inventory": {
"title": "Inventory",
"searchHint": "Search seeds",
@ -18,6 +24,28 @@
"save": "Save",
"cancel": "Cancel"
},
"detail": {
"notFound": "This seed is no longer here.",
"lots": "Lots",
"noLots": "No lots yet.",
"names": "Also known as",
"notes": "Notes",
"addLot": "Add lot",
"deleteConfirm": "Delete this seed?",
"year": "Year {year}",
"noYear": "Year unknown"
},
"editVariety": {
"title": "Edit seed",
"name": "Name",
"category": "Category",
"notes": "Notes"
},
"addLot": {
"title": "Add lot",
"year": "Harvest year",
"quantity": "Quantity"
},
"quantityKind": {
"aFew": "a few",
"some": "some",