feat(inventory): edit and delete existing lots

Lots could only be created; now they can be edited and removed:
- Repository: updateLot (LWW) + softDeleteLot (tombstone).
- Cubit: updateLot / deleteLot.
- The add-lot sheet is now a shared add/edit sheet — tapping a lot opens it
  prefilled (type, year, quantity), with a trash action to delete. The reactive
  detail view refreshes on save/delete.

Tests: repo updateLot/softDeleteLot + widget edit-lot and delete-lot. 42 green.
This commit is contained in:
vjrj 2026-07-08 11:10:43 +02:00
parent 7e92410728
commit f8d4d9a778
10 changed files with 192 additions and 16 deletions

View file

@ -32,6 +32,7 @@
"names": "Also known as",
"notes": "Notes",
"addLot": "Add lot",
"editLot": "Edit lot",
"deleteConfirm": "Delete this seed?",
"year": "Year {year}",
"noYear": "Year unknown"

View file

@ -32,6 +32,7 @@
"names": "También conocida como",
"notes": "Notas",
"addLot": "Añadir lote",
"editLot": "Editar lote",
"deleteConfirm": "¿Eliminar esta semilla?",
"year": "Año {year}",
"noYear": "Año desconocido"

View file

@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 2
/// Strings: 182 (91 per locale)
/// Strings: 184 (92 per locale)
///
/// Built on 2026-07-08 at 08:39 UTC
/// Built on 2026-07-08 at 09:07 UTC
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import

View file

@ -168,6 +168,9 @@ class Translations$detail$en {
/// en: 'Add lot'
String get addLot => 'Add lot';
/// en: 'Edit lot'
String get editLot => 'Edit lot';
/// en: 'Delete this seed?'
String get deleteConfirm => 'Delete this seed?';
@ -658,6 +661,7 @@ extension on Translations {
'detail.names' => 'Also known as',
'detail.notes' => 'Notes',
'detail.addLot' => 'Add lot',
'detail.editLot' => 'Edit lot',
'detail.deleteConfirm' => 'Delete this seed?',
'detail.year' => ({required Object year}) => 'Year ${year}',
'detail.noYear' => 'Year unknown',

View file

@ -118,6 +118,7 @@ class _Translations$detail$es extends Translations$detail$en {
@override String get names => 'También conocida como';
@override String get notes => 'Notas';
@override String get addLot => 'Añadir lote';
@override String get editLot => 'Editar lote';
@override String get deleteConfirm => '¿Eliminar esta semilla?';
@override String year({required Object year}) => 'Año ${year}';
@override String get noYear => 'Año desconocido';
@ -474,6 +475,7 @@ extension on TranslationsEs {
'detail.names' => 'También conocida como',
'detail.notes' => 'Notas',
'detail.addLot' => 'Añadir lote',
'detail.editLot' => 'Editar lote',
'detail.deleteConfirm' => '¿Eliminar esta semilla?',
'detail.year' => ({required Object year}) => 'Año ${year}',
'detail.noYear' => 'Año desconocido',