HOCO B2B
Team tasksImad

MDA-09 — Delegate app — first-order assistance & orders

4-step assisted order reusing the catalog/cart widgets, send for confirmation, status of assisted orders, read-only orders of my resellers.

FieldDetails
Task codeMDA-09
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartWed 9 Dec 2026
DueThu 10 Dec 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort1.25 person-day(s) planned · 4 from scratch · size S
Area · appDelegate app · mobile
Depends onDES-14, MRA-04
Unblocks—
Milestones—

Summary

4-step assisted order reusing the catalog/cart widgets, send for confirmation, status of assisted orders, read-only orders of my resellers.

Description

Delegates help a prospect place their first order on the spot; the order must follow the same pricing and controls as a reseller order and then be confirmed by the reseller in the app or validated by the administration (ORD-02, ORD-08), and first orders are attributed to the delegate (ORD-09). Scope: first-order assistance DA-17 in four steps (reseller, products, delivery and payment, review and send) reusing the hoco_catalog grid, filters, cart lines, issues and totals from MRA-02/MRA-04, plus DA-18 with assisted orders and their confirmation status and the read-only orders of the delegate's resellers. Drafts live on the server (delegate.assisted.create|update|submit|discard), so this flow needs a connection; the selection is kept locally if the network drops. Even after the reseller confirms, the order waits for back-office confirmation (ORD-14). It needs SRV-16 assisted orders, catalog prices for the selected reseller's customer type, and Akram's DES-14 frames.

Subtasks

#SubtaskOwner
1Step 1 — reseller: pick from the delegate's scope (or come from the POS sheet); account status shown (pending accounts produce a PENDING order for RESELLER_NOT_VALIDATED); ASSISTED_ORDER_ALREADY_PENDING handledImad
2POST /delegate/assisted-orders to open a priced draft for that reseller; draft id kept locally to resume after interruptionImad
3Step 2 — products: hoco_catalog ProductGrid, search, scanner and FilterSheet with the selected reseller's customer-type prices; add/update lines with PATCH /delegate/assisted-orders/{id} returning re-priced totals and issuesImad
4Step 3 — address, payment method and note from the reseller's options; IssueBanner and TotalsBlock reused (ORDER_MIN_AMOUNT_NOT_MET, STOCK_INSUFFICIENT, QUANTITY_NOT_ALLOWED)Imad
5Step 4 — review and send: « Envoyer au revendeur pour confirmation » (confirmation in the reseller app within 72 h) or « Faire valider par l'administration » with a mandatory note on how the reseller agreed → POST /delegate/assisted-orders/{id}/submit with an Idempotency-KeyImad
6Discard draft (DELETE /delegate/assisted-orders/{id}) and resume-draft banner on the POS sheetImad
7Connectivity guard: steps disabled offline with « Connexion requise pour préparer la commande », local selection preservedImad
8AssistedOrdersScreen DA-18: AssistedConfirmation pills (« En attente du revendeur », « Confirmée par le revendeur », « Validée par l'administration », « Refusée par le revendeur », « Expirée »), « 1ère commande » badge, then OrderStatus once confirmedImad
9Orders of my resellers (GET /delegate/orders, GET /delegate/orders/{id}) read-only, no purchase prices, filters by status and resellerImad

Deliverables

  • apps/delegate/lib/src/features/assisted_order/ (DA-17 stepper)
  • apps/delegate/lib/src/features/orders/ (DA-18)
  • hoco_catalog host adapter mapping add-to-cart to assisted-order draft updates

Acceptance criteria

  • Prices in the assisted order are the selected reseller's customer-type prices and match what the reseller sees when confirming (PRC-05, ORD-08)
  • The same cart rules as the reseller app block submission (minimum amount, quantities, stock) (ORD-02)
  • After « Envoyer au revendeur », the reseller receives the confirmation request and the order shows « En attente du revendeur » in DA-18; expiry after 72 h shows « Expirée »
  • A confirmed assisted order appears as « Envoyée », awaiting back-office confirmation, never auto-validated (ORD-14)
  • The first order of a reseller is flagged « 1ère commande » and counted for the delegate (ORD-09)
  • Orders of my resellers never show purchase prices and only include resellers in scope (ACL-03)

Requirements covered

RequirementTitleRelease
ORD-02Cart rules: minimum amount, minimum quantities and steps, maximum per order, stock and credit checksV1
ORD-08Assisted orders prepared by a delegate, confirmed by the reseller or validated by the administrationV1
ORD-09First order flagged and attributed to the reseller and the source delegate in reportsV1

Screens

ScreenNameApp
DA-17First-order assistanceDA
DA-18Assisted orders & orders of my resellersDA

API surface

Endpoint groupOperations
Assisted orders6
Catalog & favorites12

Test measures

  • integration_test: POS sheet → assisted order 4 steps → submit → reseller app confirms (two-app flow on staging)
  • Widget tests of each step's validation and of the offline guard
  • Unit tests of the hoco_catalog host adapter (reseller cart vs assisted draft)

Risks

  • Catalog prices for 'another reseller's' customer type need a contract parameter (e.g. resellerId on catalog calls or prices from the draft) — agree it with Anis during SRV-03
  • Shared hoco_catalog widgets drift between apps — keep host-specific behaviour behind the adapter and cover both hosts in widget tests

KPI

  • Delivered by Thu 10 Dec 2026 within 1.25 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