HOCO B2B
Team tasksImad

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.

FieldDetails
Task codeMRA-05
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartSun 15 Nov 2026
DueTue 17 Nov 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort1.5 person-day(s) planned · 5 from scratch · size S
Area · appReseller app · mobile
Depends onDES-09
UnblocksMRA-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

#SubtaskOwner
1OrdersScreen 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 trackerImad
2OrdersRepository 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
3OrderDetailScreen RA-22 on GET /orders/{orderId}: lines, totals, payment method, address, delivery mode and status, channel badge (« Commande assistée »…)Imad
4StatusTimeline: every StatusChange and OrderChange with date, actor and reason (e.g. quantity changed by HOCO) (ORD-06)Imad
5Documents: GET /orders/{orderId}/documents/{type} for the invoice and delivery note → signed URL → in-app PDF viewer with share/download (ORD-12)Imad
6Cancel 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
7Reorder (POST /orders/{orderId}/reorder) → cart with a summary of lines skipped as unavailableImad
8Support 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-10Imad
9AssistedOrderConfirmationScreen 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 handledImad
10Entry points to RA-23 from the push « Votre délégué a préparé une commande », the inbox and a banner on the orders listImad

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

RequirementTitleRelease
ORD-06Every modification and status change is historised, dated and notifiedV1
ORD-07Reseller order tracking: counters by status, filters, progress, details, invoice download, support, reorderV1
ORD-08Assisted orders prepared by a delegate, confirmed by the reseller or validated by the administrationV1
ORD-10Cancellation rules by actor and status, with stock releaseV1
ORD-12Order documents: invoice and delivery note PDFsV1
ORD-15Order status changes reach the reseller in real time (live update in the app and web) and as a notificationV1

Screens

ScreenNameApp
RA-21OrdersRA
RA-22Order detail & trackingRA
RA-23Assisted order confirmationRA

API surface

Endpoint groupOperations
Reseller orders11

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.

On this page