PhoenixKitCRM.Web.ProjectClientLive (PhoenixKitCRM v0.6.0)

Copy Markdown View Source

The CRM Client tab for the phoenix_kit_projects hub — this module's phoenix_kit_project_extensions/0 contribution (see that function in PhoenixKitCRM).

Rendered by the projects hub via live_render with the hub's embed-session contract: "project_uuid" (the host project), "config" (this instance's config — company_uuid links the client), "current_user_uuid" / "locale". Linkage is CONFIG-based — no FK, no dependency on the projects package; the admin picks the company in the project's Modules & features panel (a select over PhoenixKitCRM.Companies.company_options/0).

Shows the linked company card, its member contacts, and the most recent interactions across those members (the company's aggregated feed), with link-outs to the CRM admin. Read-only here — mutations live in CRM. The extension declares no write action, so the hub hands this tab "can_write" => false and there is nothing to gate.

Off-router-mountable: no handle_params/3 (the hub's hard requirement), so CRM reads run on the connected mount only — the hub renders the landing tab in the project page's dead render too, and an unguarded mount would run every query twice.