Billing upgrade/downgrade, inviti in app e diretta YouTube da mobile.

Upgrade Stripe con addebito immediato; downgrade programmato a fine periodo.
UX billing più sobria con box info; icone piani. API inviti e OAuth YouTube
per staff trasmissione; deep link join; scelta partita programmata o nuova.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 22:15:27 +02:00
parent 2cb267f991
commit 566104aff4
49 changed files with 1615 additions and 173 deletions

View File

@@ -6,6 +6,9 @@
<%= render "shared/club_subscription_status", club: @club, entitlements: @entitlements, subscription: @subscription, on_billing_page: true %>
<%= render "shared/stripe_secure_payment" %>
<% if MatchLiveTv.stripe_enabled? %>
<%= render "shared/plan_change_info", subscription: @subscription %>
<% end %>
<%= render "shared/plan_cards", show_stripe_portal: false %>
<%= render "shared/subscription_cancel", club: @club, subscription: @subscription %>

View File

@@ -5,10 +5,17 @@
<div class="card" style="max-width:480px">
<h1>Accesso staff — <%= @invitation.team.name %></h1>
<p>Sei stato aggiunto come <strong>responsabile trasmissione</strong> (<%= @invitation.email %>).</p>
<p class="muted" style="font-size:0.9rem;margin-bottom:16px">
Nellapp Match Live TV accedi con <strong><%= @invitation.email %></strong>, accetta linvito e collega il tuo canale YouTube.
</p>
<% if logged_in? %>
<%= button_to "Accetta invito", public_invitation_path(token: @token), method: :post, class: "btn btn-primary" %>
<% else %>
<p><%= link_to "Accedi", public_login_path %> o <%= link_to "registrati", public_signup_path %> con <%= @invitation.email %>.</p>
<%= button_to "Accetta (se già loggato)", public_invitation_path(token: @token), method: :post, class: "btn btn-secondary" %>
<% end %>
<p style="margin-top:16px;font-size:0.88rem;color:#888">
App mobile:
<a href="matchlivetv://join/<%= @token %>">Apri invito nellapp</a>
</p>
</div>

View File

@@ -8,7 +8,7 @@
<div class="plans">
<% @plans.each do |plan| %>
<div class="plan-card">
<h3><%= plan.name %></h3>
<%= render "shared/plan_title", plan: plan %>
<% if plan.slug == "free" %>
<div class="plan-price">€0</div>
<% elsif plan.slug == "premium_light" %>
@@ -27,7 +27,6 @@
<% if plan.slug == @entitlements.plan.slug %>
<span class="btn btn-secondary" style="opacity:0.7">Piano attuale</span>
<% elsif plan.slug == "free" %>
<p style="color:#888;font-size:0.85rem">Contatta il supporto per downgrade.</p>
<% elsif MatchLiveTv.stripe_enabled? %>
<%= link_to "Gestisci abbonamento società", public_club_billing_path(@team.club), class: "btn btn-primary" %>
<% else %>