Context for dashboard statistics.
Lifts the GLAM / catalog / member statistics queries that previously lived as
private functions inside VoileWeb.Dashboard.Glam.Index and
VoileWeb.DashboardLive so the new dashboard home (Phase 2 of the redesign)
can feed the GLAM strip without duplicating the logic.
All queries honor node scoping: when the given user has a node_id, counts
are restricted to that node; super admins (with node_id == nil) see
everything.
Summary
Functions
Computes catalog statistics scoped to the user's node.
Computes GLAM statistics scoped to the given user's node.
Computes member statistics scoped to the user's node.
Returns the most recently created collections scoped to the user's node, preloading the associations the dashboard rows need to render.
Functions
Computes catalog statistics scoped to the user's node.
Computes GLAM statistics scoped to the given user's node.
Returns a map with both the nested per-type breakdown (consumed by the legacy
glam_navigation_cards component) and flat *_count keys (consumed by the
v2 voile_glam_strip). *_delta keys are present but always 0 — trend data
is tracked separately and can be wired in a later phase.
Computes member statistics scoped to the user's node.
Returns the most recently created collections scoped to the user's node, preloading the associations the dashboard rows need to render.