feat(core-ui): implement navigation and operator UI for spec 3 #140

Closed
dev-bot wants to merge 6 commits from (deleted):feat/core-entities-ui-nav-operator into main
Collaborator

Summary

  • implement spec 3 section 1 (Navigation) and section 2 (Operator UI)
  • add Settings links for Operators, Parcels, Crops, Seasons (new entity links added above Pesticides)
  • rename operator UI files from applicator naming to operator naming
  • implement operator list/edit UX with archive lifecycle and optional license handling

What changed

  • Navigation
    • settings_page.dart
      • switched Applicators -> Operators entry
      • added Parcels/Crops/Seasons list tiles above Pesticides
      • temporary taps for Parcels/Crops/Seasons open ComingSoonDialog
  • Operator UI
    • renamed files:
      • app/lib/applicators_page.dart -> app/lib/operators_page.dart
      • app/lib/edit_applicator_page.dart removed (using edit_operator_page.dart)
    • operators_page.dart
      • uses "Operators" labels
      • supports "Show archived" toggle
      • archived operators are visually subdued
    • edit_operator_page.dart
      • uses "Operator" labels
      • license number is optional
      • supports delete/archive/unarchive action button state:
        • archived => Unarchive
        • active + deletable => Delete
        • active + referenced => Archive
      • delete confirmation dialog
      • clearing license field deletes existing applicator_license row
  • DAO updates
    • operators_dao.dart
      • queryAllRows({includeArchived})
      • archive, unarchive, canDelete, hardDelete
    • applicator_licenses_dao.dart
      • deleteByOperatorId
  • Spec checklist updates
    • marked Navigation section complete
    • marked all Operator UI tasks complete

Validation

  • just fmt
  • just lint
  • just test

All pass locally.

## Summary - implement spec 3 section 1 (Navigation) and section 2 (Operator UI) - add Settings links for Operators, Parcels, Crops, Seasons (new entity links added above Pesticides) - rename operator UI files from applicator naming to operator naming - implement operator list/edit UX with archive lifecycle and optional license handling ## What changed - Navigation - `settings_page.dart` - switched Applicators -> Operators entry - added Parcels/Crops/Seasons list tiles above Pesticides - temporary taps for Parcels/Crops/Seasons open `ComingSoonDialog` - Operator UI - renamed files: - `app/lib/applicators_page.dart` -> `app/lib/operators_page.dart` - `app/lib/edit_applicator_page.dart` removed (using `edit_operator_page.dart`) - `operators_page.dart` - uses "Operators" labels - supports "Show archived" toggle - archived operators are visually subdued - `edit_operator_page.dart` - uses "Operator" labels - license number is optional - supports delete/archive/unarchive action button state: - archived => Unarchive - active + deletable => Delete - active + referenced => Archive - delete confirmation dialog - clearing license field deletes existing `applicator_license` row - DAO updates - `operators_dao.dart` - `queryAllRows({includeArchived})` - `archive`, `unarchive`, `canDelete`, `hardDelete` - `applicator_licenses_dao.dart` - `deleteByOperatorId` - Spec checklist updates - marked Navigation section complete - marked all Operator UI tasks complete ## Validation - `just fmt` - `just lint` - `just test` All pass locally.
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Settings page tiles for Parcels, Crops, and Seasons had empty onTap
callbacks. Wire them up to show ComingSoonDialog so they are tappable
and communicate unimplemented status to the user.

Co-authored-by: Shelley <shelley@exe.dev>
Action buttons now follow the exclusive precedence:
  1. Archived → Unarchive only
  2. Deletable (no refs) → Delete only
  3. Has refs → Archive only

Previous code could show both Delete and Archive simultaneously,
which contradicts the spec.

Co-authored-by: Shelley <shelley@exe.dev>
fix(operator): allow clearing license number on save
All checks were successful
Flutter CI / test (pull_request) Successful in 5m16s
PR Build / build (pull_request) Successful in 25m0s
271e3f8ce1
Add ApplicatorLicensesDao.deleteByOperatorId() and call it in the
edit-operator save flow when the license field is left empty.
Previously, clearing an existing license number had no effect because
the empty-string branch was silently skipped.

Co-authored-by: Shelley <shelley@exe.dev>
dev-bot closed this pull request 2026-03-03 13:59:48 -05:00
Author
Collaborator

Superseded by #141 (reopened as requested to use a fresh PR on the same branch).

Superseded by #141 (reopened as requested to use a fresh PR on the same branch).
All checks were successful
Flutter CI / test (pull_request) Successful in 5m16s
PR Build / build (pull_request) Successful in 25m0s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kwila/karriba!140
No description provided.