MailglassAdmin.Inbound.RecordsList (MailglassAdmin v1.9.0)

Copy Markdown View Source

Recent inbound records list with dual table+card presentation.

Renders a semantic <table> at >=768px and a <ul> of card buttons at <768px, both driven from the same @records assign with identical selection semantics, result-count, and pagination.

Sibling of MailglassAdmin.Operator.DeliveriesList (clone, not a refactor). Rows render the masked envelope recipient via the one promoted MailglassAdmin.Components.mask_recipient/1 definition, the record id in mono, an outcome badge via Components.status_badge/1 (normalized through normalize_inbound_outcome/1), and a meta line mailbox · tenant · provider · received_at.

Data-state branches render four distinct Components.data_state/1 kinds when there is no row data to show. The four branches are:

  • :empty — no records (no-data / filtered / no-tenant distinction preserved)
  • :error — data unavailable
  • :permission_denied — access restricted
  • :stale — data may be out of date

Summary

Functions

records_list(assigns)

Attributes

  • records (:list) (required)
  • page_meta (:map) - Defaults to %{total_count: 0, total_pages: 0, has_previous?: false, has_next?: false}.
  • previous_page_path (:string) - Defaults to nil.
  • next_page_path (:string) - Defaults to nil.
  • selected_record (:map) - Defaults to nil.
  • empty_state (:atom) - Defaults to :filtered. Must be one of :no_tenant, :truly_empty, or :filtered.
  • data_state (:atom) - Defaults to nil.