<% content_for :title, "#{@team.name} — Dashboard" %> <% content_for :meta_description, "Dashboard squadra #{@team.name} su Match Live TV." %> <% content_for :robots, "noindex, nofollow" %>

<%= @team.name %>

Piano: <%= @entitlements.plan.name %> · Staff trasmissione: <%= @entitlements.staff_count_for("transmission") %> / <%= @entitlements.max_staff_transmission || "∞" %> · Staff regia: <%= @entitlements.staff_count_for("regia") %> / <%= @entitlements.max_staff_regia || "∞" %> · Partite attive: <%= @entitlements.concurrent_streams_used %><% if @entitlements.concurrent_streams_limit %> / <%= @entitlements.concurrent_streams_limit %><% else %> (illimitate)<% end %>

<%= link_to "Abbonamento", public_team_billing_path(@team), class: "btn btn-primary" %> <%= link_to "Aggiungi staff", public_team_invite_path(@team), class: "btn btn-secondary" %> <%= link_to "Dirette live", public_live_index_path, class: "btn btn-secondary" %>

Staff attivo

<% if @members.any? %> <% @members.each do |ut| %> <% end %>
NomeEmailRuolo
<%= ut.user.name %> <%= ut.user.email %> <%= ut.staff_kind == "regia" ? "Regia" : "Trasmissione" %> <%= button_to "Revoca", public_team_remove_member_path(@team, ut.user), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: "Revocare l'accesso a #{ut.user.name}?" } } %>
<% else %>

Nessun membro staff. <%= link_to "Aggiungi qualcuno", public_team_invite_path(@team) %>.

<% end %>

Staff in attesa

<% if @pending_invitations.any? %> <% @pending_invitations.each do |inv| %> <% end %>
EmailRuoloScade
<%= inv.email %> <%= inv.staff_kind == "regia" ? "Regia" : "Trasmissione" %> <%= l inv.expires_at, format: :short %> <%= button_to "Annulla", public_team_destroy_invitation_path(@team, inv), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem" %>
<% else %>

Nessuna richiesta in sospeso.

<% end %>
<% if @entitlements.can_access_recordings? && @recordings.any? %>

Archivio gare

<% @recordings.each do |rec| %> <% end %>
PartitaReplay
<%= rec.stream_session.match.team.name %> vs <%= rec.stream_session.match.opponent_name %> <%= link_to "Guarda", rec.replay_url %>
<% end %>

Usa l'app mobile con le stesse credenziali per avviare partite e dirette.