Imṕlantação do dash board de acompanhamento diario das entregas

This commit is contained in:
2026-06-29 20:04:32 -03:00
parent 16032be620
commit 11531479f8
35 changed files with 848 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<%# locals: cabecalhos (Array), linhas (Array de Array), vazio (String), total (opcional) %>
<% total_rodape = local_assigns[:total] %>
<% if linhas.blank? %>
<p class="text-center py-6 text-gray-500 text-sm"><%= vazio %></p>
<% else %>
<table class="w-full text-sm">
<thead>
<tr class="text-gray-400 text-left border-b border-white/5">
<% cabecalhos.each_with_index do |c, i| %>
<th class="pb-2 font-medium <%= 'text-right' if i.positive? %>"><%= c %></th>
<% end %>
</tr>
</thead>
<tbody>
<% linhas.each do |celulas| %>
<tr class="border-b border-white/5">
<% celulas.each_with_index do |cel, i| %>
<td class="py-2 <%= i.positive? ? 'text-right font-semibold text-white' : 'text-gray-300' %>"><%= cel %></td>
<% end %>
</tr>
<% end %>
</tbody>
<% if total_rodape %>
<tfoot>
<tr class="text-white font-bold">
<td class="pt-2">Total</td>
<td class="pt-2 text-right" colspan="<%= cabecalhos.size - 1 %>"><%= total_rodape %></td>
</tr>
</tfoot>
<% end %>
</table>
<% end %>