feat(block1): germination tests per lot with derived rate
Record germination tests on a lot and surface the result. - GerminationEntry model with a derived rate (germinated / sample). VarietyLot carries its tests (most-recent first) and exposes latestGerminationRate. - VarietyRepository.addGerminationTest; watchVariety now also re-emits on germination-test changes, so the detail refreshes live. - Detail UI: each lot shows a germination % badge and a grass action that opens a sheet listing past tests and adding a new one (germinated + sample size). i18n strings (ES/EN). Tests: derived-rate + reactivity at the repository, and a widget test for the record-test → badge flow. Full suite: 35 passing, 0 skipped.
This commit is contained in:
parent
4e8b8293e0
commit
37427fa738
10 changed files with 405 additions and 6 deletions
|
|
@ -35,6 +35,14 @@
|
|||
"year": "Year {year}",
|
||||
"noYear": "Year unknown"
|
||||
},
|
||||
"germination": {
|
||||
"title": "Germination",
|
||||
"add": "Add test",
|
||||
"sampleSize": "Sample size",
|
||||
"germinated": "Germinated",
|
||||
"none": "No germination tests yet.",
|
||||
"result": "{percent}%"
|
||||
},
|
||||
"editVariety": {
|
||||
"title": "Edit seed",
|
||||
"name": "Name",
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@
|
|||
"year": "Año {year}",
|
||||
"noYear": "Año desconocido"
|
||||
},
|
||||
"germination": {
|
||||
"title": "Germinación",
|
||||
"add": "Añadir prueba",
|
||||
"sampleSize": "Muestra",
|
||||
"germinated": "Germinadas",
|
||||
"none": "Aún no hay pruebas de germinación.",
|
||||
"result": "{percent}%"
|
||||
},
|
||||
"editVariety": {
|
||||
"title": "Editar semilla",
|
||||
"name": "Nombre",
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 2
|
||||
/// Strings: 106 (53 per locale)
|
||||
/// Strings: 118 (59 per locale)
|
||||
///
|
||||
/// Built on 2026-07-07 at 19:21 UTC
|
||||
/// Built on 2026-07-07 at 19:58 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
|||
late final Translations$inventory$en inventory = Translations$inventory$en.internal(_root);
|
||||
late final Translations$quickAdd$en quickAdd = Translations$quickAdd$en.internal(_root);
|
||||
late final Translations$detail$en detail = Translations$detail$en.internal(_root);
|
||||
late final Translations$germination$en germination = Translations$germination$en.internal(_root);
|
||||
late final Translations$editVariety$en editVariety = Translations$editVariety$en.internal(_root);
|
||||
late final Translations$addLot$en addLot = Translations$addLot$en.internal(_root);
|
||||
late final Translations$quantityKind$en quantityKind = Translations$quantityKind$en.internal(_root);
|
||||
|
|
@ -173,6 +174,33 @@ class Translations$detail$en {
|
|||
String get noYear => 'Year unknown';
|
||||
}
|
||||
|
||||
// Path: germination
|
||||
class Translations$germination$en {
|
||||
Translations$germination$en.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'Germination'
|
||||
String get title => 'Germination';
|
||||
|
||||
/// en: 'Add test'
|
||||
String get add => 'Add test';
|
||||
|
||||
/// en: 'Sample size'
|
||||
String get sampleSize => 'Sample size';
|
||||
|
||||
/// en: 'Germinated'
|
||||
String get germinated => 'Germinated';
|
||||
|
||||
/// en: 'No germination tests yet.'
|
||||
String get none => 'No germination tests yet.';
|
||||
|
||||
/// en: '{percent}%'
|
||||
String result({required Object percent}) => '${percent}%';
|
||||
}
|
||||
|
||||
// Path: editVariety
|
||||
class Translations$editVariety$en {
|
||||
Translations$editVariety$en.internal(this._root);
|
||||
|
|
@ -315,6 +343,12 @@ extension on Translations {
|
|||
'detail.deleteConfirm' => 'Delete this seed?',
|
||||
'detail.year' => ({required Object year}) => 'Year ${year}',
|
||||
'detail.noYear' => 'Year unknown',
|
||||
'germination.title' => 'Germination',
|
||||
'germination.add' => 'Add test',
|
||||
'germination.sampleSize' => 'Sample size',
|
||||
'germination.germinated' => 'Germinated',
|
||||
'germination.none' => 'No germination tests yet.',
|
||||
'germination.result' => ({required Object percent}) => '${percent}%',
|
||||
'editVariety.title' => 'Edit seed',
|
||||
'editVariety.name' => 'Name',
|
||||
'editVariety.category' => 'Category',
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class TranslationsEs extends Translations with BaseTranslations<AppLocale, Trans
|
|||
@override late final _Translations$inventory$es inventory = _Translations$inventory$es._(_root);
|
||||
@override late final _Translations$quickAdd$es quickAdd = _Translations$quickAdd$es._(_root);
|
||||
@override late final _Translations$detail$es detail = _Translations$detail$es._(_root);
|
||||
@override late final _Translations$germination$es germination = _Translations$germination$es._(_root);
|
||||
@override late final _Translations$editVariety$es editVariety = _Translations$editVariety$es._(_root);
|
||||
@override late final _Translations$addLot$es addLot = _Translations$addLot$es._(_root);
|
||||
@override late final _Translations$quantityKind$es quantityKind = _Translations$quantityKind$es._(_root);
|
||||
|
|
@ -120,6 +121,21 @@ class _Translations$detail$es extends Translations$detail$en {
|
|||
@override String get noYear => 'Año desconocido';
|
||||
}
|
||||
|
||||
// Path: germination
|
||||
class _Translations$germination$es extends Translations$germination$en {
|
||||
_Translations$germination$es._(TranslationsEs root) : this._root = root, super.internal(root);
|
||||
|
||||
final TranslationsEs _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Germinación';
|
||||
@override String get add => 'Añadir prueba';
|
||||
@override String get sampleSize => 'Muestra';
|
||||
@override String get germinated => 'Germinadas';
|
||||
@override String get none => 'Aún no hay pruebas de germinación.';
|
||||
@override String result({required Object percent}) => '${percent}%';
|
||||
}
|
||||
|
||||
// Path: editVariety
|
||||
class _Translations$editVariety$es extends Translations$editVariety$en {
|
||||
_Translations$editVariety$es._(TranslationsEs root) : this._root = root, super.internal(root);
|
||||
|
|
@ -208,6 +224,12 @@ extension on TranslationsEs {
|
|||
'detail.deleteConfirm' => '¿Eliminar esta semilla?',
|
||||
'detail.year' => ({required Object year}) => 'Año ${year}',
|
||||
'detail.noYear' => 'Año desconocido',
|
||||
'germination.title' => 'Germinación',
|
||||
'germination.add' => 'Añadir prueba',
|
||||
'germination.sampleSize' => 'Muestra',
|
||||
'germination.germinated' => 'Germinadas',
|
||||
'germination.none' => 'Aún no hay pruebas de germinación.',
|
||||
'germination.result' => ({required Object percent}) => '${percent}%',
|
||||
'editVariety.title' => 'Editar semilla',
|
||||
'editVariety.name' => 'Nombre',
|
||||
'editVariety.category' => 'Categoría',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue