DSH-11 — Back-office reports & export centre
Reports library with filters and totals, export requests and download centre.
| Field | Details |
|---|---|
| Task code | DSH-11 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Wed 25 Nov 2026 |
| Due | Wed 25 Nov 2026 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 0.5 person-day(s) planned · 3 from scratch · size XS |
| Area · app | Back-office · dashboard |
| Depends on | SRV-25, DSH-01 |
| Unblocks | — |
| Milestones | — |
Summary
Reports library with filters and totals, export requests and download centre.
Description
Managers need the essential reports of the cahier (§4, §9; ANA-03…ANA-05) with filters, totals and exports. On top of SRV-25, this task delivers the reports library (BO-59) — reports grouped by domain (ventes, terrain, stock, commandes), a parameter form generated from each report's schema, a results table with totals and an optional chart — and the export centre (BO-60) listing the user's export jobs with status, format, size, expiry and download. Out of scope: report definitions and computation (SRV-25).
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | BO-59 library page: report cards grouped by domain with description and required permission | Anis |
| 2 | Parameter form generated from the report parameter schema (period, wilaya, delegate, brand, category, reseller) | Anis |
| 3 | Results view: DataTable with totals row, optional chart, column chooser | Anis |
| 4 | Export buttons PDF / Excel / CSV creating export jobs, with toast linking to the centre | Anis |
| 5 | BO-60 export centre: JobStatus pill, format, created, size, expiry, download (signed URL), retry for FAILED | Anis |
| 6 | Live job status updates (polling or SSE event export.completed) | Anis |
Deliverables
- apps/dashboard/src/app/[locale]/(app)/reports/{page.tsx,[reportKey]/page.tsx,exports/page.tsx}
- apps/dashboard/src/features/reports/ (schema form, results table)
Acceptance criteria
- Every report of the SRV-25 catalogue can be run with its filters and shows totals equal to the sum of rows (ANA-03)
- An export request appears in the export centre and becomes downloadable when SUCCEEDED (ANA-05)
- Expired exports show as Expiré without a download link
- Users only see reports their permissions allow
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| ANA-03 | Essential reports: revenue by period/zone/delegate/reseller/brand/product, conversion and first orders, stock-outs and slow movers, pending/late/cancelled/returned orders | V1 |
| ANA-04 | Success KPIs tracked: adoption, field conversion, digitalisation share, tour performance, loyalty, operational quality | V1 |
| ANA-05 | PDF and Excel/CSV exports of authorised lists and reports | V1 |
Screens
API surface
| Endpoint group | Operations |
|---|---|
| Reports & exports | 5 |
Test measures
- Playwright e2e: run the revenue-by-wilaya report, export XLSX, download
- Component test of the schema-driven parameter form
KPI
- Delivered by Wed 25 Nov 2026 within 0.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.