Optional, soft integration with phoenix_kit_staff. Everything here is
guarded — the CRM module works whether or not the staff module is present
or enabled. Used by the interaction "involved parties" picker (a staff
person can be selected) and by the party snapshot.
Summary
Functions
Whether the staff module is loaded AND enabled. Always safe to call.
Path to a staff person's profile page, or nil when staff is unavailable.
Searches staff people by name (case-insensitive) when staff is enabled.
Returns a list of %{uuid, name, job_title} maps. Empty when staff is off.
Builds an as-of-now profile snapshot for a staff person, for freezing onto
an interaction party. Returns %{} if staff is unavailable or unknown.
Functions
@spec enabled?() :: boolean()
Whether the staff module is loaded AND enabled. Always safe to call.
Path to a staff person's profile page, or nil when staff is unavailable.
@spec search(String.t(), pos_integer()) :: [map()]
Searches staff people by name (case-insensitive) when staff is enabled.
Returns a list of %{uuid, name, job_title} maps. Empty when staff is off.
Builds an as-of-now profile snapshot for a staff person, for freezing onto
an interaction party. Returns %{} if staff is unavailable or unknown.