PhoenixKitManufacturing. Web. Components. FilesCard
(PhoenixKitManufacturing v0.3.2)
Copy Markdown
View Source
Reusable Files + Featured Image card body. Renders the same UI for
any scoped resource on this module — each instance scoped by the
scope attr, which is forwarded as phx-value-scope on every
event button. The single shared upload config is owned by the
parent LiveView; each dropzone here also sets :active_upload_scope
on click so the upload routes to the right folder.
The only scope currently wired up is the literal "machine" (see
MachineFormLive), but the component is scope-agnostic — a future
resource on this module (e.g. Operations) can render another
<.files_card_body> instance without changes here.
This is a 1:1 adaptation of PhoenixKitLocations.Web.Components.FilesCard,
pointed at PhoenixKitManufacturing.Attachments instead of
PhoenixKitLocations.Attachments.