feat(calendar): "what's due this month" — dedicated screen + inventory filter
Reuses the existing per-variety crop-calendar masks (sow/transplant/ flowering/fruiting/seed-harvest) — no schema change, no migration — to answer "qué toca este mes" across the whole inventory. Since the months are the grower's own record, there's no hemisphere assumption. - Repo: CalendarEntry + watchCalendar() (varieties with any recorded phase); VarietyListItem now carries sowMonths. - Dedicated CalendarScreen (/calendar): a month strip (defaults to the current month, intl month names) and varieties grouped by phase — actions (sow/transplant/harvest seed) above informational (flowering/ fruiting), each tinted, tap → variety detail; empty-month state. - Inventory filter: a 'this month' chip (shown only when some variety has a calendar) keeps what sows in the current month; folded into the attributes group + clear-filters. - Entry points: a live Home card + a drawer item. - i18n calendar block + menu.calendar (en/es/pt/ast). - Tests: calendar_test (watchCalendar, list carries sow-months, pure filter), calendar_screen_test (phase grouping, month switch, empty), plus the screen added to the small-screen overflow guard.
This commit is contained in:
parent
28e8318026
commit
171daabce3
19 changed files with 681 additions and 5 deletions
|
|
@ -1,4 +1,10 @@
|
|||
{
|
||||
"calendar": {
|
||||
"title": "Esti mes",
|
||||
"homeSubtitle": "Qué semar y facer agora",
|
||||
"filterChip": "Esti mes",
|
||||
"nothing": "Nada anotao pa {month}."
|
||||
},
|
||||
"app": {
|
||||
"title": "Tanemaki"
|
||||
},
|
||||
|
|
@ -38,6 +44,7 @@
|
|||
"following": "Siguiendo",
|
||||
"plantares": "Plantares",
|
||||
"sales": "Ventes",
|
||||
"calendar": "Calendariu",
|
||||
"settings": "Axustes"
|
||||
},
|
||||
"settings": {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
{
|
||||
"calendar": {
|
||||
"title": "This month",
|
||||
"homeSubtitle": "What to sow and do now",
|
||||
"filterChip": "This month",
|
||||
"nothing": "Nothing noted for {month}."
|
||||
},
|
||||
"app": {
|
||||
"title": "Tanemaki"
|
||||
},
|
||||
|
|
@ -39,6 +45,7 @@
|
|||
"following": "Following",
|
||||
"plantares": "Plantares",
|
||||
"sales": "Sales",
|
||||
"calendar": "Calendar",
|
||||
"settings": "Settings"
|
||||
},
|
||||
"settings": {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
{
|
||||
"calendar": {
|
||||
"title": "Este mes",
|
||||
"homeSubtitle": "Qué sembrar y hacer ahora",
|
||||
"filterChip": "Este mes",
|
||||
"nothing": "Nada anotado para {month}."
|
||||
},
|
||||
"app": {
|
||||
"title": "Tanemaki"
|
||||
},
|
||||
|
|
@ -39,6 +45,7 @@
|
|||
"following": "Siguiendo",
|
||||
"plantares": "Plantares",
|
||||
"sales": "Ventas",
|
||||
"calendar": "Calendario",
|
||||
"settings": "Ajustes"
|
||||
},
|
||||
"settings": {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
{
|
||||
"calendar": {
|
||||
"title": "Este mês",
|
||||
"homeSubtitle": "O que semear e fazer agora",
|
||||
"filterChip": "Este mês",
|
||||
"nothing": "Nada anotado para {month}."
|
||||
},
|
||||
"app": {
|
||||
"title": "Tanemaki"
|
||||
},
|
||||
|
|
@ -39,6 +45,7 @@
|
|||
"following": "A seguir",
|
||||
"plantares": "Plantares",
|
||||
"sales": "Vendas",
|
||||
"calendar": "Calendário",
|
||||
"settings": "Definições"
|
||||
},
|
||||
"settings": {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 4
|
||||
/// Strings: 1832 (458 per locale)
|
||||
/// Strings: 1852 (463 per locale)
|
||||
///
|
||||
/// Built on 2026-07-11 at 04:03 UTC
|
||||
/// Built on 2026-07-11 at 04:24 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class TranslationsAst extends Translations with BaseTranslations<AppLocale, Tran
|
|||
TranslationsAst $copyWith({TranslationMetadata<AppLocale, Translations>? meta}) => TranslationsAst(meta: meta ?? this.$meta);
|
||||
|
||||
// Translations
|
||||
@override late final _Translations$calendar$ast calendar = _Translations$calendar$ast._(_root);
|
||||
@override late final _Translations$app$ast app = _Translations$app$ast._(_root);
|
||||
@override late final _Translations$bootstrap$ast bootstrap = _Translations$bootstrap$ast._(_root);
|
||||
@override late final _Translations$common$ast common = _Translations$common$ast._(_root);
|
||||
|
|
@ -81,6 +82,19 @@ class TranslationsAst extends Translations with BaseTranslations<AppLocale, Tran
|
|||
@override late final _Translations$sale$ast sale = _Translations$sale$ast._(_root);
|
||||
}
|
||||
|
||||
// Path: calendar
|
||||
class _Translations$calendar$ast extends Translations$calendar$en {
|
||||
_Translations$calendar$ast._(TranslationsAst root) : this._root = root, super.internal(root);
|
||||
|
||||
final TranslationsAst _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Esti mes';
|
||||
@override String get homeSubtitle => 'Qué semar y facer agora';
|
||||
@override String get filterChip => 'Esti mes';
|
||||
@override String nothing({required Object month}) => 'Nada anotao pa ${month}.';
|
||||
}
|
||||
|
||||
// Path: app
|
||||
class _Translations$app$ast extends Translations$app$en {
|
||||
_Translations$app$ast._(TranslationsAst root) : this._root = root, super.internal(root);
|
||||
|
|
@ -161,6 +175,7 @@ class _Translations$menu$ast extends Translations$menu$en {
|
|||
@override String get following => 'Siguiendo';
|
||||
@override String get plantares => 'Plantares';
|
||||
@override String get sales => 'Ventes';
|
||||
@override String get calendar => 'Calendariu';
|
||||
@override String get settings => 'Axustes';
|
||||
}
|
||||
|
||||
|
|
@ -1208,6 +1223,10 @@ class _Translations$intro$slides$plantare$ast extends Translations$intro$slides$
|
|||
extension on TranslationsAst {
|
||||
dynamic _flatMapFunction(String path) {
|
||||
return switch (path) {
|
||||
'calendar.title' => 'Esti mes',
|
||||
'calendar.homeSubtitle' => 'Qué semar y facer agora',
|
||||
'calendar.filterChip' => 'Esti mes',
|
||||
'calendar.nothing' => ({required Object month}) => 'Nada anotao pa ${month}.',
|
||||
'app.title' => 'Tanemaki',
|
||||
'bootstrap.failed' => 'Tanemaki nun pudo aniciar',
|
||||
'bootstrap.retry' => 'Reintentar',
|
||||
|
|
@ -1236,6 +1255,7 @@ extension on TranslationsAst {
|
|||
'menu.following' => 'Siguiendo',
|
||||
'menu.plantares' => 'Plantares',
|
||||
'menu.sales' => 'Ventes',
|
||||
'menu.calendar' => 'Calendariu',
|
||||
'menu.settings' => 'Axustes',
|
||||
'settings.language' => 'Llingua',
|
||||
'settings.systemLanguage' => 'Llingua del sistema',
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
|||
Translations $copyWith({TranslationMetadata<AppLocale, Translations>? meta}) => Translations(meta: meta ?? this.$meta);
|
||||
|
||||
// Translations
|
||||
late final Translations$calendar$en calendar = Translations$calendar$en.internal(_root);
|
||||
late final Translations$app$en app = Translations$app$en.internal(_root);
|
||||
late final Translations$bootstrap$en bootstrap = Translations$bootstrap$en.internal(_root);
|
||||
late final Translations$common$en common = Translations$common$en.internal(_root);
|
||||
|
|
@ -82,6 +83,27 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
|||
late final Translations$sale$en sale = Translations$sale$en.internal(_root);
|
||||
}
|
||||
|
||||
// Path: calendar
|
||||
class Translations$calendar$en {
|
||||
Translations$calendar$en.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'This month'
|
||||
String get title => 'This month';
|
||||
|
||||
/// en: 'What to sow and do now'
|
||||
String get homeSubtitle => 'What to sow and do now';
|
||||
|
||||
/// en: 'This month'
|
||||
String get filterChip => 'This month';
|
||||
|
||||
/// en: 'Nothing noted for {month}.'
|
||||
String nothing({required Object month}) => 'Nothing noted for ${month}.';
|
||||
}
|
||||
|
||||
// Path: app
|
||||
class Translations$app$en {
|
||||
Translations$app$en.internal(this._root);
|
||||
|
|
@ -222,6 +244,9 @@ class Translations$menu$en {
|
|||
/// en: 'Sales'
|
||||
String get sales => 'Sales';
|
||||
|
||||
/// en: 'Calendar'
|
||||
String get calendar => 'Calendar';
|
||||
|
||||
/// en: 'Settings'
|
||||
String get settings => 'Settings';
|
||||
}
|
||||
|
|
@ -2111,6 +2136,10 @@ class Translations$intro$slides$plantare$en {
|
|||
extension on Translations {
|
||||
dynamic _flatMapFunction(String path) {
|
||||
return switch (path) {
|
||||
'calendar.title' => 'This month',
|
||||
'calendar.homeSubtitle' => 'What to sow and do now',
|
||||
'calendar.filterChip' => 'This month',
|
||||
'calendar.nothing' => ({required Object month}) => 'Nothing noted for ${month}.',
|
||||
'app.title' => 'Tanemaki',
|
||||
'bootstrap.failed' => 'Tanemaki couldn\'t start',
|
||||
'bootstrap.retry' => 'Try again',
|
||||
|
|
@ -2140,6 +2169,7 @@ extension on Translations {
|
|||
'menu.following' => 'Following',
|
||||
'menu.plantares' => 'Plantares',
|
||||
'menu.sales' => 'Sales',
|
||||
'menu.calendar' => 'Calendar',
|
||||
'menu.settings' => 'Settings',
|
||||
'settings.language' => 'Language',
|
||||
'settings.systemLanguage' => 'System language',
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class TranslationsEs extends Translations with BaseTranslations<AppLocale, Trans
|
|||
TranslationsEs $copyWith({TranslationMetadata<AppLocale, Translations>? meta}) => TranslationsEs(meta: meta ?? this.$meta);
|
||||
|
||||
// Translations
|
||||
@override late final _Translations$calendar$es calendar = _Translations$calendar$es._(_root);
|
||||
@override late final _Translations$app$es app = _Translations$app$es._(_root);
|
||||
@override late final _Translations$bootstrap$es bootstrap = _Translations$bootstrap$es._(_root);
|
||||
@override late final _Translations$common$es common = _Translations$common$es._(_root);
|
||||
|
|
@ -81,6 +82,19 @@ class TranslationsEs extends Translations with BaseTranslations<AppLocale, Trans
|
|||
@override late final _Translations$sale$es sale = _Translations$sale$es._(_root);
|
||||
}
|
||||
|
||||
// Path: calendar
|
||||
class _Translations$calendar$es extends Translations$calendar$en {
|
||||
_Translations$calendar$es._(TranslationsEs root) : this._root = root, super.internal(root);
|
||||
|
||||
final TranslationsEs _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Este mes';
|
||||
@override String get homeSubtitle => 'Qué sembrar y hacer ahora';
|
||||
@override String get filterChip => 'Este mes';
|
||||
@override String nothing({required Object month}) => 'Nada anotado para ${month}.';
|
||||
}
|
||||
|
||||
// Path: app
|
||||
class _Translations$app$es extends Translations$app$en {
|
||||
_Translations$app$es._(TranslationsEs root) : this._root = root, super.internal(root);
|
||||
|
|
@ -162,6 +176,7 @@ class _Translations$menu$es extends Translations$menu$en {
|
|||
@override String get following => 'Siguiendo';
|
||||
@override String get plantares => 'Plantares';
|
||||
@override String get sales => 'Ventas';
|
||||
@override String get calendar => 'Calendario';
|
||||
@override String get settings => 'Ajustes';
|
||||
}
|
||||
|
||||
|
|
@ -1210,6 +1225,10 @@ class _Translations$intro$slides$plantare$es extends Translations$intro$slides$p
|
|||
extension on TranslationsEs {
|
||||
dynamic _flatMapFunction(String path) {
|
||||
return switch (path) {
|
||||
'calendar.title' => 'Este mes',
|
||||
'calendar.homeSubtitle' => 'Qué sembrar y hacer ahora',
|
||||
'calendar.filterChip' => 'Este mes',
|
||||
'calendar.nothing' => ({required Object month}) => 'Nada anotado para ${month}.',
|
||||
'app.title' => 'Tanemaki',
|
||||
'bootstrap.failed' => 'Tanemaki no pudo arrancar',
|
||||
'bootstrap.retry' => 'Reintentar',
|
||||
|
|
@ -1239,6 +1258,7 @@ extension on TranslationsEs {
|
|||
'menu.following' => 'Siguiendo',
|
||||
'menu.plantares' => 'Plantares',
|
||||
'menu.sales' => 'Ventas',
|
||||
'menu.calendar' => 'Calendario',
|
||||
'menu.settings' => 'Ajustes',
|
||||
'settings.language' => 'Idioma',
|
||||
'settings.systemLanguage' => 'Idioma del sistema',
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class TranslationsPt extends Translations with BaseTranslations<AppLocale, Trans
|
|||
TranslationsPt $copyWith({TranslationMetadata<AppLocale, Translations>? meta}) => TranslationsPt(meta: meta ?? this.$meta);
|
||||
|
||||
// Translations
|
||||
@override late final _Translations$calendar$pt calendar = _Translations$calendar$pt._(_root);
|
||||
@override late final _Translations$app$pt app = _Translations$app$pt._(_root);
|
||||
@override late final _Translations$bootstrap$pt bootstrap = _Translations$bootstrap$pt._(_root);
|
||||
@override late final _Translations$common$pt common = _Translations$common$pt._(_root);
|
||||
|
|
@ -81,6 +82,19 @@ class TranslationsPt extends Translations with BaseTranslations<AppLocale, Trans
|
|||
@override late final _Translations$sale$pt sale = _Translations$sale$pt._(_root);
|
||||
}
|
||||
|
||||
// Path: calendar
|
||||
class _Translations$calendar$pt extends Translations$calendar$en {
|
||||
_Translations$calendar$pt._(TranslationsPt root) : this._root = root, super.internal(root);
|
||||
|
||||
final TranslationsPt _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Este mês';
|
||||
@override String get homeSubtitle => 'O que semear e fazer agora';
|
||||
@override String get filterChip => 'Este mês';
|
||||
@override String nothing({required Object month}) => 'Nada anotado para ${month}.';
|
||||
}
|
||||
|
||||
// Path: app
|
||||
class _Translations$app$pt extends Translations$app$en {
|
||||
_Translations$app$pt._(TranslationsPt root) : this._root = root, super.internal(root);
|
||||
|
|
@ -162,6 +176,7 @@ class _Translations$menu$pt extends Translations$menu$en {
|
|||
@override String get following => 'A seguir';
|
||||
@override String get plantares => 'Plantares';
|
||||
@override String get sales => 'Vendas';
|
||||
@override String get calendar => 'Calendário';
|
||||
@override String get settings => 'Definições';
|
||||
}
|
||||
|
||||
|
|
@ -1207,6 +1222,10 @@ class _Translations$intro$slides$plantare$pt extends Translations$intro$slides$p
|
|||
extension on TranslationsPt {
|
||||
dynamic _flatMapFunction(String path) {
|
||||
return switch (path) {
|
||||
'calendar.title' => 'Este mês',
|
||||
'calendar.homeSubtitle' => 'O que semear e fazer agora',
|
||||
'calendar.filterChip' => 'Este mês',
|
||||
'calendar.nothing' => ({required Object month}) => 'Nada anotado para ${month}.',
|
||||
'app.title' => 'Tanemaki',
|
||||
'bootstrap.failed' => 'O Tanemaki não conseguiu iniciar',
|
||||
'bootstrap.retry' => 'Tentar de novo',
|
||||
|
|
@ -1236,6 +1255,7 @@ extension on TranslationsPt {
|
|||
'menu.following' => 'A seguir',
|
||||
'menu.plantares' => 'Plantares',
|
||||
'menu.sales' => 'Vendas',
|
||||
'menu.calendar' => 'Calendário',
|
||||
'menu.settings' => 'Definições',
|
||||
'settings.language' => 'Idioma',
|
||||
'settings.systemLanguage' => 'Idioma do sistema',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue