Club come entità principale, branding e fix infrastruttura streaming.

Introduce clubs con abbonamento, branding Active Storage e flusso registrazione società; corregge healthcheck MediaMTX (immagine distroless) e allinea dominio produzione matchlivetv.it.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-27 09:16:24 +02:00
parent 471291b2c4
commit 4083bc5dee
53 changed files with 1120 additions and 197 deletions

View File

@@ -0,0 +1,61 @@
<% content_for :title, "#{@club.name} — Società" %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap club-dashboard" style="padding-top:20px">
<header class="club-header" style="--club-primary:<%= @club.effective_primary_color %>;--club-secondary:<%= @club.effective_secondary_color %>">
<% if @club.effective_logo_url.present? %>
<%= image_tag @club.effective_logo_url, alt: "", class: "club-header-logo", width: 56, height: 56 %>
<% end %>
<div>
<h1><%= @club.name %></h1>
<% if @entitlements %>
<p class="club-meta">
Piano: <strong><%= @entitlements.plan.name %></strong>
· Squadre: <strong><%= @teams.size %></strong>
</p>
<% end %>
</div>
</header>
<div style="display:flex;gap:12px;flex-wrap:wrap;margin:20px 0">
<%= link_to "Modifica società", public_edit_club_path(@club), class: "btn btn-secondary" %>
<%= link_to "Abbonamento", public_club_billing_path(@club), class: "btn btn-primary" %>
<%= link_to "Nuova squadra", public_new_club_team_path(@club), class: "btn btn-secondary" %>
<%= link_to "Dirette live", public_live_index_path, class: "btn btn-secondary" %>
</div>
<h2>Squadre</h2>
<div class="card">
<% if @teams.any? %>
<table class="data">
<thead><tr><th>Squadra</th><th>Branding</th><th></th></tr></thead>
<tbody>
<% @teams.each do |team| %>
<tr>
<td>
<span class="team-swatch" style="background:<%= team.effective_primary_color %>"></span>
<strong><%= team.name %></strong>
</td>
<td style="color:#888;font-size:0.88rem">
<% if team.logo_url.present? || team.logo_file.attached? || team.primary_color.present? %>
Personalizzato
<% else %>
Eredita dalla società
<% end %>
</td>
<td style="white-space:nowrap">
<%= link_to "Dashboard", public_team_dashboard_path(team) %>
·
<%= link_to "Modifica", public_edit_team_path(team) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p style="color:#888">Nessuna squadra. <%= link_to "Aggiungi la prima", public_new_club_team_path(@club) %>.</p>
<% end %>
</div>
<p style="color:#888;margin-top:24px">Ogni squadra ha il proprio staff trasmissione/regia. Labbonamento vale per tutta la società.</p>
</div>