AccrueAdmin.Queries.Customers (accrue_admin v1.5.0)

Copy Markdown View Source

Cursor-paginated customer list queries for admin UI surfaces.

Summary

Functions

Distinct customer owner_type values visible in the active owner scope, sorted.

Functions

detail(id, owner_scope)

distinct_owner_types(owner_scope)

Distinct customer owner_type values visible in the active owner scope, sorted.

Mirrors Queries.Webhooks.distinct_types/1 but pushes scoping into SQL via scope_query/2 (customers are SQL-scopable, unlike webhooks whose ownership is proven per-row in Elixir). Powers the customers list owner-type dropdown filter.