MRA-05 — Reseller app — orders, tracking & assisted-order confirmation
Status counters, list with live progress tracker (SSE while open, push otherwise), order detail with timeline, documents, cancel, reorder, contact support; confirm or reject assisted orders.
| Field | Details |
|---|---|
| Task code | MRA-05 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Sun 15 Nov 2026 |
| Due | Tue 17 Nov 2026 |
| Responsible | Imad — Mobile developer (Flutter) |
| Co-responsible | — |
| Effort | 1.5 person-day(s) planned · 5 from scratch · size S |
| Area · app | Reseller app · mobile |
| Depends on | DES-09 |
| Unblocks | MRA-10 |
| Milestones | — |
Summary
Status counters, list with live progress tracker (SSE while open, push otherwise), order detail with timeline, documents, cancel, reorder, contact support; confirm or reject assisted orders.
Description
Resellers follow every order from « Envoyée » to « Livrée » and act on it — cancel, reorder, download documents, contact support — and they confirm or refuse orders their delegate prepared for them (ORD-07, ORD-08, ORD-10, ORD-12). Scope: orders list RA-21 with status counters and progress tracker, order detail and tracking RA-22 (timeline of status changes and modifications, delivery, invoice and delivery-note PDFs, allowed actions) and assisted-order confirmation RA-23. Live updates (ORD-15) are designed in here: providers refresh on push, resume and pull-to-refresh, and expose an event hook that MRA-10's SSE client feeds while the app is open. It needs orders.* (SRV-16) with allowedActions on the detail, push payloads from MOB-08 and Akram's DES-09 frames. MRA-10 adds returns and the SSE client; MRA-08 opens claims from the order detail.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | OrdersScreen RA-21: counters from GET /orders/summary as filter chips (« Envoyée », « Validée », « En préparation », « Expédiée », « Livrée », « Annulée »…), search by order number, cursor list on GET /orders with OrderCard progress tracker | Imad |
| 2 | OrdersRepository with an applyOrderEvent(orderId, status) hook and provider invalidation, refreshed on push receipt, app resume and pull-to-refresh (SSE plugged in by MRA-10) | Imad |
| 3 | OrderDetailScreen RA-22 on GET /orders/{orderId}: lines, totals, payment method, address, delivery mode and status, channel badge (« Commande assistée »…) | Imad |
| 4 | StatusTimeline: every StatusChange and OrderChange with date, actor and reason (e.g. quantity changed by HOCO) (ORD-06) | Imad |
| 5 | Documents: GET /orders/{orderId}/documents/{type} for the invoice and delivery note → signed URL → in-app PDF viewer with share/download (ORD-12) | Imad |
| 6 | Cancel sheet (POST /orders/{orderId}/cancel with an ORDER_CANCEL_REASON) shown only while SUBMITTED or PENDING per allowedActions; ORDER_TRANSITION_NOT_ALLOWED handled when the status moved meanwhile (ORD-10) | Imad |
| 7 | Reorder (POST /orders/{orderId}/reorder) → cart with a summary of lines skipped as unavailable | Imad |
| 8 | Support actions on the detail: « Signaler un problème » (prefilled ticket / SAV claim from MRA-08), WhatsApp regional button, and the « Demander un retour » entry for MRA-10 | Imad |
| 9 | AssistedOrderConfirmationScreen RA-23: delegate name, lines and totals, expiry countdown to assistedExpiresAt, « Confirmer » (POST /orders/{orderId}/confirm with the totals shown) or « Refuser » with a reason (POST /orders/{orderId}/reject); CART_CHANGED and ASSISTED_ORDER_EXPIRED handled | Imad |
| 10 | Entry points to RA-23 from the push « Votre délégué a préparé une commande », the inbox and a banner on the orders list | Imad |
Deliverables
- apps/reseller/lib/src/features/orders/ (list, detail, timeline, documents, assisted confirmation)
- apps/reseller/lib/src/features/orders/data/orders_repository.dart with the event hook used by MRA-10
- Widget tests and goldens for each OrderStatus of the progress tracker
Acceptance criteria
- Counters match the list for each status filter (ORD-07)
- A status change pushed by the server is visible in the list and detail within seconds of opening the push or returning to the app (ORD-15, with SSE added in MRA-10)
- Cancel is offered only while the order is « Envoyée » or « En attente » and is refused gracefully with ORDER_TRANSITION_NOT_ALLOWED if the back-office validated it meanwhile (ORD-10)
- Invoice and delivery-note PDFs open from the detail through signed URLs (ORD-12)
- An assisted order can be confirmed or refused before expiry; after expiry the screen shows ASSISTED_ORDER_EXPIRED and no action (ORD-08)
- Confirming an assisted order whose prices changed returns CART_CHANGED and shows the new totals before re-confirming
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| ORD-06 | Every modification and status change is historised, dated and notified | V1 |
| ORD-07 | Reseller order tracking: counters by status, filters, progress, details, invoice download, support, reorder | V1 |
| ORD-08 | Assisted orders prepared by a delegate, confirmed by the reseller or validated by the administration | V1 |
| ORD-10 | Cancellation rules by actor and status, with stock release | V1 |
| ORD-12 | Order documents: invoice and delivery note PDFs | V1 |
| ORD-15 | Order status changes reach the reseller in real time (live update in the app and web) and as a notification | V1 |
Screens
API surface
| Endpoint group | Operations |
|---|---|
| Reseller orders | 11 |
Test measures
- Widget tests of the progress tracker for SUBMITTED, PENDING, VALIDATED, REFUSED, PREPARING, SHIPPED, DELIVERED, CANCELLED, RETURNED
- Integration test: push tap → assisted confirmation → confirm → order detail shows « Envoyée »
- Unit tests of allowedActions → visible buttons mapping
Risks
- Client and server disagree on what is cancellable — render actions only from the server's allowedActions, never from local status logic
KPI
- Delivered by Tue 17 Nov 2026 within 1.5 person-day(s).
- Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
- Zero open critical defects, permission gaps or data-integrity regressions at sign-off.
Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.
MRA-04 — Reseller app — cart, checkout & confirmation
Cart with live re-validation messages, address book, payment method with credit availability, order note, idempotent checkout, confirmation.
MRA-06 — Reseller app — promotions & daily offers
Daily offers with countdown, promotions list and detail with eligible products.