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
@@ -42,6 +42,10 @@
</header>
<div class="billing-pending-card__body">
<p style="margin:0 0 12px">
<%= t("admin.billing.index.transfers_table.holder") %>:
<strong><%= MatchLiveTv.bank_transfer_account_holder %></strong><br>
<%= t("admin.billing.index.transfers_table.iban") %>:
<strong><%= MatchLiveTv.bank_transfer_iban %></strong><br>
<%= t("admin.billing.index.transfers_table.causal") %>:
<strong><%= order.payment_causal %></strong>
</p>
+1 -1
View File
@@ -13,7 +13,7 @@
<script src="/admin-dashboard.js?v=1" defer></script>
<% end %>
<link rel="stylesheet" href="/confirm-forms.css?v=4">
<script src="/confirm-forms.js?v=6" defer></script>
<script src="/confirm-forms.js?v=7" defer></script>
</head>
<body class="<%= content_for?(:body_class) ? yield(:body_class) : 'admin-body' %>">
<header class="admin-header">
+1 -1
View File
@@ -23,7 +23,7 @@
<script src="/roster-form.js?v=1" defer></script>
<script src="/password-toggle.js?v=2" defer></script>
<link rel="stylesheet" href="/confirm-forms.css?v=4">
<script src="/confirm-forms.js?v=6" defer></script>
<script src="/confirm-forms.js?v=7" defer></script>
<script src="/cookie-consent.js?v=1" defer></script>
</body>
</html>
@@ -18,7 +18,7 @@
</main>
<%= render "shared/marketing_footer" %>
<link rel="stylesheet" href="/confirm-forms.css?v=4">
<script src="/confirm-forms.js?v=6" defer></script>
<script src="/confirm-forms.js?v=7" defer></script>
<script src="/cookie-consent.js?v=1" defer></script>
</body>
</html>
@@ -18,7 +18,7 @@
</div>
<% else %>
<% if @quote %>
<%= render "shared/quoted_price_banner", quote: @quote %>
<%= render "shared/quoted_price_banner", quote: @quote, subscription: @subscription %>
<% elsif MatchLiveTv.stripe_enabled? %>
<%= render "shared/stripe_secure_payment" %>
<% end %>
+2 -9
View File
@@ -24,15 +24,8 @@
[t("club.new.plan_free"), "free"],
[t("club.new.plan_light"), "premium_light"],
[t("club.new.plan_full"), "premium_full"]
], params[:plan] || "free"), id: "club_plan_select" %>
<div id="club_plan_interval" style="margin-top:10px">
<%= label_tag :interval, t("club.new.interval_label") %>
<%= select_tag :interval, options_for_select([
[t("club.new.interval_yearly"), "yearly"],
[t("club.new.interval_monthly"), "monthly"]
], params[:interval] || "yearly") %>
</div>
<%= render "shared/stripe_secure_payment", compact: true %>
], params[:plan] || "free") %>
<p class="muted" style="margin:8px 0 16px"><%= t("club.new.plan_hint") %></p>
<%= submit_tag t("club.new.submit"), class: "btn btn-primary" %>
<% end %>
</div>
@@ -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">
@@ -1,15 +1,10 @@
<%# locals: (order:) %>
<% return if order.blank? %>
<div class="card" style="margin-top:16px;border-color:#3d3520;background:#1a1810">
<p style="margin:0 0 8px;color:#ddd">
<p style="margin:0;color:#ddd">
<strong><%= t("billing.bank_transfer.pending_title") %></strong>
<%= raw t("billing.bank_transfer.pending_body_html",
plan: order.plan.name,
price: order.price_label,
causal: order.payment_causal) %>
</p>
<p style="margin:0;color:#aaa;font-size:0.9rem">
<%= raw t("billing.bank_transfer.pending_proof_html",
email_link: mail_to(MatchLiveTv.bank_transfer_proof_email, MatchLiveTv.bank_transfer_proof_email)) %>
price: order.price_label) %>
</p>
</div>
@@ -109,7 +109,7 @@
public_club_billing_bank_transfer_path(club, plan: plan.slug, interval: interval),
method: :post,
class: "btn btn-outline plan-interval-btn",
form: { data: { turbo_confirm: t("billing.bank_transfer.hint") } } %>
form: { data: { turbo_confirm: t("billing.bank_transfer.confirm") } } %>
<% end %>
</div>
<p class="plan-action-hint" style="margin-top:8px"><%= t("billing.bank_transfer.hint") %></p>
@@ -1,11 +1,19 @@
<%# locals: (quote:) %>
<%# locals: (quote:, subscription: nil) %>
<% return if quote.blank? %>
<% quoted_plan_active = current_paid_plan?(subscription, quote.plan) %>
<div class="card" style="margin-top:16px;border-color:#2e5a3c;background:#142018">
<p style="margin:0;color:#ddd">
<strong><%= t("billing.bank_transfer.quote_banner_title") %></strong>
<%= raw t("billing.bank_transfer.quote_banner_body_html", plan: quote.plan.name, price: quote.price_label) %>
<% if quoted_plan_active %>
<strong><%= t("billing.bank_transfer.quote_banner_active_title") %></strong>
<%= raw t(
"billing.bank_transfer.quote_banner_active_body_html",
plan: quote.plan.name,
price: quote.price_label,
date: subscription&.current_period_end.present? ? l_local(subscription.current_period_end.to_date) : t("billing.subscription_status.end_of_period")
) %>
<% else %>
<strong><%= t("billing.bank_transfer.quote_banner_title") %></strong>
<%= raw t("billing.bank_transfer.quote_banner_body_html", plan: quote.plan.name, price: quote.price_label) %>
<% end %>
</p>
<% if quote.note.present? %>
<p style="margin:8px 0 0;color:#aaa;font-size:0.9rem"><%= t("billing.bank_transfer.quote_note", note: quote.note) %></p>
<% end %>
</div>