DSH-06 — Back-office orders & delivery pages
Orders list with status tabs, the 'orders to confirm' queue (every order is confirmed by hand), order detail with controls, confirmation, refusal, modification and history, order on behalf, delivery board, carriers.
| Field | Details |
|---|---|
| Task code | DSH-06 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Mon 16 Nov 2026 |
| Due | Tue 17 Nov 2026 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 1.5 person-day(s) planned · 7 from scratch · size S |
| Area · app | Back-office · dashboard |
| Depends on | DSH-01, SRV-17, DES-18 |
| Unblocks | DSH-13 |
| Milestones | — |
Summary
Orders list with status tabs, the 'orders to confirm' queue (every order is confirmed by hand), order detail with controls, confirmation, refusal, modification and history, order on behalf, delivery board, carriers.
Description
Because no order is confirmed automatically (decision 2, ORD-14), the back-office order pages are where every order is checked and confirmed (cahier §4.4; ORD-04…ORD-06, ORD-08, ORD-10…ORD-12, DLV-01…DLV-04, STK-08), on top of SRV-16/SRV-17 and Akram's designs (DES-18). It delivers the orders list with status tabs (BO-38), the Commandes à confirmer queue for new, on-hold and assisted orders with control results and live updates (BO-41), the order detail with controls, confirmation, refusal, controlled modification, cancellation, documents and history (BO-39), the order on behalf of a reseller for phone orders (BO-40), the delivery board (BO-42) and carriers (BO-43). Out of scope: returns and after-sales pages (DSH-13) and invoices/payments (DSH-07).
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | BO-38 list: status tabs with counts (11 OrderStatus values), columns CMD number, date, reseller, customer type, channel, wilaya, total TTC, payment method, status, delegate, first-order flag; filters and export | Anis |
| 2 | BO-41 « Commandes à confirmer »: oldest first, age badge, control badges (stock, credit, minimum, reseller status), quick « Confirmer » / « Refuser », live insertion from the admin SSE stream | Anis |
| 3 | BO-39 detail: lines with customer-type price, promotions and totals HT/VAT/TTC, controls panel, actions per allowed transition, history timeline (status changes and modifications), documents, delivery panel, linked returns and claims | Anis |
| 4 | Confirmation flow with stock override dialog (permission, reason) and refusal dialog with ORDER_REFUSAL_REASON list | Anis |
| 5 | Controlled modification editor (add/remove lines, quantities, price with permission) with diff preview and re-run controls | Anis |
| 6 | Cancellation with ORDER_CANCEL_REASON and assisted-order confirmation on behalf of a reseller without the app | Anis |
| 7 | BO-40 order on behalf: reseller picker, product search showing that reseller's prices and availability, line editor, address, payment method, note, submit then confirm | Anis |
| 8 | BO-42 delivery board: columns per DeliveryStatus, picking list print, carrier and tracking assignment, proof upload, failed-delivery reason | Anis |
| 9 | BO-43 carriers list and form (mode, API-capable flag, tracking URL template, active) | Anis |
| 10 | Design QA of BO-38 to BO-43 | Akram |
Deliverables
- apps/dashboard/src/app/[locale]/(app)/orders/{page.tsx,to-confirm/page.tsx,new/page.tsx,[orderId]/page.tsx}
- apps/dashboard/src/app/[locale]/(app)/delivery/{page.tsx,carriers/page.tsx}
- apps/dashboard/src/features/orders/ (controls panel, transition actions, modification editor, history timeline)
Acceptance criteria
- A new reseller order appears in BO-41 within 2 seconds without reload and stays there until confirmed or refused (ORD-14)
- Only actions allowed by the transition table and the user's permissions are shown; a forbidden attempt shows the ORDER_TRANSITION_NOT_ALLOWED or PERMISSION_DENIED message (ORD-04)
- Confirming beyond available stock is possible only through the override dialog with a reason, recorded in history (STK-08)
- A modification shows the before/after diff and appears in the history with user and time (ORD-05, ORD-06)
- An order entered on behalf of a reseller uses that reseller's customer-type prices and lands in the confirmation queue (ORD-11)
- Invoice and delivery note PDFs open from the detail page (ORD-12)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| ORD-04 | Order lifecycle (11 statuses) with an explicit transition table and actors; no order is ever confirmed automatically | V1 |
| ORD-05 | Back-office processing: automatic controls, validation, controlled modification, refusal with reason | V1 |
| ORD-06 | Every modification and status change is historised, dated and notified | 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-11 | Back-office order entry on behalf of a reseller (phone orders) | V1 |
| ORD-12 | Order documents: invoice and delivery note PDFs | V1 |
| DLV-01 | Preparation workflow (picking list) up to 'ready' | V1 |
| DLV-02 | Shipping: carrier assignment (own fleet or company), tracking number | V1 |
| DLV-03 | Delivery confirmation with proof (photo, recipient name) | V1 |
| DLV-04 | Carrier list management (API-capable vs manual) | V1 |
| STK-08 | No order validated beyond available stock unless an authorised override is recorded | V1 |
| ORD-14 | Every order — app, web, assisted or phone — waits for an explicit confirmation by the back-office before preparation | V1 |
Screens
| Screen | Name | App |
|---|---|---|
| BO-38 | Orders list | BO |
| BO-39 | Order detail (controls, actions, history) | BO |
| BO-40 | New order on behalf of a reseller | BO |
| BO-41 | Orders to confirm (new, on hold, assisted) | BO |
| BO-42 | Delivery board | BO |
| BO-43 | Carriers | BO |
API surface
| Endpoint group | Operations |
|---|---|
| Orders & delivery | 21 |
Test measures
- Playwright e2e: reseller web checkout → BO-41 live → confirm → preparation → shipped → delivered with proof
- Component tests for the controls panel and transition action rendering per status
- Manual phone-order scenario run with HOCO's commercial admin during QA-01
Risks
- Queue overload in peak hours — counters, sorting by age and keyboard shortcuts for confirm/refuse; monitor queue age in the pilot
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.
DSH-05 — Back-office stock pages
Stock overview and alerts, movements journal, receipts and adjustments, inventory sessions, warehouses, stock dashboard.
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.