Table of subscriptions currently in an active dunning campaign.
Renders below the Recovery 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) |
| :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} />