Table of subscriptions currently in an active dunning campaign.
Renders as the Recovery work queue before the supporting funnel on
/billing/analytics/recovery.
Per-row map contract
Each map in rows must contain these keys (from Accrue.Analytics.Dunning.at_risk_subscriptions/1):
| key | type | display |
|---|---|---|
:subscription_id | binary UUID | drill-down href |
:customer_id | binary UUID | unused directly (href uses subscription_id) |
:customer_label | `String.t() | nil` | Customer cell text (name or email) |
:amount_due_minor | `integer() | nil` | optional amount currently at risk |
| :currency | String.t() | atom() | nil | optional currency for amount display |
| :days_in_campaign | non_neg_integer() | displayed as "N days" |
| :current_step | non_neg_integer() | 0 → "Pending"; N → "Step N" |
| :next_step_eta | %DateTime{} | nil | formatted as date-time string; nil → "—" |
| :failure_reason | map() | nil | most-recent invoice.payment_failed data; extracts failure_code/failure_message keys; nil or missing invoice → "—" |
Example
<AtRiskTable.at_risk_table rows={@at_risk} base_path={@admin_mount_path} />
Summary
Functions
Attributes
rows(:list) (required)base_path(:string) - Defaults to"/billing".owner_scope(:any) - Defaults tonil.class(:string) - Defaults tonil.loading(:boolean) - Defaults tofalse.error(:any) - Defaults tonil.next_cursor(:string) - Defaults tonil.load_more_href(:string) - Defaults tonil.empty_copy(:map) - Defaults tonil.