HOCO B2B
Team tasksImad

MDA-04 — Delegate app — point-of-sale sheet & prospects list

POS sheet (contact actions, history, tasks, photos) and the prospects/resellers list with search, status filters and distance sort, list/map toggle.

FieldDetails
Task codeMDA-04
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartTue 1 Dec 2026
DueWed 2 Dec 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort1.25 person-day(s) planned · 4 from scratch · size S
Area · appDelegate app · mobile
Depends onDES-13
Unblocks—
Milestones—

Summary

POS sheet (contact actions, history, tasks, photos) and the prospects/resellers list with search, status filters and distance sort, list/map toggle.

Description

Before and during a visit the delegate needs everything about a point of sale on one screen, and between visits a list of prospects and resellers in their zone they can search, filter and sort by distance (CRM-01, CRM-04, CRM-07). Scope: point-of-sale sheet DA-09 (details, status, contact actions, interaction history, open tasks, photos, recent visits and orders summary, notes and call logs) and prospects & resellers list DA-13 with search, status filters, distance sort and a list/map toggle. Data is scoped to the delegate's zones and assigned resellers (ACL-03) and cached in hoco_offline so the sheet opens offline; notes and call logs are client-id outbox mutations. It needs delegate.resellers.list|get|addNote (SRV-14) and Akram's DES-12/DES-13 frames. The sheet is the hub that opens MDA-07 (edit), MDA-08 (invite), MDA-09 (first order) and MDA-06 (follow-ups).

Subtasks

#SubtaskOwner
1PointOfSaleSheet DA-09 on GET /delegate/resellers/{id} with drift fallback: store, owner, REV number, ResellerStatus pill, address, GPS, potential, assigned delegateImad
2Contact actions: « Appeler » (tel:), « WhatsApp » (wa.me), « SMS », « Itinéraire » (ExternalNavigation)Imad
3InteractionTimeline (CRM-07): visits, calls, notes, orders, payments, claims and status changes with InteractionType icons; orders summary without purchase pricesImad
4Quick note and call log → delegate.resellers.addNote (types NOTE / CALL) with client UUIDv7 and occurredAt through the outboxImad
5Open tasks and photos sections (PrivateImage gallery) linking to DA-19 and MDA-07Imad
6Action bar: « Modifier », « Inviter », « Aide à la 1ère commande », « Ajouter à la tournée » (unplanned visit)Imad
7ProspectsScreen DA-13: GET /delegate/resellers online (search, status filter, cursor) and local drift search offline; status chips for the 10 ResellerStatus values (« Nouveau prospect », « À contacter », « Intéressé »…)Imad
8Distance sort from the current fix (local haversine) and list/map toggle with clustered markers coloured by statusImad
9Out-of-scope handling: 404 / OUT_OF_SCOPE records removed from the local cache with « Ce point de vente n'est plus dans votre zone »Imad

Deliverables

  • apps/delegate/lib/src/features/resellers/ (POS sheet, prospects list, map view)
  • Outbox mutation type delegate.resellers.addNote
  • Drift DAO queries for local search and distance sort

Acceptance criteria

  • The sheet opens offline for any reseller in the delegate's cached scope with its last known history (SYN-04)
  • Only resellers of the delegate's zones and assignments are listed; nothing else is reachable by search (ACL-03)
  • Status filters and distance sort combine and return within 1 s on 2 000 local records
  • A note added offline appears at the top of the timeline at once and on the back-office after sync (CRM-07)
  • List and map toggle show the same filtered set

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-04Reseller lifecycle (10 statuses) with automatic and manual transitions and full historyV1
CRM-07Unified interaction history: calls, visits, notes, orders, payments, claimsV1
ACL-03Data scope: delegates see only their zones, tours, assigned resellers and own performance; resellers only their own dataV1

Screens

ScreenNameApp
DA-09Point-of-sale sheetDA
DA-13Prospects & resellers (list / map)DA

API surface

Test measures

  • Unit tests of local search and distance sort on a seeded drift database of 2 000 resellers
  • Widget tests of the timeline per InteractionType and of status chips
  • Integration test: offline note → reconnect → server timeline contains it once

Risks

  • Large zones make the cached scope heavy — sync only assigned resellers plus prospects of the delegate's communes, with paging in sync.delta

KPI

  • Delivered by Wed 2 Dec 2026 within 1.25 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