CRM · Customer list & filtering

Paginated, sortable, filterable list of the centre’s registered customers showing code, name, surname, email, VAT number and phone, with row actions for children, edit and delete.

AreaCRM
Routescrm.users · crm.users.index
Centre modulescrm
Staff levelsroot · admin · manager · crmmanager · crmoperator · weboperator · content_creator
Modelsbuilding · channel · segment · user
UI labeltitle.header.crm.users / menu.navbar.customer.show
Coverage4 use cases · 2 happy · 4 failure

How it works

Built on ListMixin + SegmentFilterMixin. The centre is pinned as a fixed filter (fixedFilters.center_id) in init, default sort is -updated-at, and the query forwards a meta.page.token when the API returns one — a cursor-style pagination for large datasets. The available filters come from enums/user-filters run through beautifyFilters(center) and groupFilterByModule, so the filter palette itself changes with the centre’s enabled modules. A side panel can list the segments a filtered set belongs to (fetchSegments, independently paginated at 16 per page). resetFilters clears the pagination token as well as the filters.

Use cases

Why someone opens this (4)

  • Finding one customer by email or VAT number to resolve a support query.
  • Building an ad-hoc audience (e.g. women 25-34 in a postal code with marketing consent) before saving it as a segment.
  • Checking which segments a given filtered population already belongs to.
  • Jumping from a customer to their registered children for the play centre.

Path map

flowchart LR
    F(["Customer list and filtering"]):::feat
    F --> H1["Filter and page through customers"]:::ok
    F --> H2["Inspect segments of a filtered set"]:::ok
    F -.-> X1["Filter left with an empty value"]:::bad
    F -.-> X2["Required filter missing"]:::bad
    F -.-> X3["Row action invoked without a record"]:::bad
    F -.-> X4["Deep pagination drift"]:::bad
    classDef feat fill:#157068,stroke:#157068,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Filter and page through customers

  1. User opens CRM → Customer list; the first page loads scoped to the active centre, newest first.
  2. User adds one or more filters from the grouped filter palette and applies them.
  3. The query is rebuilt with filter, page and sort; results refresh.
  4. User pages forward; the API’s page.token is forwarded so deep pages stay consistent.

Inspect segments of a filtered set

  1. With filters applied, the user opens the segments panel.
  2. fetchSegments queries segments with the same fixed filters and fills a separate paginated table.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Filter and page through customers
  • ✅ Inspect segments of a filtered set
  • ⛔ Filter left with an empty value
  • ⛔ Required filter missing
  • ⛔ Row action invoked without a record
  • ⛔ Deep pagination drift

Implementation


Generated from doc/feature-inventory.json · id crm-customer-list · commit 276788ca6