Billing Stripe, link regia mobile e staff solo trasmissione.

Aggiunge fatturazione club, pagina regia condivisibile senza account, roster squadre e rimuove la modalità controller dall'app (v1.1.0).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 07:23:13 +02:00
parent 4083bc5dee
commit f4b7be0f80
156 changed files with 5033 additions and 2033 deletions

View File

@@ -0,0 +1,4 @@
<%= form_with model: @match, url: form_url, method: form_method do %>
<%= render "schedule_fields", match: @match %>
<%= submit_tag submit_label, class: "btn btn-primary", style: "margin-top:20px" %>
<% end %>

View File

@@ -0,0 +1,13 @@
<%= label_tag "match[opponent_name]", "Avversario" %>
<%= text_field_tag "match[opponent_name]", match.opponent_name, required: true, placeholder: "es. Volley Milano" %>
<%= label_tag "match[location]", "Luogo (opzionale)" %>
<%= text_field_tag "match[location]", match.location, placeholder: "Palestra, città" %>
<%= label_tag "match[scheduled_at]", "Data e ora" %>
<% scheduled_value = match.scheduled_at&.in_time_zone&.strftime("%Y-%m-%dT%H:%M") %>
<%= datetime_local_field_tag "match[scheduled_at]", scheduled_value, required: true %>
<p style="color:#888;font-size:0.88rem;margin:12px 0 0">
La diretta non parte da sola: comparirà in app e sul sito. Avvierai lo streaming dal telefono quando sei in campo.
</p>

View File

@@ -0,0 +1,14 @@
<% content_for :title, "Modifica partita — #{@team.name}" %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:560px">
<h1>Modifica partita</h1>
<p style="color:#888"><%= @team.name %> vs <strong><%= @match.opponent_name %></strong></p>
<div class="card" style="margin-top:16px">
<%= render "form",
form_url: public_team_match_path(@team, @match),
form_method: :patch,
submit_label: "Salva modifiche" %>
</div>
<p style="margin-top:16px"><%= link_to "← Elenco partite", public_team_matches_path(@team) %></p>
</div>

View File

@@ -0,0 +1,77 @@
<% content_for :title, "Partite — #{@team.name}" %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:720px">
<nav class="team-dashboard-nav" aria-label="Percorso">
<%= link_to "← #{@team.name}", public_team_details_path(@team), class: "team-dashboard-nav__club" %>
</nav>
<header style="margin:16px 0 20px">
<h1>Partite — <%= @team.name %></h1>
<p style="color:#888;margin-top:8px">
Programma qui da PC data, avversario e luogo. Quando sei in palestra apri lapp Match Live TV,
seleziona questa squadra e avvia la diretta sulla partita.
</p>
</header>
<div style="display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px">
<%= link_to "Programma partita", new_public_team_match_path(@team), class: "btn btn-primary" %>
<%= link_to "Dettagli squadra", public_team_details_path(@team), class: "btn btn-secondary" %>
<%= link_to "Dirette e programma", public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
</div>
<div class="card">
<% if @matches.any? %>
<table class="data">
<thead>
<tr>
<th>Avversario</th>
<th>Data e ora</th>
<th>Luogo</th>
<th>Stato</th>
<th></th>
</tr>
</thead>
<tbody>
<% @matches.each do |match| %>
<tr>
<td><strong><%= match.opponent_name %></strong></td>
<td>
<% if match.scheduled_at %>
<%= l match.scheduled_at.in_time_zone, format: :long %>
<% else %>
<span style="color:#888">Senza orario</span>
<% end %>
</td>
<td><%= match.location.presence || "—" %></td>
<td>
<% label = match.public_status_label %>
<% if label == "In corso / da riprendere" %>
<span style="color:#e53935;font-weight:600"><%= label %></span>
<% else %>
<%= label %>
<% end %>
</td>
<td style="white-space:nowrap">
<%= link_to "Modifica", edit_public_team_match_path(@team, match) %>
<% if match.deletable? %>
·
<%= button_to "Elimina", public_team_match_path(@team, match),
method: :delete,
form: { data: { turbo_confirm: "Eliminare questa partita?" } },
class: "btn btn-secondary",
style: "padding:4px 10px;font-size:0.8rem;display:inline" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p style="color:#888;margin:0">
Nessuna partita in calendario.
<%= link_to "Programma la prima", new_public_team_match_path(@team) %>.
</p>
<% end %>
</div>
</div>

View File

@@ -0,0 +1,14 @@
<% content_for :title, "Programma partita — #{@team.name}" %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:560px">
<h1>Programma partita</h1>
<p style="color:#888"><%= @club.name %> · <strong><%= @team.name %></strong></p>
<div class="card" style="margin-top:16px">
<%= render "form",
form_url: public_team_matches_path(@team),
form_method: :post,
submit_label: "Salva in programma" %>
</div>
<p style="margin-top:16px"><%= link_to "← Elenco partite", public_team_matches_path(@team) %></p>
</div>