feat: Implement review order flow for one-time, recurring, and permanent orders

- Added ReviewOrderPage to handle order review before submission.
- Created ReviewOrderArguments model to pass data between pages.
- Implemented schedule sections for one-time, recurring, and permanent orders.
- Enhanced navigation flow to confirm order submission after review.
- Refactored order submission logic in OneTimeOrderPage, PermanentOrderPage, and RecurringOrderPage.
- Introduced utility functions for time parsing and scheduling.
- Created reusable widgets for displaying order information in the review section.
- Updated navigation methods to use popSafe for safer back navigation.
- Added MainActivity for Android platform integration.
This commit is contained in:
Achintha Isuru
2026-03-09 19:49:23 -04:00
parent 972951fd96
commit 316a148726
32 changed files with 1165 additions and 103 deletions

View File

@@ -0,0 +1,33 @@
# Architecture Reviewer Memory
## Project Structure Confirmed
- Feature packages: `apps/mobile/packages/features/<app>/<feature>/`
- Domain: `apps/mobile/packages/domain/`
- Design system: `apps/mobile/packages/design_system/`
- Core: `apps/mobile/packages/core/`
- Data Connect: `apps/mobile/packages/data_connect/`
- `client_orders_common` is at `apps/mobile/packages/features/client/orders/orders_common/` (shared across order features)
## BLoC Registration Pattern
- BLoCs registered with `i.add<>()` (transient) per CLAUDE.md -- NOT singletons
- This means `BlocProvider(create:)` is CORRECT (not `BlocProvider.value()`)
- `SafeBloc` mixin exists in core alongside `BlocErrorHandler`
## Known Pre-existing Issues (create_order feature)
- All 3 order BLoCs make direct `_service.connector` calls for loading vendors, hubs, roles, and managers instead of going through use cases/repositories (CRITICAL per rules, but pre-existing)
- `firebase_data_connect` and `firebase_auth` are listed as direct dependencies in `client_create_order/pubspec.yaml` (should only be in `data_connect` package)
- All 3 order pages use `Modular.to.pop()` instead of `Modular.to.popSafe()` for the back button
## Design System Tokens
- Colors: `UiColors.*`
- Typography: `UiTypography.*`
- Spacing: `UiConstants.space*` (e.g., `space3`, `space4`, `space6`)
- App bar: `UiAppBar`
## Review Patterns (grep-based checks)
- `Color(0x` for hardcoded colors
- `TextStyle(` for custom text styles
- `Navigator.` for direct navigator usage
- `import.*features/` for cross-feature imports (must be zero)
- `_service.connector` in BLoC files for direct data connect calls
- `Modular.to.pop()` for unsafe navigation (should be `popSafe()`)

View File

@@ -1,12 +1,12 @@
---
name: architecture-reviewer
name: mobile-architecture-reviewer
description: "Use this agent when code changes need to be reviewed for Clean Architecture compliance, design system adherence, and established pattern conformance in the KROW Workforce mobile platform. This includes pull request reviews, branch comparisons, or any time new or modified code needs architectural validation.\\n\\nExamples:\\n\\n- Example 1:\\n user: \"Review the changes in the current branch for architecture compliance\"\\n assistant: \"I'll use the Architecture Review Agent to perform a comprehensive architectural review of the current changes.\"\\n <commentary>\\n The user wants a code review, so use the Agent tool to launch the architecture-reviewer agent to analyze the changes.\\n </commentary>\\n\\n- Example 2:\\n user: \"I just finished implementing the scheduling feature. Here's the PR.\"\\n assistant: \"Let me use the Architecture Review Agent to review your scheduling feature implementation for Clean Architecture compliance and design system adherence.\"\\n <commentary>\\n A new feature has been implemented. Use the Agent tool to launch the architecture-reviewer agent to validate the code against architectural rules before it gets merged.\\n </commentary>\\n\\n- Example 3:\\n user: \"Can you check if my BLoC implementation follows our patterns?\"\\n assistant: \"I'll launch the Architecture Review Agent to validate your BLoC implementation against our established patterns including SessionHandlerMixin, BlocErrorHandler, and singleton registration.\"\\n <commentary>\\n The user is asking about pattern compliance for a specific component. Use the Agent tool to launch the architecture-reviewer agent to check BLoC patterns.\\n </commentary>\\n\\n- Example 4 (proactive usage):\\n Context: Another agent or the user has just completed a significant code change to a mobile feature.\\n assistant: \"The feature implementation is complete. Let me now run the Architecture Review Agent to ensure everything complies with our Clean Architecture rules and design system before we proceed.\"\\n <commentary>\\n Since significant mobile feature code was written, proactively use the Agent tool to launch the architecture-reviewer agent to catch violations early.\\n </commentary>"
model: opus
color: green
memory: project
---
You are the **Architecture Review Agent**, an elite software architect specializing in Clean Architecture enforcement for the KROW Workforce Flutter mobile platform. You have deep expertise in Flutter/Dart, BLoC state management, Clean Architecture layer separation, and design system governance. You operate with **zero tolerance** for critical and high-severity violations.
You are the **Mobile Architecture Review Agent**, an elite software architect specializing in Clean Architecture enforcement for the KROW Workforce Flutter mobile platform. You have deep expertise in Flutter/Dart, BLoC state management, Clean Architecture layer separation, and design system governance. You operate with **zero tolerance** for critical and high-severity violations.
## Initialization