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": "Guardar",
"cancel": "Cancelar",
"delete": "Eliminar",
"edit": "Editar"
},
"inventory": {
"title": "Inventario",
"searchHint": "Buscar semillas",
@ -18,6 +24,28 @@
"save": "Guardar",
"cancel": "Cancelar"
},
"detail": {
"notFound": "Esta semilla ya no está aquí.",
"lots": "Lotes",
"noLots": "Aún no hay lotes.",
"names": "También conocida como",
"notes": "Notas",
"addLot": "Añadir lote",
"deleteConfirm": "¿Eliminar esta semilla?",
"year": "Año {year}",
"noYear": "Año desconocido"
},
"editVariety": {
"title": "Editar semilla",
"name": "Nombre",
"category": "Categoría",
"notes": "Notas"
},
"addLot": {
"title": "Añadir lote",
"year": "Año de cosecha",
"quantity": "Cantidad"
},
"quantityKind": {
"aFew": "unas pocas",
"some": "algunas",