Files
member-console/internal/embeds/templates/partials/operator_subscriptions.html
T
cgalo5758 408fa6f5a6 Add page anatomy parts and UI quality gate
- Add shared ui_*.html parts (pageHeader, sectionHeader, statusBadge,
  emptyState) parsed into every template set
- Add anatomy lint rules with a shrinking allowlist and screen-coverage
  check
- Add make screens capture harness with contact sheets and baseline diff
- Compose member and FedWiki regions server-side so pages arrive
  complete
- Rebuild Domains and Integrations on the parts as pilots
2026-08-30 04:05:31 -05:00

84 lines
3.7 KiB
HTML

<!-- Subscriptions partial for operator -->
{{ if .Error }}
<div class="alert alert-danger" role="alert">
<strong>Error:</strong> {{ .Error }}
</div>
{{ else }}
{{ template "listControls" .Nav }}
{{ if eq (len .Subscriptions) 0 }}
{{ if .Nav.Filtered }}
{{ template "listNoMatch" .Nav }}
{{ else }}
<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/{integrationKey}/settings" "stripe" }}">Configure Stripe</a>.</p>
{{ else }}
<p class="text-muted mb-0">No subscriptions have been projected yet.</p>
{{ end }}
</div>
{{ end }}
{{ else }}
<div class="table-responsive">
<table class="table table-hover table-sm">
<thead>
<tr>
<th>Organization</th>
<th>Billing Account</th>
<th>Status</th>
<th>Current Period</th>
<th>Cancel at Period End</th>
<th>Stripe <span class="text-nowrap">Sync<span title="Whether the row has a linked Stripe object. Not Mapped means none is linked yet; that is expected when Stripe is not configured or a sync has not run. Check the Stripe integration settings before assuming something is broken."><svg class="form-help-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></span></span></th>
<th>Created</th>
<th>ID</th>
</tr>
</thead>
<tbody>
{{ range .Subscriptions }}
<tr>
<td>
{{ if .OrgName }}
<a href="{{ routeURL "/operator/organizations/{orgID}" .OrgID }}">{{ .OrgName }}</a>
{{ else }}
<span class="text-muted">{{ .OrgID }}</span>
{{ end }}
</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>
<td><code class="small text-body-secondary" title="{{ .SubscriptionID }}">{{ slice .SubscriptionID 0 8 }}...</code></td>
</tr>
{{ end }}
</tbody>
</table>
</div>
{{ template "listPager" .Nav }}
{{ end }}
{{ end }}