Fix order history to use OrderManager trait via ServiceProvider #15

Closed
opened 2026-02-09 21:04:29 +00:00 by mik-tf · 3 comments
Owner

Problem

The order history page is completely empty. Order-related handlers bypass ServiceProvider and use fixture-based order services.

Affected Areas

  • Order history page (dashboard)
  • Order detail view
  • Order status tracking
  • Purchase flow completion

Current State

The hero OrderManager implementation exists at src/services/impl_hero/order_manager.rs (297 lines) with full CRUD via hero_osis network domain. The seed script creates 6 orders with various statuses (pending, confirmed, completed, cancelled).

Solution

  1. Replace order fixture instantiation with services.orders.* calls
  2. Wire order list page to services.orders.get_orders(&user_id)
  3. Wire order detail to services.orders.get_order(&order_id)
  4. Ensure order creation flow uses services.orders.create_order()
  5. Verify status transitions work through trait methods

Acceptance Criteria

  • Order history shows 6 seeded orders
  • Order detail pages load correctly
  • Order status is displayed accurately
  • Zero fixture bypasses for order operations

Dependencies

  • Depends on: #9 (split dashboard.rs)
  • Independent of provider rewiring issues
## Problem The order history page is completely empty. Order-related handlers bypass ServiceProvider and use fixture-based order services. ## Affected Areas - Order history page (dashboard) - Order detail view - Order status tracking - Purchase flow completion ## Current State The hero `OrderManager` implementation exists at `src/services/impl_hero/order_manager.rs` (297 lines) with full CRUD via hero_osis network domain. The seed script creates 6 orders with various statuses (pending, confirmed, completed, cancelled). ## Solution 1. Replace order fixture instantiation with `services.orders.*` calls 2. Wire order list page to `services.orders.get_orders(&user_id)` 3. Wire order detail to `services.orders.get_order(&order_id)` 4. Ensure order creation flow uses `services.orders.create_order()` 5. Verify status transitions work through trait methods ## Acceptance Criteria - [ ] Order history shows 6 seeded orders - [ ] Order detail pages load correctly - [ ] Order status is displayed accurately - [ ] Zero fixture bypasses for order operations ## Dependencies - Depends on: #9 (split dashboard.rs) - Independent of provider rewiring issues
Author
Owner

Order handlers fully use services.orders.* and services.cart.* — no fixture bypasses.

Order handlers fully use services.orders.* and services.cart.* — no fixture bypasses.
Author
Owner

Reopened — remaining work

Remaining bypasses in order.rs:

  • 9x CurrencyService::new() (utility, keep)

These are pure exchange-rate conversions for price display — no trait needed. May close if we classify CurrencyService as legitimate utility.

## Reopened — remaining work Remaining bypasses in order.rs: - 9x `CurrencyService::new()` (utility, keep) These are pure exchange-rate conversions for price display — no trait needed. May close if we classify CurrencyService as legitimate utility.
Author
Owner

archived repo, closing

archived repo, closing
Commenting is not possible because the repository is archived.
No description provided.