PhoenixKitCRM.ActivityLabels (PhoenixKitCRM v0.2.4)

Copy Markdown View Source

Maps CRM activity action strings (e.g. "crm.interaction_logged") to a {heroicon, human_label} pair plus an optional secondary detail/2 line, for the contact/company Events tab. Domain labels go through PhoenixKitCRM.Gettext. Unknown actions fall back to a humanized form of the action string, so a newly-added action still renders without a change here.

Icon names are literals (Tailwind scans them); render dynamically via <.icon>.

Summary

Functions

Returns {icon_name, label} for an action string + its metadata.

Optional secondary line for an entry (e.g. an interaction's subject).

Functions

describe(action, metadata \\ %{})

@spec describe(String.t(), map()) :: {String.t(), String.t()}

Returns {icon_name, label} for an action string + its metadata.

detail(action, arg2)

@spec detail(String.t(), map()) :: String.t() | nil

Optional secondary line for an entry (e.g. an interaction's subject).