Files
member-console/internal/embeds/templates/partials/operator_subscriptions.html
T
cgalo5758 71818de0bd Add setup checklist and empty-state guidance
Implement the ux-first-run change: a state-derived setup checklist on
/operator/setup with a landing region that recedes once required steps
are done, and empty states that distinguish blocked from empty across
operator and member surfaces. Also add production deployment and
environment reference docs, plus a config-key completeness test.
2026-08-23 03:06:11 -05:00

73 lines
2.7 KiB
HTML

<!-- Subscriptions partial for operator -->
{{ if .Error }}
<div class="alert alert-danger" role="alert">
<strong>Error:</strong> {{ .Error }}
</div>
{{ else }}
{{ if eq (len .Subscriptions) 0 }}
<div class="text-center py-4">
{{ if not .StripeConfigured }}
<p class="text-muted mb-0">Billing data requires Stripe to be configured for this deployment. <a href="{{ routeURL "/operator/integrations/stripe/settings" }}">Configure Stripe</a>.</p>
{{ else }}
<p class="text-muted mb-0">No subscriptions have been projected yet.</p>
{{ end }}
</div>
{{ else }}
<div class="table-responsive">
<table class="table table-hover table-sm">
<thead>
<tr>
<th>ID</th>
<th>Billing Account</th>
<th>Status</th>
<th>Current Period</th>
<th>Cancel at Period End</th>
<th>Stripe Sync</th>
<th>Created</th>
</tr>
</thead>
<tbody>
{{ range .Subscriptions }}
<tr>
<td><code class="small" title="{{ .SubscriptionID }}">{{ slice .SubscriptionID 0 8 }}...</code></td>
<td>{{ .BillingAccountName }}</td>
<td>
<span class="badge bg-{{ .StatusClass }}">{{ .Status }}</span>
</td>
<td>
{{ if .CurrentPeriodStart }}
{{ .CurrentPeriodStart }} → {{ .CurrentPeriodEnd }}
{{ else }}
<span class="text-muted"></span>
{{ end }}
</td>
<td>
{{ if .CancelAtPeriodEnd }}
<span class="badge text-bg-warning">Yes</span>
{{ else }}
<span class="badge bg-secondary">No</span>
{{ end }}
</td>
<td>
{{ if eq .StripeSyncStatus "synced" }}
<span class="badge bg-success">Synced</span>
{{ else if eq .StripeSyncStatus "pending" }}
<span class="badge text-bg-warning">Pending</span>
{{ else if eq .StripeSyncStatus "not_mapped" }}
<span class="badge bg-secondary">Not Mapped</span>
{{ else }}
<span class="badge bg-secondary">{{ .StripeSyncStatus }}</span>
{{ end }}
</td>
<td>{{ .CreatedAt }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
<p class="text-muted small mt-2">Total: {{ len .Subscriptions }} subscriptions</p>
{{ end }}
{{ end }}