DSH-13 — Back-office returns & after-sales pages
Returns queue and detail (approve, reject, receive with automatic restock, credit note) and the after-sales claims workflow (diagnosis, resolution) linked to orders.
| Field | Details |
|---|---|
| Task code | DSH-13 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Thu 19 Nov 2026 |
| Due | Sun 22 Nov 2026 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 0.75 person-day(s) planned · 4 from scratch · size S |
| Area · app | Back-office · dashboard |
| Depends on | DSH-06, SRV-20 |
| Unblocks | — |
| Milestones | — |
Summary
Returns queue and detail (approve, reject, receive with automatic restock, credit note) and the after-sales claims workflow (diagnosis, resolution) linked to orders.
Description
Returns and after-sales are V1 (decisions 9 and 10; ORD-13, SUP-04, STK-03) and need their own back-office workflow (BO-69, plus the after-sales panel of BO-56) on top of SRV-20. This task delivers the returns queue and detail — approve or reject with a reason, mark in transit, receive with accepted quantities per line, condition and target warehouse so stock re-enters automatically, and see the issued credit note — and the after-sales claims workflow: claims queue, claim detail with the affected order lines, issue and photos, internal diagnosis notes, and the resolution form (AfterSalesResolution: Remplacement, Retour, Avoir, Réparation, Refusée) whose outcome links to the replacement order, the return or the credit note. Order detail (BO-39) links to its returns and claims. Out of scope: the reseller screens (WEB-04/WEB-05, MRA-10).
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | BO-69 tab « Retours »: queue by ReturnStatus with RET number, order, reseller, lines, amount, requested date, age; filters | Anis |
| 2 | Return detail: requested lines with reason and photos, « Accepter » / « Refuser » with reason, « Marquer en retour » (IN_TRANSIT) | Anis |
| 3 | Reception form: received and accepted quantity per line, condition, warehouse (sellable or quarantine), confirmation summary of stock movements | Anis |
| 4 | Credit note panel: amount, lines, PDF link, status REFUNDED | Anis |
| 5 | BO-69 tab « SAV »: AFTER_SALES tickets queue with AfterSalesIssue, order, reseller, age, assignee | Anis |
| 6 | Claim detail (BO-56 extension): order lines and quantities claimed, photos viewer, internal diagnosis notes, replies to the reseller | Anis |
| 7 | Resolution form with dependent fields: replacement lines (creates order link), return (creates approved return link), credit note amount, repair tracking note, rejection reason | Anis |
| 8 | Links from BO-39 order detail and BO-11 reseller 360° to returns and claims; live updates from the admin SSE stream | Anis |
| 9 | Design QA of BO-69 and the after-sales panel | Akram |
Deliverables
- apps/dashboard/src/app/[locale]/(app)/returns/{page.tsx,[returnId]/page.tsx}
- apps/dashboard/src/app/[locale]/(app)/after-sales/{page.tsx,[ticketId]/page.tsx}
- apps/dashboard/src/features/returns/ (reception form, resolution form)
Acceptance criteria
- Receiving a return from BO-69 shows the RETURN movements created and the stock overview reflects them immediately (STK-03, ORD-13)
- Rejecting a return or a claim cannot be submitted without a reason
- A REPLACEMENT resolution shows a link to the new order, which appears in « Commandes à confirmer » (SUP-04, ORD-14)
- The credit note PDF opens from the return detail once received (FIN-08)
- Only users with the orders and support permissions see and act on returns and claims
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| ORD-13 | Returns: request on a delivered order, back-office approval, reception; returned quantities re-enter stock automatically | V1 |
| SUP-04 | After-sales service (SAV): a reseller opens a claim on an order (items, quantities, issue, photos); the back-office handles it from diagnosis to resolution (replacement, return, credit note, rejection) | V1 |
| STK-03 | Reservation and deduction triggered by configurable order statuses; cancellations and returns put quantities back automatically | V1 |
Screens
API surface
| Endpoint group | Operations |
|---|---|
| Orders & delivery | 21 |
| Support & communication | 10 |
Test measures
- Playwright e2e: return request (seeded) → accept → in transit → receive → credit note
- Playwright e2e: after-sales claim → diagnosis note → replacement resolution → order in queue
- Component tests for the reception form quantity rules
KPI
- Delivered by Sun 22 Nov 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.
DSH-08 — Back-office field operations pages
Delegates, zones map editor, objectives, tour planner calendar and editor with recommended order, live tour detail with trail and check-ins, visits, visit types/checklists, field dashboard with live map.
DSH-07 — Back-office finance pages (V1)
Invoices, payments and declaration verification, credit accounts, finance dashboard.