Così Ops può emettere fattura dalla scheda club senza cercare il profilo solo tra i pagamenti pending. Co-authored-by: Cursor <cursoragent@cursor.com>
57 lines
2.1 KiB
ERB
57 lines
2.1 KiB
ERB
<h2><%= t("admin.clubs.index.title") %></h2>
|
|
<p style="color:#888;margin-bottom:16px">
|
|
<%= t("admin.clubs.index.subtitle_html", billing_link: link_to(t("admin.clubs.index.billing_link"), admin_billing_path)) %>
|
|
</p>
|
|
|
|
<table class="admin-table">
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.clubs.index.table.club") %></th>
|
|
<th><%= t("admin.clubs.index.table.plan") %></th>
|
|
<th><%= t("admin.clubs.index.table.teams") %></th>
|
|
<th><%= t("admin.clubs.index.table.billing_profile") %></th>
|
|
<th><%= t("admin.clubs.index.table.comped") %></th>
|
|
<th><%= t("admin.clubs.index.table.stripe") %></th>
|
|
<th><%= t("admin.clubs.index.table.quote") %></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @clubs.each do |club| %>
|
|
<% sub = club.subscription %>
|
|
<% billing_status = club.billing_profile_admin_status %>
|
|
<tr>
|
|
<td><strong><%= club.name %></strong></td>
|
|
<td><%= sub&.plan&.name || t("admin.common.free_plan") %></td>
|
|
<td><%= club.teams.size %></td>
|
|
<td>
|
|
<span class="admin-billing-status admin-billing-status--<%= billing_status %>">
|
|
<%= t("admin.clubs.billing_status.#{billing_status}") %>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<% if sub&.admin_comped? %>
|
|
<span style="color:#ffb74d"><%= t("admin.common.yes") %></span>
|
|
<% if sub.admin_comped_reason.present? %> · <%= sub.admin_comped_reason %><% end %>
|
|
<% else %>
|
|
<%= t("admin.common.dash") %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= sub&.stripe_subscription_id.present? ? t("admin.common.yes") : t("admin.common.dash") %></td>
|
|
<td>
|
|
<% quote = club.billing_quote %>
|
|
<% if quote %>
|
|
<%= quote.plan.name %> · <%= quote.formatted_amount %>
|
|
<% else %>
|
|
<%= t("admin.common.dash") %>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<%= link_to t("admin.clubs.index.manage"), admin_club_path(club) %>
|
|
· <%= link_to t("admin.clubs.index.invoices"), admin_billing_path(club_id: club.id) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|