asxpio/views/admin/_nav.erb
Sergei Poljanski c2020bf903
admin: dashboard instead of the invoice list
/admin redirected to the invoice list, which stopped making sense once
the admin also ran the bingo. Make it a dashboard with one tile per
area: invoice totals, outstanding amount per currency, overdue count and
the five latest invoices; the bingo score, reserve size, latest incident
and card cells still missing a photo. A shared nav links the sections.
Tiles are per area so they can follow user permissions later.

Assisted-by: Claude:opus-5
2026-10-10 08:23:14 +04:00

5 lines
314 B
Text

<nav class="admin-nav">
<% [['/admin', 'dashboard'], ['/admin/invoices', 'invoices'], ['/admin/bingo', 'bingo']].each do |href, label| %>
<a href="<%= href %>" class="<%= 'active' if href == '/admin' ? request.path == '/admin' : request.path.start_with?(href) %>"><%= label %></a>
<% end %>
</nav>