Mostra in admin anagrafica e dati fiscali delle società.
Così Ops può emettere fattura dalla scheda club senza cercare il profilo solo tra i pagamenti pending. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<% owner = club.owner %>
|
||||
<% status = club.billing_profile_admin_status %>
|
||||
<% lines = club.billing_profile_invoice_lines.select { |_label, value| value.present? } %>
|
||||
|
||||
<section class="panel admin-club-profile" style="margin:16px 0 24px">
|
||||
<h3 style="font-size:1rem;margin:0 0 12px"><%= t("admin.clubs.show.profile_title") %></h3>
|
||||
|
||||
<h4 style="font-size:0.9rem;margin:0 0 8px;color:var(--muted)"><%= t("admin.clubs.show.owner_title") %></h4>
|
||||
<% if owner %>
|
||||
<dl class="billing-profile-dl" style="margin-bottom:16px">
|
||||
<dt><%= t("admin.clubs.show.owner_name") %></dt>
|
||||
<dd><%= owner.name %></dd>
|
||||
<dt><%= t("admin.clubs.show.owner_email") %></dt>
|
||||
<dd><%= mail_to owner.email %></dd>
|
||||
</dl>
|
||||
<% else %>
|
||||
<p class="muted" style="margin:0 0 16px"><%= t("admin.clubs.show.owner_none") %></p>
|
||||
<% end %>
|
||||
|
||||
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px">
|
||||
<h4 style="font-size:0.9rem;margin:0;color:var(--muted)"><%= t("admin.clubs.show.billing_title") %></h4>
|
||||
<span class="admin-billing-status admin-billing-status--<%= status %>">
|
||||
<%= t("admin.clubs.billing_status.#{status}") %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<% if status == :absent || lines.empty? %>
|
||||
<p class="muted" style="margin:0"><%= t("admin.clubs.show.billing_none") %></p>
|
||||
<% else %>
|
||||
<dl class="billing-profile-dl">
|
||||
<% lines.each do |label, value| %>
|
||||
<dt><%= label %></dt>
|
||||
<dd><%= value %></dd>
|
||||
<% end %>
|
||||
</dl>
|
||||
<% end %>
|
||||
|
||||
<% if status == :incomplete %>
|
||||
<ul class="muted" style="margin:12px 0 0;padding-left:1.2rem;font-size:0.88rem">
|
||||
<% club.billing_profile_errors.each do |message| %>
|
||||
<li><%= message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</section>
|
||||
@@ -9,6 +9,7 @@
|
||||
<th><%= t("admin.clubs.index.table.club") %></th>
|
||||
<th><%= t("admin.clubs.index.table.plan") %></th>
|
||||
<th><%= t("admin.clubs.index.table.teams") %></th>
|
||||
<th><%= t("admin.clubs.index.table.billing_profile") %></th>
|
||||
<th><%= t("admin.clubs.index.table.comped") %></th>
|
||||
<th><%= t("admin.clubs.index.table.stripe") %></th>
|
||||
<th><%= t("admin.clubs.index.table.quote") %></th>
|
||||
@@ -18,10 +19,16 @@
|
||||
<tbody>
|
||||
<% @clubs.each do |club| %>
|
||||
<% sub = club.subscription %>
|
||||
<% billing_status = club.billing_profile_admin_status %>
|
||||
<tr>
|
||||
<td><strong><%= club.name %></strong></td>
|
||||
<td><%= sub&.plan&.name || t("admin.common.free_plan") %></td>
|
||||
<td><%= club.teams.size %></td>
|
||||
<td>
|
||||
<span class="admin-billing-status admin-billing-status--<%= billing_status %>">
|
||||
<%= t("admin.clubs.billing_status.#{billing_status}") %>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<% if sub&.admin_comped? %>
|
||||
<span style="color:#ffb74d"><%= t("admin.common.yes") %></span>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
· <%= link_to t("admin.clubs.show.youtube_platform_link"), admin_youtube_platform_path %>
|
||||
</p>
|
||||
|
||||
<%= render "admin/clubs/billing_profile", club: @club %>
|
||||
|
||||
<%= render "admin/clubs/comped_form", club: @club, subscription: @subscription, return_to: admin_club_path(@club) %>
|
||||
<%= render "admin/clubs/quote_form", club: @club, quote: @quote, return_to: admin_club_path(@club) %>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<%= csrf_meta_tags %>
|
||||
<link rel="stylesheet" href="/admin.css?v=19">
|
||||
<link rel="stylesheet" href="/admin.css?v=20">
|
||||
<%= yield :head %>
|
||||
<% if content_for?(:replay_archive_styles) %>
|
||||
<link rel="stylesheet" href="/marketing.css?v=42">
|
||||
|
||||
Reference in New Issue
Block a user