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.
| Field | Details |
|---|---|
| Task code | DSH-08 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Tue 17 Nov 2026 |
| Due | Thu 19 Nov 2026 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 2 person-day(s) planned · 9 from scratch · size M |
| Area · app | Back-office · dashboard |
| Depends on | DSH-01, SRV-21, SRV-26, DES-19 |
| Unblocks | — |
| Milestones | — |
Summary
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.
Description
Field supervision is a main expectation of the cahier (§4.5, §6; FLD-01…FLD-04, FLD-08…FLD-10, FLD-12…FLD-14, FLD-16, FLD-17, GEO-02): managers configure delegates, zones, objectives and tours, then follow tours live. On top of SRV-21 and SRV-26 and Akram's designs (DES-19), this task delivers the field dashboard with live map (BO-06), delegates list, detail with performance and create/edit (BO-16…BO-18), zones with a map editor (BO-19), objectives (BO-20), the tour planner calendar (BO-21) and editor with stop ordering and recommendation (BO-22), the live tour detail with trail and check-ins (BO-23), visits list and detail (BO-24, BO-25) and visit types with checklist templates (BO-26). Out of scope: CRM pages (DSH-03) and route optimisation (V2).
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | Map component (library chosen in PRJ-03) with markers, clusters, polylines and zone overlays, reused across BO-06, BO-19, BO-22, BO-23 | Anis |
| 2 | BO-06 field dashboard: delegates on tour, live positions from the admin SSE stream, visits done/planned, check-ins feed, conversion KPIs | Anis |
| 3 | BO-16 delegates list, BO-17 detail and performance (objectives progress, conversion, tours history), BO-18 create/edit with account and zone assignment | Anis |
| 4 | BO-19 zones: list and map editor selecting wilayas and communes, overlap warning, assigned delegates | Anis |
| 5 | BO-20 objectives grid per delegate × period × metric with progress bars | Anis |
| 6 | BO-21 tour planner calendar (week and month views per delegate, drag to reschedule, status colours from TourStatus) | Anis |
| 7 | BO-22 tour editor: reseller search in the delegate's scope, stop list drag order, priority, time slot, ordering mode, « Ordre recommandé » button, map preview | Anis |
| 8 | BO-23 live tour detail: trail from pings, check-in markers with distance and tolerance flag, visit statuses live, suspend reasons, cancel/reopen actions | Anis |
| 9 | BO-24 visits list with filters (delegate, status, type, date, not-done reason) and BO-25 visit detail (checklist, photos, report, GPS, unlock) | Anis |
| 10 | BO-26 visit types and checklist templates editor (items, mandatory photos) | Anis |
| 11 | Design QA of BO-06 and BO-16 to BO-26 | Akram |
Deliverables
- apps/dashboard/src/app/[locale]/(app)/field/{page.tsx,delegates/…,zones/…,objectives/page.tsx,tours/…,visits/…,visit-types/page.tsx}
- apps/dashboard/src/features/field/ (map, planner calendar, tour editor, live tour)
- packages/ui/src/map/
Acceptance criteria
- A delegate check-in appears on BO-06 and BO-23 within 2 seconds (FLD-13)
- The tour editor shows the same visits in the same order as the delegate app receives (FLD-06, FLD-03)
- « Ordre recommandé » reorders stops by nearest neighbour and the result can still be edited when the mode is IMPOSED (FLD-17)
- Visit detail shows the check-in distance and flags out-of-tolerance check-ins (FLD-08)
- Zones can be built by selecting wilayas and communes on the map and are assigned to delegates (GEO-02, FLD-01)
- Checklist templates and mandatory photos per visit type are configurable (FLD-16)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| FLD-01 | Delegate accounts and profiles; assignment of wilayas, communes and points of sale | V1 |
| FLD-02 | Objectives per delegate and period: visits, sign-ups, app installs, orders, revenue | V1 |
| FLD-03 | Tour planning: daily, weekly or monthly; ordered stops (imposed or recommended); priorities and time slots | V1 |
| FLD-04 | Tour lifecycle (planned, to start, in progress, suspended, completed, cancelled); only the assigned delegate starts it | V1 |
| FLD-08 | Visit and check-in: time and position at check-in, duration, checklist, note, photos (mandatory by visit type), call; finished visit locked | V1 |
| FLD-09 | A visit not carried out requires a reason | V1 |
| FLD-10 | Structured visit report (person met, interest, products and promotions presented, issues, next action, follow-up date, attachments) that triggers the follow-up | V1 |
| FLD-12 | Tour closing: day summary, comment, objectives and conversion, final report; requires reasons and synced data; definitive unless reopened | V1 |
| FLD-13 | Live follow-up in the back-office: delegates on tour, positions, visit progress | V1 |
| FLD-14 | Back-office analysis of visit reports and validation of new points of sale | V1 |
| FLD-16 | Visit types and checklist templates configuration | V1 |
| FLD-17 | Recommended visit order (nearest-neighbour heuristic) | V1 |
| GEO-02 | Zones grouping wilayas and communes, assigned to delegates | V1 |
Screens
| Screen | Name | App |
|---|---|---|
| BO-06 | Field dashboard & live map | BO |
| BO-16 | Delegates list | BO |
| BO-17 | Delegate detail & performance | BO |
| BO-18 | Delegate create / edit | BO |
| BO-19 | Zones (list + map editor) | BO |
| BO-20 | Objectives | BO |
| BO-21 | Tour planner (calendar) | BO |
| BO-22 | Tour editor (stops, order, recommendation) | BO |
| BO-23 | Tour live detail | BO |
| BO-24 | Visits list | BO |
| BO-25 | Visit detail | BO |
| BO-26 | Visit types & checklist templates | BO |
API surface
| Endpoint group | Operations |
|---|---|
| Field operations | 20 |
| Real-time events (SSE) | 1 |
Test measures
- Playwright e2e: plan a tour, recommend order, publish; follow it live while the delegate app runs the tour on staging
- Component tests for the planner calendar drag-and-drop
- Performance check: live map with 50 delegates moving
Risks
- Map provider cost or quota — choose the provider in PRJ-03 and cache tiles; markers update by SSE without refetching the map
- L-sized task with many screens — build the map component and BO-22/BO-23 first, configuration pages after
KPI
- Delivered by Thu 19 Nov 2026 within 2 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-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.
DSH-13 — Back-office returns & after-sales pages
Returns queue and detail (approve, reject, receive with automatic restock, credit note) and the after-sales claims workflow (diagnosis, resolution) linked to orders.