feat(inventory): month/year harvest date picker (schema v3)
Replace the free-text harvest year with a themed month/year picker: a tappable field opens a green-styled dialog with month and year grids (navigable, paginated years), month optional. Lots now read e.g. "September 2021" or just "Year 2021". - schema v3: add nullable Lot.harvest_month (1..12) + migration + tests - repo/cubit propagate harvestMonth; localized month names (en/es) via slang
This commit is contained in:
parent
9e5c82184b
commit
5d4053157f
17 changed files with 3799 additions and 57 deletions
|
|
@ -48,6 +48,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
|||
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$harvest$en harvest = Translations$harvest$en.internal(_root);
|
||||
late final Translations$lotType$en lotType = Translations$lotType$en.internal(_root);
|
||||
late final Translations$unit$en unit = Translations$unit$en.internal(_root);
|
||||
}
|
||||
|
|
@ -249,8 +250,8 @@ class Translations$addLot$en {
|
|||
/// en: 'Add lot'
|
||||
String get title => 'Add lot';
|
||||
|
||||
/// en: 'Harvest year'
|
||||
String get year => 'Harvest year';
|
||||
/// en: 'Harvest date'
|
||||
String get year => 'Harvest date';
|
||||
|
||||
/// en: 'How much?'
|
||||
String get quantity => 'How much?';
|
||||
|
|
@ -259,6 +260,39 @@ class Translations$addLot$en {
|
|||
String get amount => 'Amount';
|
||||
}
|
||||
|
||||
// Path: harvest
|
||||
class Translations$harvest$en {
|
||||
Translations$harvest$en.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'Select month / year'
|
||||
String get pickTitle => 'Select month / year';
|
||||
|
||||
/// en: 'Any month'
|
||||
String get anyMonth => 'Any month';
|
||||
|
||||
/// en: 'Set harvest date'
|
||||
String get noDate => 'Set harvest date';
|
||||
|
||||
List<String> get monthNames => [
|
||||
'January',
|
||||
'February',
|
||||
'March',
|
||||
'April',
|
||||
'May',
|
||||
'June',
|
||||
'July',
|
||||
'August',
|
||||
'September',
|
||||
'October',
|
||||
'November',
|
||||
'December',
|
||||
];
|
||||
}
|
||||
|
||||
// Path: lotType
|
||||
class Translations$lotType$en {
|
||||
Translations$lotType$en.internal(this._root);
|
||||
|
|
@ -682,9 +716,24 @@ extension on Translations {
|
|||
'editVariety.species' => 'Species (from catalog)',
|
||||
'editVariety.speciesHint' => 'Search a species…',
|
||||
'addLot.title' => 'Add lot',
|
||||
'addLot.year' => 'Harvest year',
|
||||
'addLot.year' => 'Harvest date',
|
||||
'addLot.quantity' => 'How much?',
|
||||
'addLot.amount' => 'Amount',
|
||||
'harvest.pickTitle' => 'Select month / year',
|
||||
'harvest.anyMonth' => 'Any month',
|
||||
'harvest.noDate' => 'Set harvest date',
|
||||
'harvest.monthNames.0' => 'January',
|
||||
'harvest.monthNames.1' => 'February',
|
||||
'harvest.monthNames.2' => 'March',
|
||||
'harvest.monthNames.3' => 'April',
|
||||
'harvest.monthNames.4' => 'May',
|
||||
'harvest.monthNames.5' => 'June',
|
||||
'harvest.monthNames.6' => 'July',
|
||||
'harvest.monthNames.7' => 'August',
|
||||
'harvest.monthNames.8' => 'September',
|
||||
'harvest.monthNames.9' => 'October',
|
||||
'harvest.monthNames.10' => 'November',
|
||||
'harvest.monthNames.11' => 'December',
|
||||
'lotType.seed' => 'Seeds',
|
||||
'lotType.plant' => 'Plants',
|
||||
'unit.aFew' => 'a few',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue