MRA-07 — Reseller app — account, store, finance & settings
Account hub, store profile and documents, balance and credit, invoices, payments and payment declaration with proof, settings.
| Field | Details |
|---|---|
| Task code | MRA-07 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Wed 18 Nov 2026 |
| Due | Thu 19 Nov 2026 |
| Responsible | Imad — Mobile developer (Flutter) |
| Co-responsible | — |
| Effort | 1.25 person-day(s) planned · 5 from scratch · size S |
| Area · app | Reseller app · mobile |
| Depends on | DES-10, DES-09 |
| Unblocks | — |
| Milestones | — |
Summary
Account hub, store profile and documents, balance and credit, invoices, payments and payment declaration with proof, settings.
Description
The account area is where resellers manage their store record, follow what they owe and declare payments with proof, so finance figures must match the back-office exactly (CRM-01, CRM-10, FIN-01, FIN-03, FIN-05, FIN-10). Scope: account hub RA-27 (store, number, status, read-only customer type), store profile and documents RA-28, balance and credit RA-29, invoices RA-30, payments and payment declaration RA-31, and settings RA-35 (language, notification preferences, sessions, password, sign-out). Per AUTH-11 the customer type is shown but only the back-office changes it; the app offers « Demander un changement » through support. It needs profile.*, finance.summary, invoices.*, payments.*, files.*, notifications.preferences.* and auth.sessions.* (SRV-14, SRV-18, SRV-07) and Akram's DES-09/DES-10 frames. MOB-11 provides the uploads; MRA-08 handles the support request.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | AccountHubScreen RA-27: store name, REV-000123, account status pill, « Type de client : Demi-gros » (read-only with « Demander un changement » opening a support ticket), assigned delegate contact, links | Imad |
| 2 | StoreProfileScreen RA-28: GET/PATCH /reseller/profile for the editable fields only (others marked « modifiable via le support »), photos, documents list (GET /reseller/documents) and add (MOB-11 upload → POST /reseller/documents with DocumentType RC, NIF, NIS, AI, pièce d'identité) | Imad |
| 3 | BalanceCreditScreen RA-29 on GET /finance/summary: balance due, credit limit, used and available credit, next due date | Imad |
| 4 | InvoicesScreen RA-30: GET /invoices with status filter (« Impayée », « Partiellement payée », « Payée », « En retard », « Annulée »), invoice detail with allocated payments and PDF via signed URL | Imad |
| 5 | PaymentsScreen RA-31: GET /payments with PaymentStatus pills (« À vérifier », « Confirmé », « Rejeté » with reason) | Imad |
| 6 | PaymentDeclarationForm: method (BANK_TRANSFER, CCP, BARIDIMOB), amount typed in DA and sent in centimes, payment date, reference, optional invoices, proof photo or PDF (PAYMENT_PROOF) → POST /payments/declarations with an Idempotency-Key | Imad |
| 7 | SettingsScreen RA-35: language (fr; ar/en behind flag), notification preferences (GET/PUT /notification-preferences, transactional categories locked on), active sessions list and revoke (auth.sessions.*), change password, sign-out, app and contract version, legal links | Imad |
| 8 | Pending-account handling: payment declaration and document upload states when ACCOUNT_PENDING_VALIDATION is returned | Imad |
Deliverables
- apps/reseller/lib/src/features/account/ (hub, store profile, documents, settings)
- apps/reseller/lib/src/features/finance/ (balance, invoices, payments, declaration)
- Widget tests of the declaration form validation and of invoice status pills
Acceptance criteria
- Balance, credit limit, used and available credit equal the back-office values for the same reseller (FIN-05, FIN-10)
- Invoices filter by status and open their PDF; each shows the payments allocated to it (FIN-01)
- A declaration with a proof photo appears immediately as « À vérifier » and is not duplicated by a retry (FIN-03)
- The customer type is visible but not editable in the app (AUTH-11)
- Transactional notification categories cannot be disabled; promotional ones can (NOT-06)
- Revoking another session signs that device out on its next request (AUTH-06)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| CRM-01 | Reseller/prospect record with the minimum data set (store, owner, phone, WhatsApp, email, wilaya, commune, address, GPS, type, potential, delegate, photos, documents, status) | V1 |
| CRM-10 | Store photos and documents (façade, interior, RC, NIF, ID) with protected access | V1 |
| FIN-01 | Invoices generated from orders with legal mentions and PDF; statuses unpaid, partially paid, paid, overdue, cancelled | V1 |
| FIN-03 | Payment recording in the back-office and payment declaration with proof by the reseller | V1 |
| FIN-05 | Basic credit control: ceiling, used and available credit checked at checkout | V1 |
| FIN-10 | Reseller finance view: balance, available credit, invoices, payments | V1 |
| NOT-06 | Notification preferences (marketing opt-out) | V1 |
Screens
| Screen | Name | App |
|---|---|---|
| RA-27 | Account hub | RA |
| RA-28 | Store profile & documents | RA |
| RA-29 | Balance & credit | RA |
| RA-30 | Invoices | RA |
| RA-31 | Payments & payment declaration | RA |
| RA-35 | Settings | RA |
API surface
| Endpoint group | Operations |
|---|---|
| Reseller profile, addresses & documents | 9 |
| Reseller finance | 6 |
| File uploads & downloads | 3 |
| Notifications & announcements | 10 |
Test measures
- Widget tests of the declaration form (amount parsing to centimes, required proof, method list)
- Integration test: declare payment with proof → appears in the payments list as PENDING_VERIFICATION
- Golden tests of the finance screens with large amounts and zero balances
Risks
- Which store fields resellers may edit is not fully settled — drive editability from the profile response (editable flags) rather than hard-coding
KPI
- Delivered by Thu 19 Nov 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.
MRA-06 — Reseller app — promotions & daily offers
Daily offers with countdown, promotions list and detail with eligible products.
MRA-08 — Reseller app — notifications & support
Notification inbox with deep links and badge, announcements, tickets and after-sales claims (order items, issue, photos), conversation, and the regional WhatsApp support button.