HOCO B2B
Team tasksImad

MDA-02 — Delegate app — tour programme & calendar

Tour programme with tabs, mini-map with the same order as the list, start/suspend/resume, reorder when allowed, add an unplanned visit, calendar and history.

FieldDetails
Task codeMDA-02
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartSun 29 Nov 2026
DueMon 30 Nov 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort1.5 person-day(s) planned · 5 from scratch · size S
Area · appDelegate app · mobile
Depends onDES-12
Unblocks—
Milestones—

Summary

Tour programme with tabs, mini-map with the same order as the list, start/suspend/resume, reorder when allowed, add an unplanned visit, calendar and history.

Description

The tour programme is the delegate's working list: list and map must show the same visits in the same order (FLD-06), and the tour lifecycle (start, suspend, resume) must work offline (FLD-04, SYN-04). Scope: tour programme DA-06 with tabs, ordered visit list, mini-map with numbered markers, start/suspend/resume, reorder when the tour's order is « recommandé », adding an unplanned visit, and the tours calendar and history DA-07. All mutations go through the MOB-09 outbox with occurredAt; starting the tour also starts MDA-12 sampling. It needs delegate.tours.* (SRV-21) and the TOUR_SUSPEND_REASON list, plus Akram's DES-12 frames. MDA-03 opens the map from here and MDA-05 opens each visit.

Subtasks

#SubtaskOwner
1TourProgrammeScreen DA-06 reading the drift tours/visits snapshot from GET /delegate/tours/today; tabs « À visiter », « Visités », « Non réalisées »; filters priority (« Prioritaire ») and late (« En retard », derived from the time slot in Africa/Algiers)Imad
2VisitCard rows: order number, store, commune, time slot, VisitStatus pill, distance from the current fixImad
3Mini-map (hoco_maps) with numbered markers in the list order; tapping a marker scrolls to its row and vice versa (FLD-06)Imad
4Tour actions through the outbox: delegate.tours.start (position + occurredAt; TOUR_NOT_TODAY, TOUR_ALREADY_IN_PROGRESS), suspend with a TOUR_SUSPEND_REASON (blocked by VISIT_IN_PROGRESS), resumeImad
5Drag-and-drop reorder of remaining visits when orderingMode is RECOMMENDED → PUT /delegate/tours/{id}/visit-order; « Ordre imposé » lock when IMPOSED (TOUR_ORDER_IMPOSED)Imad
6Add unplanned visit: pick a point of sale from the local resellers table or a newly created prospect → delegate.tours.addVisit with a client UUIDv7, offlineImad
7ToursCalendarScreen DA-07: GET /delegate/tours for a week or month (calendar view), status pills, past tour detail (delegate.tours.get) read-only with its reportImad
8Hooks to start MDA-12 sampling on IN_PROGRESS and stop it on SUSPENDED or COMPLETEDImad

Deliverables

  • apps/delegate/lib/src/features/tour/ (programme, calendar, history)
  • Outbox mutation types delegate.tours.start, delegate.tours.suspend, delegate.tours.resume, delegate.tours.reorder, delegate.tours.addVisit
  • Widget and integration tests of the tour lifecycle offline

Acceptance criteria

  • List and mini-map always show the same visits in the same order, including after a reorder (FLD-06)
  • Start, suspend and resume work in airplane mode and replay in order with their original times (FLD-04, SYN-04)
  • Reorder is impossible on an imposed tour and allowed on a recommended one
  • An unplanned visit added offline appears immediately and gets its VIS- number after sync
  • Suspension is refused while a visit is checked in or in progress (VISIT_IN_PROGRESS)
  • The calendar shows past tours with their statuses and opens their reports (FLD-19)

Requirements covered

RequirementTitleRelease
FLD-03Tour planning: daily, weekly or monthly; ordered stops (imposed or recommended); priorities and time slotsV1
FLD-04Tour lifecycle (planned, to start, in progress, suspended, completed, cancelled); only the assigned delegate starts itV1
FLD-06Tour programme: list and map show the same visits in the same order; filters, delays, prioritiesV1
FLD-19Delegate reports history and own performance over periodsV1

Screens

ScreenNameApp
DA-06Tour programmeDA
DA-07Tours calendar & historyDA

API surface

Endpoint groupOperations
Tours & visits19

Test measures

  • Widget tests of the tabs, late derivation and reorder lock
  • integration_test: start tour offline → add unplanned visit → reconnect → server state matches
  • Unit test that list order and marker order come from the same provider

Risks

  • Reorder conflicts when the back-office edits stops during the day — server copy wins on delta pull and the delegate is told « La tournée a été modifiée par le bureau »

KPI

  • Delivered by Mon 30 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