feat: a Números tab with the production numbers the board already records

Every paid order and every move is recorded, but nobody could see the
totals. The new tab shows, for the last 7, 30 or 90 days: paid orders,
metres sold, money received, the average ticket, how many orders needed a
correction, and the median time from payment to Finalizado. A column per
day charts the metres sold (with a table under it), and a table gives each
stage's median time and what waits in it now, with the oldest order.
Test and cancelled orders stay out.

The header now has five tabs: the search box narrows first, the refresh
picker keeps its width, and the operator's e-mail moves to Sair's tooltip
on narrower screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-05 12:01:03 -03:00
parent f567e6da89
commit 1b445f0459
5 changed files with 183 additions and 10 deletions

View File

@@ -20,6 +20,7 @@
<button type="button" data-tab="board" aria-selected="true">Produção <span class="count" id="count-board"></span></button>
<button type="button" data-tab="quotes" aria-selected="false">Cotações <span class="badge" id="badge-quotes"></span></button>
<button type="button" data-tab="payments" aria-selected="false">Pagamentos <span class="badge warn" id="badge-payments"></span></button>
<button type="button" data-tab="stats" aria-selected="false">Números</button>
<button type="button" data-tab="integrations" aria-selected="false">Integrações</button>
</nav>
<div class="searchbox">
@@ -67,6 +68,15 @@
<h1>Pagamentos</h1>
<section id="payments"></section>
</section>
<section id="tab-stats" class="page" hidden>
<div class="pagehead"><h1>Números</h1><div class="statchips" id="stats-period"></div></div>
<p class="faint stats-note">Pedidos pagos no período. Pedidos de teste e cancelados ficam de fora.</p>
<div class="kpis" id="stats-kpis"></div>
<section class="statbox"><h2>Metros por dia</h2><div class="chart" id="stats-chart"></div></section>
<section class="statbox"><h2>Tempo em cada etapa</h2>
<table class="log"><thead><tr><th scope="col">Etapa</th><th scope="col">Tempo mediano</th><th scope="col">Pedidos que passaram</th><th scope="col">Agora</th></tr></thead><tbody id="stats-stages"></tbody></table>
</section>
</section>
<section id="tab-integrations" class="page" hidden>
<h1>Integrações</h1>
<section><div class="grid4" id="integrations"></div></section>