Thin wrapper around PhoenixKit.Activity.log/1 so callers don't need to
duplicate the Code.ensure_loaded?/1 guard and rescue clause everywhere.
Safe to call from any LiveView — never crashes the caller.
Action strings follow "crm.<resource>_<verb>".
Summary
Functions
Keyword opts carrying the actor uuid, for context calls that log.
Extracts user.uuid from the LiveView socket assigns.
Logs a CRM activity entry via PhoenixKit.Activity. Swallows errors so it never crashes the caller.
Functions
@spec actor_opts(Phoenix.LiveView.Socket.t()) :: keyword()
Keyword opts carrying the actor uuid, for context calls that log.
@spec actor_uuid(Phoenix.LiveView.Socket.t()) :: UUIDv7.t() | String.t() | nil
Extracts user.uuid from the LiveView socket assigns.
@spec log( String.t(), keyword() ) :: :ok | :activity_unavailable | {:ok, struct()} | {:error, any()}
Logs a CRM activity entry via PhoenixKit.Activity. Swallows errors so it never crashes the caller.