PhoenixKitManufacturing.Web.Components.CommentsPanel (PhoenixKitManufacturing v0.3.2)

Copy Markdown View Source

Presentation helper for Manufacturing resource comment threads. panel/1 embeds the ready-made PhoenixKitComments.Web.CommentsComponent.

A 1:1 adaptation of PhoenixKitWarehouse.Web.Components.CommentsPanel, narrowed to the single kind :: :machine this module wires up today — mirrors PhoenixKitManufacturing.Comments' own parameterization.

Callers guard visibility with PhoenixKitManufacturing.Comments.available?/0.

Summary

Functions

Embedded comments thread for a Manufacturing resource.

Functions

panel(assigns)

Embedded comments thread for a Manufacturing resource.

Assigns:

  • :kind:machine (required)
  • :resource_uuid — the resource's uuid, used as resource_uuid (required)
  • :current_user — current user struct (or nil) (required)
  • :id — optional DOM id; defaults to comments-<kind>-<uuid>
  • :title — optional heading; defaults to ""
  • :read_only — when true, render without composer or chrome

Attributes

  • kind (:atom) (required) - Must be one of :machine.
  • resource_uuid (:string) (required)
  • current_user (:any) (required)
  • id (:string) - Defaults to nil.
  • title (:string) - Defaults to "".
  • read_only (:boolean) - Defaults to false.