Aggiunge abbonamenti omaggio admin per sponsor e promozioni.
Gli admin possono concedere o revocare Premium Light/Full senza Stripe; il piano omaggio ha priorità sui webhook e la società vede un messaggio dedicato. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
38
backend/app/views/admin/clubs/index.html.erb
Normal file
38
backend/app/views/admin/clubs/index.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
<h2>Società</h2>
|
||||
<p style="color:#888;margin-bottom:16px">
|
||||
Gestisci abbonamenti omaggio (sponsor / promozioni). Per pagamenti Stripe usa <%= link_to "Fatturazione", admin_billing_path %>.
|
||||
</p>
|
||||
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Società</th>
|
||||
<th>Piano</th>
|
||||
<th>Omaggio</th>
|
||||
<th>Stripe</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @clubs.each do |club| %>
|
||||
<% sub = club.subscription %>
|
||||
<tr>
|
||||
<td><strong><%= club.name %></strong></td>
|
||||
<td><%= sub&.plan&.name || "Free" %></td>
|
||||
<td>
|
||||
<% if sub&.admin_comped? %>
|
||||
<span style="color:#ffb74d">Sì</span>
|
||||
<% if sub.admin_comped_reason.present? %> · <%= sub.admin_comped_reason %><% end %>
|
||||
<% else %>
|
||||
—
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= sub&.stripe_subscription_id.present? ? "Sì" : "—" %></td>
|
||||
<td>
|
||||
<%= link_to "Gestisci", admin_club_path(club) %>
|
||||
· <%= link_to "Fatture", admin_billing_path(club_id: club.id) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user