Implantação da função de controle de consolidaçoes pagas e pendentes
This commit is contained in:
@@ -6,6 +6,27 @@
|
||||
<h1 class="text-2xl font-bold text-white mb-1">Olá, <%= current_user.nome.split.first %>! 👋</h1>
|
||||
<p class="text-gray-400 mb-6">Aqui estão seus valores de entregas.</p>
|
||||
|
||||
<%# ── Aviso de pagamento recém-confirmado ───────────────── %>
|
||||
<% if @pagamentos_recentes.any? %>
|
||||
<div class="bg-green-600/15 border border-green-600/40 rounded-2xl p-5 mb-6">
|
||||
<p class="text-green-400 font-bold text-sm uppercase tracking-wide mb-2">✅ Pagamento confirmado!</p>
|
||||
<div class="space-y-2">
|
||||
<% @pagamentos_recentes.each do |cm| %>
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-1">
|
||||
<p class="text-white text-sm">
|
||||
Você recebeu <span class="font-black text-green-400"><%= moeda(cm.valor_total) %></span>
|
||||
pela consolidação <span class="font-semibold"><%= cm.consolidacao.nome %></span>
|
||||
</p>
|
||||
<p class="text-gray-400 text-xs">
|
||||
💰 <%= l cm.pago_em.to_date, format: :short %>
|
||||
<% if cm.forma_pagamento.present? %>· <%= cm.forma_pagamento.humanize %><% end %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%# ── 2 Cards grandes ─────────────────────────────────── %>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-8">
|
||||
|
||||
@@ -41,14 +62,23 @@
|
||||
<div class="bg-[#1a1a1a] border border-[#2a2a2a] rounded-xl p-5">
|
||||
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-3">
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex items-center gap-2 flex-wrap">
|
||||
<p class="text-white font-bold"><%= c.nome %></p>
|
||||
<%= badge_status(c.status) %>
|
||||
<% if c.finalizada? %>
|
||||
<%= badge_pagamento(cm&.pago? ? :pago : :pendente) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<p class="text-gray-400 text-sm mt-1">
|
||||
📅 <%= l c.data_inicio, format: :short %> a <%= l c.data_fim, format: :short %>
|
||||
</p>
|
||||
<p class="text-orange-500 font-black text-xl mt-1"><%= moeda(cm&.valor_total || 0) %></p>
|
||||
<% if cm&.pago? %>
|
||||
<p class="text-green-400 text-xs mt-1">
|
||||
💰 Pago em <%= l cm.pago_em.to_date, format: :short %>
|
||||
<% if cm.forma_pagamento.present? %>via <%= cm.forma_pagamento.humanize %><% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if c.finalizada? %>
|
||||
<%= link_to '⬇️ Baixar meu holerite',
|
||||
|
||||
Reference in New Issue
Block a user