diff --git a/backend/app/controllers/admin/billing_controller.rb b/backend/app/controllers/admin/billing_controller.rb new file mode 100644 index 0000000..d81a666 --- /dev/null +++ b/backend/app/controllers/admin/billing_controller.rb @@ -0,0 +1,7 @@ +module Admin + class BillingController < BaseController + def index + @clubs = Club.order(:name).includes(:billing_payments, :billing_invoices) + end + end +end diff --git a/backend/app/views/admin/billing/index.html.erb b/backend/app/views/admin/billing/index.html.erb new file mode 100644 index 0000000..6ba831a --- /dev/null +++ b/backend/app/views/admin/billing/index.html.erb @@ -0,0 +1,31 @@ +
+ Elenco società: pagamenti da Stripe e fatture PDF da emettere o inviare al cliente. +
+ +| Società | +Pagamenti | +Fatture | ++ |
|---|---|---|---|
| <%= club.name %> | +<%= club.billing_payments.size %> | +<%= club.billing_invoices.size %> | +<%= link_to "Apri", admin_club_billing_invoices_path(club), class: "admin-btn admin-btn--sm" %> | +
Nessuna società registrata.
+<% end %> + +<%= link_to "← Dashboard", admin_root_path %>
diff --git a/backend/app/views/admin/teams/index.html.erb b/backend/app/views/admin/teams/index.html.erb index 41a8b65..68e15bd 100644 --- a/backend/app/views/admin/teams/index.html.erb +++ b/backend/app/views/admin/teams/index.html.erb @@ -1,12 +1,20 @@| Nome | Sport | YouTube | ||
|---|---|---|---|---|
| Nome | Società | Sport | YouTube | Fatture |
| <%= link_to t.name, admin_team_path(t) %> | +<%= t.club&.name || "—" %> | <%= t.sport %> | <%= t.youtube_credential.present? ? "✓" : "—" %> | ++ <% if t.club %> + <%= link_to "Pagamenti", admin_club_billing_invoices_path(t.club) %> + <% else %> + — + <% end %> + |