PhoenixKitCatalogue.Web.ViewConfig (PhoenixKitCatalogue v0.10.0)

Copy Markdown View Source

Per-user table view config (columns / sort / filters / view mode) for the catalogue admin tables. Stored in phoenix_kit_users.custom_fields under the "catalogue_view_configs" key — no dedicated table. Precedent: PhoenixKit.Notifications.Prefs.

Summary

Functions

defaults(scope)

load(user, scope)

@spec load(map() | nil, PhoenixKitCatalogue.Web.TableConfig.scope()) :: map()

normalize(scope, raw)

save(user, scope, cfg)

@spec save(map(), PhoenixKitCatalogue.Web.TableConfig.scope(), map()) ::
  {:ok, map()} | {:error, term()}

scope_key(scope)