Unifica admin società/squadre e YouTube Full con fallback MLTV.
Premium Full senza canale società usa il canale piattaforma come Light; in app restano solo Match Live TV e YouTube Live. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<h2>Società</h2>
|
||||
<h2>Società e squadre</h2>
|
||||
<p style="color:#888;margin-bottom:16px">
|
||||
Gestisci abbonamenti omaggio (sponsor / promozioni). Per pagamenti Stripe usa <%= link_to "Fatturazione", admin_billing_path %>.
|
||||
Abbonamenti omaggio (sponsor / promozioni) e stato YouTube per squadra.
|
||||
Pagamenti Stripe: <%= link_to "Fatturazione", admin_billing_path %>.
|
||||
</p>
|
||||
|
||||
<table class="admin-table">
|
||||
@@ -8,6 +9,7 @@
|
||||
<tr>
|
||||
<th>Società</th>
|
||||
<th>Piano</th>
|
||||
<th>Squadre</th>
|
||||
<th>Omaggio</th>
|
||||
<th>Stripe</th>
|
||||
<th></th>
|
||||
@@ -19,6 +21,7 @@
|
||||
<tr>
|
||||
<td><strong><%= club.name %></strong></td>
|
||||
<td><%= sub&.plan&.name || "Free" %></td>
|
||||
<td><%= club.teams.size %></td>
|
||||
<td>
|
||||
<% if sub&.admin_comped? %>
|
||||
<span style="color:#ffb74d">Sì</span>
|
||||
|
||||
@@ -1,16 +1,52 @@
|
||||
<p style="margin-bottom:16px"><%= link_to "← Tutte le società", admin_clubs_path %></p>
|
||||
<p style="margin-bottom:16px"><%= link_to "← Società e squadre", admin_clubs_path %></p>
|
||||
|
||||
<h2><%= @club.name %></h2>
|
||||
<p style="color:#888">
|
||||
Sport: <%= @club.sport %>
|
||||
· <%= link_to "Pagamenti e fatture", admin_billing_path(club_id: @club.id) %>
|
||||
· <%= link_to "Canale YouTube piattaforma", admin_youtube_platform_path %>
|
||||
</p>
|
||||
|
||||
<%= render "admin/clubs/comped_form", club: @club, subscription: @subscription, return_to: admin_club_path(@club) %>
|
||||
|
||||
<h3 style="font-size:1rem;margin-top:24px">Squadre</h3>
|
||||
<ul>
|
||||
<% @club.teams.order(:name).each do |team| %>
|
||||
<li><%= link_to team.name, admin_team_path(team) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<h3 style="font-size:1rem;margin-top:28px">Squadre</h3>
|
||||
<% if @teams.empty? %>
|
||||
<p class="muted">Nessuna squadra registrata.</p>
|
||||
<% else %>
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Squadra</th>
|
||||
<th>Sport</th>
|
||||
<th>YouTube</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @teams.each do |team| %>
|
||||
<% yt = Youtube::TeamStatus.new(team) %>
|
||||
<tr>
|
||||
<td><strong><%= team.name %></strong></td>
|
||||
<td><%= team.sport %></td>
|
||||
<td>
|
||||
<% if yt.selectable? %>
|
||||
<% if yt.uses_platform_channel? %>
|
||||
<span style="color:#81c784">Match Live TV</span>
|
||||
<% if team.youtube_credential.blank? && team.entitlements.premium_full? %>
|
||||
<span class="muted"> (default Full)</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span style="color:#81c784">✓ <%= yt.channel_title.presence || "Canale società" %></span>
|
||||
<% end %>
|
||||
<% elsif team.entitlements.youtube_enabled? %>
|
||||
<span class="muted">In configurazione</span>
|
||||
<% else %>
|
||||
—
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= link_to "Partite e dettagli", admin_team_path(team) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user