feat(quick-add): save & add another for rapid manual entry

The quick-add sheet no longer closes on every save: a new 'Save & add
another' action saves the seed, clears the form (keeping the chosen lot
type), refocuses the name field and shows an 'N added' running count, so
a whole shelf can be entered without reopening the sheet each time.
Plain Save still closes it. Adds a dedicated label field with its own
controller, submitAndAddAnother() on the cubit, and cubit + widget tests.
This commit is contained in:
vjrj 2026-07-09 14:45:48 +02:00
parent 89b61bc9e4
commit d3711e39b0
9 changed files with 240 additions and 18 deletions

View file

@ -122,6 +122,8 @@
"quantity": "How much?",
"more": "Add more…",
"save": "Save",
"saveAndAddAnother": "Save & add another",
"addedCount": "{n} added",
"cancel": "Cancel"
},
"detail": {

View file

@ -122,6 +122,8 @@
"quantity": "¿Cuánta?",
"more": "Añadir más…",
"save": "Guardar",
"saveAndAddAnother": "Guardar y añadir otra",
"addedCount": "{n} añadidas",
"cancel": "Cancelar"
},
"detail": {

View file

@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 2
/// Strings: 404 (202 per locale)
/// Strings: 408 (204 per locale)
///
/// Built on 2026-07-09 at 12:34 UTC
/// Built on 2026-07-09 at 12:44 UTC
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import

View file

@ -401,6 +401,12 @@ class Translations$quickAdd$en {
/// en: 'Save'
String get save => 'Save';
/// en: 'Save & add another'
String get saveAndAddAnother => 'Save & add another';
/// en: '{n} added'
String addedCount({required Object n}) => '${n} added';
/// en: 'Cancel'
String get cancel => 'Cancel';
}
@ -1217,6 +1223,8 @@ extension on Translations {
'quickAdd.quantity' => 'How much?',
'quickAdd.more' => 'Add more…',
'quickAdd.save' => 'Save',
'quickAdd.saveAndAddAnother' => 'Save & add another',
'quickAdd.addedCount' => ({required Object n}) => '${n} added',
'quickAdd.cancel' => 'Cancel',
'detail.notFound' => 'This seed is no longer here.',
'detail.lots' => 'Lots',

View file

@ -238,6 +238,8 @@ class _Translations$quickAdd$es extends Translations$quickAdd$en {
@override String get quantity => '¿Cuánta?';
@override String get more => 'Añadir más…';
@override String get save => 'Guardar';
@override String get saveAndAddAnother => 'Guardar y añadir otra';
@override String addedCount({required Object n}) => '${n} añadidas';
@override String get cancel => 'Cancelar';
}
@ -833,6 +835,8 @@ extension on TranslationsEs {
'quickAdd.quantity' => '¿Cuánta?',
'quickAdd.more' => 'Añadir más…',
'quickAdd.save' => 'Guardar',
'quickAdd.saveAndAddAnother' => 'Guardar y añadir otra',
'quickAdd.addedCount' => ({required Object n}) => '${n} añadidas',
'quickAdd.cancel' => 'Cancelar',
'detail.notFound' => 'Esta semilla ya no está aquí.',
'detail.lots' => 'Lotes',