MDA-06 — Delegate app — visit report & follow-ups
Structured report with chips/multi-selects, next action and follow-up date, attachments; follow-ups list with complete/reschedule.
| Field | Details |
|---|---|
| Task code | MDA-06 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Sun 6 Dec 2026 |
| Due | Mon 7 Dec 2026 |
| Responsible | Imad — Mobile developer (Flutter) |
| Co-responsible | — |
| Effort | 1.25 person-day(s) planned · 4 from scratch · size S |
| Area · app | Delegate app · mobile |
| Depends on | DES-13 |
| Unblocks | — |
| Milestones | — |
Summary
Structured report with chips/multi-selects, next action and follow-up date, attachments; follow-ups list with complete/reschedule.
Description
The structured visit report is what turns a visit into a follow-up: person met, interest, products and promotions presented, issues, next action and follow-up date (FLD-10), and the next action becomes a task the delegate must act on (CRM-08). Scope: visit report DA-12 with chips and multi-selects, attachments, and the follow-ups and tasks list DA-19 (due today, overdue, upcoming) with complete and reschedule. The report is saved through the outbox with delegate.visits.report; a provisional local task is created so DA-19 shows the follow-up before sync. It needs SRV-21/SRV-14 (report schema, task creation rule, delegate.tasks.*), the reference lists PERSON_ROLE and VISIT_ISSUE_TAG, and Akram's DES-13 frames. MDA-05's end-of-visit check depends on the report being saved when the visit type requires it.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | VisitReportScreen DA-12: person met (PERSON_ROLE), interest level chips « Faible » / « Moyen » / « Élevé », products and promotions presented (multi-select from cached categories, brands and active promotions), issue tags (VISIT_ISSUE_TAG), comment | Imad |
| 2 | Next action selector (« Relance téléphonique », « Nouvelle visite », « Envoyer le catalogue », « Message WhatsApp », « Aucune ») with a follow-up date required unless « Aucune » | Imad |
| 3 | Report attachments (photos via MOB-11) and draft autosave in drift | Imad |
| 4 | Save with PUT /delegate/visits/{id}/report through the outbox (client report id, occurredAt); report edits allowed until the visit locks | Imad |
| 5 | Provisional local CrmTask row from the next action, replaced by the server task on delta pull | Imad |
| 6 | FollowUpsScreen DA-19 on GET /delegate/tasks: sections « Aujourd'hui », « En retard », « À venir », TaskType labels, link to the point-of-sale sheet | Imad |
| 7 | Complete with outcome (POST /delegate/tasks/{id}/complete) and reschedule or annotate (PATCH /delegate/tasks/{id}) through the outbox | Imad |
| 8 | Due-task reminders: push from the server (CRM-08) opening /tasks, badge on the home quick action | Imad |
Deliverables
- apps/delegate/lib/src/features/report/ (DA-12)
- apps/delegate/lib/src/features/followups/ (DA-19)
- Outbox mutation types delegate.visits.report, delegate.tasks.complete, delegate.tasks.update
Acceptance criteria
- A report cannot be saved with a next action other than « Aucune » and no follow-up date (FLD-10)
- Saving a report offline immediately shows the follow-up in DA-19; after sync the server task replaces it without duplication (CRM-08)
- Overdue tasks appear in « En retard » based on the Africa/Algiers date
- Completing or rescheduling a task works offline and syncs once
- A report drafted and left unsaved is restored when the delegate returns to it
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| 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 |
| CRM-08 | Follow-ups (relances), tasks and next actions with due dates and notifications | V1 |
Screens
API surface
| Endpoint group | Operations |
|---|---|
| Tours & visits | 19 |
| Prospects, points of sale, follow-ups & invitations | 13 |
Test measures
- Widget tests of report validation rules (next action ↔ date, required fields)
- Unit test of provisional task replacement on delta pull
- Integration test: visit → report offline → reconnect → task visible in the back-office
Risks
- Report fields may evolve with HOCO's field managers — render options from reference lists, not hard-coded enums, where the spec allows it
KPI
- Delivered by Mon 7 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.
MDA-05 — Delegate app — visit flow
Visit detail with GPS validation, start/end, live duration, checklist, quick note, photos, call; not-done reason sheet. Works offline.
MDA-07 — Delegate app — new reseller (offline) & edit
Sign-up form with wilaya/commune pickers, GPS capture, façade photo, status stepper, duplicate-phone feedback; client-generated id for offline creation.