HOCO B2B
Team tasksAnis

DSH-02 — Back-office dashboards

General and sales dashboards: KPI cards, charts, filters, role-configurable layout.

FieldDetails
Task codeDSH-02
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartTue 24 Nov 2026
DueWed 25 Nov 2026
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort1 person-day(s) planned · 4 from scratch · size S
Area · appBack-office · dashboard
Depends onSRV-25, DSH-01
Unblocks—
Milestones—

Summary

General and sales dashboards: KPI cards, charts, filters, role-configurable layout.

Description

The cahier opens the back-office on a general dashboard (§4.1; ANA-01, ANA-02): revenue, orders by status, basket, reseller activity, field activity, stock alerts and finance indicators, filterable and adapted to each role. On top of SRV-25, this task delivers the general dashboard (BO-04) and the sales dashboard (BO-05) with KPI cards, charts, the shared filter bar (date presets, wilaya, commune, delegate, brand, category), a role-configurable layout and live refresh after events from the back-office stream. Because every order needs manual confirmation, a Commandes à confirmer card with queue age links to BO-41. Out of scope: field, stock and finance dashboards (BO-06, BO-07, BO-08 in DSH-08, DSH-05, DSH-07) and the reports library (DSH-11).

Subtasks

#SubtaskOwner
1Filter bar with date presets (aujourd'hui, 7 jours, mois en cours, personnalisé), wilaya, commune, delegate, brand, category, synced to the URLAnis
2BO-04 KPI cards: revenue, orders by status, average basket, active/new/inactive resellers, delegates on tour, visits, conversion, stock alerts, expected payments, credit used, unpaid (finance cards gated)Anis
3« Commandes à confirmer » card with count and oldest age, linking to BO-41Anis
4BO-05 sales charts: revenue trend, revenue by brand and category, by wilaya, channel split (app, web, assisted, back-office), top resellers and top productsAnis
5Chart components (Recharts) with HOCO palette, empty and loading states, number formatting in DAAnis
6Role layout editor: drag and drop cards, show/hide, saved per role through admin.dashboard.layout.update (SUPER_ADMIN)Anis
7Live refresh: invalidate KPI queries on relevant admin SSE events (debounced)Anis
8Design QA of BO-04 and BO-05Akram

Deliverables

  • apps/dashboard/src/app/[locale]/(app)/{page.tsx,dashboards/sales/page.tsx}
  • apps/dashboard/src/features/dashboards/ (filter bar, KPI card, charts, layout editor)

Acceptance criteria

  • KPI values equal the SRV-25 API values for the same filters (ANA-01)
  • Changing a filter updates every card and chart and survives a page reload (ANA-02)
  • A role without finance.view sees no finance cards (ANA-02, ACL-04)
  • A new order increments the « Commandes à confirmer » card without reload
  • A layout saved for the DIRECTION role is the one their users see on next load

Requirements covered

RequirementTitleRelease
ANA-01General dashboard: revenue, orders by status, average basket, active/new/inactive resellers, delegates on tour, visits, conversion, best sellers, stock alerts, expected payments, credit used, unpaidV1
ANA-02Dashboard filters (date, wilaya, commune, delegate, brand, category), role-configurable cards, permission-aware, refreshed after eventsV1

Screens

ScreenNameApp
BO-04General dashboardBO
BO-05Sales dashboardBO

API surface

Endpoint groupOperations
Dashboards & KPIs4

Test measures

  • Playwright e2e: dashboard with filters on seeded data, compare to fixtures
  • Component tests for KPI card formatting (DA, percentages)

KPI

  • Delivered by Wed 25 Nov 2026 within 1 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