HOCO B2B
Team tasksAnis

DSH-03 — Back-office CRM pages

Resellers list and map, reseller 360°, create/edit with duplicate check, validation queue, follow-ups, segments.

FieldDetails
Task codeDSH-03
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartTue 10 Nov 2026
DueWed 11 Nov 2026
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort1.5 person-day(s) planned · 7 from scratch · size S
Area · appBack-office · dashboard
Depends onDSH-01, SRV-14, DES-16
Unblocks—
Milestones—

Summary

Resellers list and map, reseller 360°, create/edit with duplicate check, validation queue, follow-ups, segments.

Description

The commercial team works its reseller base from these pages (cahier §4.1, §4.2; CRM-01, CRM-03…CRM-12, AUTH-11), on top of the CRM module (SRV-14) and Akram's CRM designs (DES-16). It delivers the resellers and prospects list (BO-09) and map (BO-10), the reseller 360° page (BO-11), create/edit with live duplicate check (BO-12), the account validation queue where the declared customer type is reviewed (BO-13), follow-ups and tasks (BO-14) and segments (BO-15). Changing a reseller's customer type is only possible here, behind crm.validate, with a reason and an audit entry (AUTH-11). Out of scope: delegate and tour pages (DSH-08), finance details beyond the 360° summary (DSH-07).

Subtasks

#SubtaskOwner
1BO-09 list: columns REV number, store, owner, phone, wilaya/commune, ResellerStatus pill, customer type, delegate, segment, potential, last order, source; filters status, zone, wilaya, commune, delegate, segment, potential, customer type, activity; bulk assign and status; exportAnis
2BO-10 map: clustered markers coloured by status, same filters as the list, side drawer with summary and link to 360°Anis
3BO-11 reseller 360°: header (statuses, customer type, delegate, credit summary if finance.view) and tabs Commandes, Factures et paiements, Visites et rapports, Tâches, Historique, Documents et photos, Retours et SAVAnis
4BO-12 create/edit form: phone with checkPhone on blur showing the existing record, wilaya/commune pickers, map pin, business type, potential, customer type, delegateAnis
5BO-13 validation queue: pending accounts with documents and photos viewer, declared customer type with « Modifier le type » (reason, audited), « Valider » / « Refuser » with reasonAnis
6BO-14 follow-ups: task list grouped by due date (overdue, today, upcoming), assignee filter, create/complete, link to resellerAnis
7BO-15 segments: rule builder (potential, business type, brands sold, activity), live member count, members tableAnis
8Notes and interaction entry from the 360° timeline (admin.resellers.notes.add)Anis
9Permission gating crm.view/create/update/validate/export on every actionAnis

Deliverables

  • apps/dashboard/src/app/[locale]/(app)/crm/resellers/{page.tsx,map/page.tsx,new/page.tsx,[resellerId]/page.tsx,[resellerId]/edit/page.tsx}
  • apps/dashboard/src/app/[locale]/(app)/crm/{validation,tasks,segments}/page.tsx
  • apps/dashboard/src/features/crm/ (queries, columns, forms, timeline)

Acceptance criteria

  • Typing an existing phone in the create form shows the existing reseller and blocks creation (CRM-03)
  • The list and the map return the same resellers for the same filters, and the export contains exactly the filtered rows (CRM-11)
  • Approving or refusing an account from BO-13 updates the queue live and refusal requires a reason (CRM-09)
  • Changing a customer type requires crm.validate and a reason, and appears in the activity log with old and new values (AUTH-11)
  • The 360° page shows orders, invoices, payments, visits, reports, tasks and interactions of the reseller (CRM-12)
  • Users without crm.update see the forms read-only

Requirements covered

RequirementTitleRelease
CRM-01Reseller/prospect record with the minimum data set (store, owner, phone, WhatsApp, email, wilaya, commune, address, GPS, type, potential, delegate, photos, documents, status)V1
CRM-03Duplicate prevention: the main phone number is unique (normalised); duplicate check on every creation pathV1
CRM-04Reseller lifecycle (10 statuses) with automatic and manual transitions and full historyV1
CRM-05Assignment to a delegate and a zone; link to the creating delegate; reassignment historyV1
CRM-06Segmentation by potential, business type, brands sold, level and activityV1
CRM-07Unified interaction history: calls, visits, notes, orders, payments, claimsV1
CRM-08Follow-ups (relances), tasks and next actions with due dates and notificationsV1
CRM-09Account validation by an authorised user (approve / reject with reason)V1
CRM-10Store photos and documents (façade, interior, RC, NIF, ID) with protected accessV1
CRM-11CRM list and map views with filters (status, zone, wilaya, commune, delegate, segment, potential, activity) and exportV1
CRM-12Reseller 360° page: orders, invoices, payments, visits, reports, tasks, interactionsV1
AUTH-11Customer type declared at sign-up, reviewed at account validation; any later change is made by the back-office and auditedV1

Screens

ScreenNameApp
BO-09Resellers & prospects listBO
BO-10Resellers mapBO
BO-11Reseller 360°BO
BO-12Reseller create / editBO
BO-13Account validation queueBO
BO-14Follow-ups & tasksBO
BO-15SegmentsBO

API surface

Endpoint groupOperations
CRM21

Test measures

  • Playwright e2e: create a prospect, hit the duplicate check, validate a pending account
  • Component tests for the segment rule builder
  • Design QA pass with Akram on BO-09 to BO-15

Risks

  • Map performance with thousands of resellers — server-side clustering via admin.resellers.map bounding-box queries

KPI

  • Delivered by Wed 11 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.

On this page