HOCO B2B
Team tasksAnis

WEB-04 — Reseller web — orders & finance

Orders list and detail with live tracking (SSE), assisted-order confirmation, returns, documents; invoices, payments, declarations and credit.

FieldDetails
Task codeWEB-04
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartTue 1 Dec 2026
DueWed 2 Dec 2026
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort0.75 person-day(s) planned · 4 from scratch · size S
Area · appReseller web · web
Depends onWEB-03
UnblocksWEB-05
Milestones—

Summary

Orders list and detail with live tracking (SSE), assisted-order confirmation, returns, documents; invoices, payments, declarations and credit.

Description

Resellers follow their orders and finances on the web with the same live status as in the app (cahier §5.4, §4.7; ORD-06…ORD-08, ORD-13, ORD-15, FIN-01, FIN-03, FIN-10). This task delivers the orders list with counters and filters (RW-08), the order detail with a live status timeline over SSE (events.stream), cancellation while allowed, reorder, invoice and delivery-note downloads, assisted-order confirmation or rejection before expiry, and the V1 return flow — request a return on a delivered order (lines, quantities, reason, photos, within the window) and follow its status (RW-09); and the finance pages (RW-13): balance and available credit, invoices with PDFs, payments, and payment declarations with proof upload. Out of scope: after-sales claims and support (WEB-05).

Subtasks

#SubtaskOwner
1RW-08 orders list: counters by status (orders.summary), status filter, search by number, cursor paginationAnis
2SSE client for events.stream (EventSource with credentials, Last-Event-ID, backoff, refetch on reconnect, pause when the tab is hidden)Anis
3RW-09 order detail: lines, totals, status timeline updated live, delivery info and tracking, documents (invoice, BL)Anis
4Actions: « Annuler » while SUBMITTED/PENDING with reason, « Commander à nouveau » (reorder into cart)Anis
5Assisted order panel: delegate, lines, expiry countdown, « Confirmer » / « Refuser » with reasonAnis
6Return request form on delivered orders: lines and quantities, reason, photos upload, window check; return status tracking with ReturnStatus pills and credit note linkAnis
7RW-13 finance: summary (balance, available credit), invoices list/detail with PDF, payments listAnis
8Payment declaration form: method, amount, reference, date, proof upload (PAYMENT_PROOF), status À vérifierAnis
9Design QA of RW-08, RW-09 and RW-13Akram

Deliverables

  • apps/web/src/app/[locale]/(account)/orders/{page.tsx,[orderId]/page.tsx,[orderId]/return/page.tsx}
  • apps/web/src/app/[locale]/(account)/finance/{page.tsx,invoices/…,payments/…}
  • apps/web/src/lib/events.ts (SSE client hook)

Acceptance criteria

  • When the back-office confirms an order, the open order page shows Validée within 2 seconds without reload (ORD-15)
  • Cancel is offered only while the order is SUBMITTED or PENDING (ORD-10)
  • An assisted order can be confirmed or refused until it expires; after expiry the panel shows Expirée (ORD-08)
  • A return can be requested only on delivered orders within the window and for remaining quantities; its status updates live (ORD-13)
  • A payment declaration with proof appears as À vérifier and later as Confirmé or Rejeté (FIN-03)
  • Invoice PDFs download through signed links (FIN-01)

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
FIN-01Invoices generated from orders with legal mentions and PDF; statuses unpaid, partially paid, paid, overdue, cancelledV1
FIN-03Payment recording in the back-office and payment declaration with proof by the resellerV1
FIN-10Reseller finance view: balance, available credit, invoices, paymentsV1
ORD-13Returns: request on a delivered order, back-office approval, reception; returned quantities re-enter stock automaticallyV1
ORD-15Order status changes reach the reseller in real time (live update in the app and web) and as a notificationV1

Screens

ScreenNameApp
RW-08Orders listRW
RW-09Order detail, tracking & assisted-order confirmationRW
RW-13Invoices, payments & creditRW

API surface

Endpoint groupOperations
Reseller orders11
Reseller finance6

Test measures

  • Playwright e2e: order → back-office confirm → live update in the web page
  • Playwright e2e: delivered order → return request with photo → back-office reception → credit note visible
  • Network-drop test of the SSE client (offline 1 min, then resume)

Risks

  • Corporate proxies or browser extensions break SSE — fall back to polling the order every 30 s when the stream fails repeatedly

KPI

  • Delivered by Wed 2 Dec 2026 within 0.75 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