Mostra il piano attivo dopo il bonifico e allinea il flusso società.

Dopo la conferma admin la card restava su «Paga con bonifico»; la società parte da Free, l'owner è staff trasmissione e le mail non bloccano se manca SMTP.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-19 18:31:39 +02:00
co-authored by Cursor
parent e436f5ece4
commit 5bcb4170c7
31 changed files with 359 additions and 111 deletions
@@ -1,33 +1,33 @@
<% team = local_assigns[:team] %>
<% club = local_assigns[:club] %>
<% 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] %>
<% club_owner = club.owner %>
<% extra_staff = staff_memberships.reject { |ut| ut.user_id == club_owner&.id } %>
<section class="team-streaming-staff" id="responsabili-trasmissione">
<% if can_manage %>
<% if owner_membership&.staff_kind.blank? %>
<div class="card team-streaming-staff__self">
<h2><%= t("team.streaming_staff.self_account_heading", email: current_user.email) %></h2>
<p class="muted">
<%= raw t("team.streaming_staff.self_account_hint") %>
</p>
<div class="team-details-actions">
<%= button_to t("team.streaming_staff.self_assign_submit"), public_team_assign_self_staff_path(team), method: :post, params: { staff_kind: "transmission" }, class: "btn btn-primary" %>
</div>
</div>
<% end %>
<% if club_owner %>
<div class="card team-streaming-staff__self">
<h2><%= t("team.streaming_staff.principal_heading") %></h2>
<p>
<%= raw t("team.streaming_staff.principal_body_html", email: club_owner.email) %>
</p>
<p class="muted">
<%= raw t("team.streaming_staff.principal_score_hint_html") %>
</p>
</div>
<% end %>
<h2><%= t("team.streaming_staff.staff_heading") %></h2>
<div class="card">
<% if staff_memberships.any? %>
<% if extra_staff.any? %>
<h2><%= t("team.streaming_staff.extra_staff_heading") %></h2>
<div class="card">
<table class="data">
<thead><tr><th><%= t("team.streaming_staff.col_name") %></th><th><%= t("team.streaming_staff.col_email") %></th><th><%= t("team.streaming_staff.col_role") %></th><% if can_manage %><th></th><% end %></tr></thead>
<tbody>
<% staff_memberships.each do |ut| %>
<% extra_staff.each do |ut| %>
<tr>
<td>
<%= ut.user.name %>
@@ -37,9 +37,7 @@
<td><%= t("team.streaming_staff.role_transmission") %></td>
<% if can_manage %>
<td>
<% if ut.user_id == current_user.id && team.club.owned_by?(current_user) %>
<%= button_to t("team.streaming_staff.clear_self_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: t("team.streaming_staff.clear_self_staff_confirm"), confirm_kind: "delete" } } %>
<% elsif ut.role == "member" %>
<% if ut.role == "member" %>
<%= button_to t("team.streaming_staff.revoke"), 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: t("team.streaming_staff.revoke_confirm", name: ut.user.name), confirm_kind: "delete" } } %>
<% end %>
</td>
@@ -48,13 +46,8 @@
<% end %>
</tbody>
</table>
<% else %>
<p class="muted">
<%= t("team.streaming_staff.no_staff") %>
<% if can_manage %><%= link_to t("team.streaming_staff.invite_someone"), "#invita-trasmissione" %>.<% end %>
</p>
<% end %>
</div>
</div>
<% end %>
<% if can_manage %>
<div class="card team-invite-form" id="invita-trasmissione">