<% team = local_assigns[:team] %> <% can_manage = local_assigns[:can_manage] %> <% owner_membership = local_assigns[:owner_membership] %> <% staff_memberships = local_assigns[:staff_memberships] %> <% pending_invitations = local_assigns[:pending_invitations] %> <% recordings = local_assigns[:recordings] %> <% entitlements = local_assigns[:entitlements] %>
<% if can_manage %> <% if owner_membership&.staff_kind.blank? %>

Il tuo account (<%= current_user.email %>)

Puoi gestire la trasmissione dall’app. Per il punteggio da un altro telefono, condividi il link regia durante la diretta (non serve un secondo account).

<%= button_to "Sono io — responsabile trasmissione", public_team_assign_self_staff_path(team), method: :post, params: { staff_kind: "transmission" }, class: "btn btn-primary" %>
<% end %> <% end %>

Responsabili trasmissione (app)

<% if staff_memberships.any? %> <% if can_manage %><% end %> <% staff_memberships.each do |ut| %> <% if can_manage %> <% end %> <% end %>
NomeEmailRuolo
<%= ut.user.name %> <% if ut.user_id == current_user.id %> (tu)<% end %> <%= ut.user.email %> Trasmissione <% if ut.user_id == current_user.id && team.club.owned_by?(current_user) %> <%= button_to "Rimuovi ruolo staff", public_team_clear_self_staff_path(team), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: "Rimuovere il ruolo staff dal tuo account?" } } %> <% elsif ut.role == "member" %> <%= 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}?" } } %> <% end %>
<% else %>

Nessun responsabile trasmissione. <% if can_manage %><%= link_to "Invita qualcuno", public_team_invite_path(team) %>.<% end %>

<% end %>
<% if can_manage %>

Inviti in attesa

<% if pending_invitations.any? %> <% pending_invitations.each do |inv| %> <% end %>
EmailScade
<%= inv.email %> <%= 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 %>
<% end %> <% if entitlements.can_access_recordings? %>

Archivio replay

<% if recordings.any? %> <% recordings.each do |rec| %> <% end %>
PartitaDataDurataScadenzaStato
<%= rec.title_or_default %> <%= l_local(rec.recorded_at_or_fallback) %> <%= rec.duration_label %> <%= rec.expires_at ? l_local(rec.expires_at) : "—" %> <%= rec.status_label %> <% if rec.replay_url %> <%= link_to "Guarda", rec.replay_url, target: "_blank", rel: "noopener" %> <% else %> — <% end %>

<%= link_to "Gestisci tutti i replay", public_club_recordings_path(team.club) %>

<% else %>

Nessun replay ancora. Al termine delle dirette Premium le registrazioni compaiono qui.

<% end %>
<% end %>