Shared components for the circulation dashboard.
Summary
Functions
Renders a circulation stats dashboard component. Displays key circulation metrics: active transactions, overdue items, active reservations, and outstanding fines.
Renders a filter section.
Renders an item info card.
Renders a member info card.
Renders a member lookup modal for searching members.
Renders the Quick Actions card used on the circulation dashboard.
Renders a quick checkout modal for rapid item checkout.
Renders a quick return modal for rapid item return.
Renders a quick stats grid.
Renders a status badge with appropriate styling.
Functions
Renders a circulation stats dashboard component. Displays key circulation metrics: active transactions, overdue items, active reservations, and outstanding fines.
Attributes
stats- A map containing :active_transactions, :overdue_count,:active_reservations, :outstanding_finesloading- Boolean flag to show loading spinners (default: false)format_fines- Boolean to format fines as IDR currency (default: true)
Example
<.circulation_stats stats={@stats} loading={@loading} />Attributes
stats(:map) (required)loading(:boolean) - Defaults tofalse.format_fines(:boolean) - Defaults totrue.
Renders a filter section.
Attributes
filters(:list) (required)current_filters(:map) - Defaults to%{}.
Renders an item info card.
Attributes
item(:map) (required)compact(:boolean) - Defaults tofalse.
Renders a member info card.
Attributes
member(:map) (required)compact(:boolean) - Defaults tofalse.
Renders a member lookup modal for searching members.
Renders the Quick Actions card used on the circulation dashboard.
Attributes
current_user(:map) (required)
Renders a quick checkout modal for rapid item checkout.
Renders a quick return modal for rapid item return.
Renders a quick stats grid.
Attributes
stats(:list) (required)
Renders a status badge with appropriate styling.
Attributes
status(:string) (required)type(:atom) - Defaults to:general. Must be one of:general,:transaction,:reservation,:requisition, or:fine.