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
|
|
@ -27,6 +27,7 @@ import 'state/inventory_cubit.dart';
|
|||
import 'state/variety_detail_cubit.dart';
|
||||
import 'ui/about_screen.dart';
|
||||
import 'ui/auto_backup_gate.dart';
|
||||
import 'ui/calendar_screen.dart';
|
||||
import 'ui/chat_list_screen.dart';
|
||||
import 'ui/chat_screen.dart';
|
||||
import 'ui/home_screen.dart';
|
||||
|
|
@ -266,6 +267,12 @@ class TaneApp extends StatelessWidget {
|
|||
path: '/sales',
|
||||
builder: (context, state) => const SalesScreen(),
|
||||
),
|
||||
// "What's due this month" across the inventory — reads the per-variety
|
||||
// crop calendar, no network.
|
||||
GoRoute(
|
||||
path: '/calendar',
|
||||
builder: (context, state) => const CalendarScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/variety/:id',
|
||||
builder: (context, state) => BlocProvider(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue