Ultima correção antes de colocar em produção
This commit is contained in:
@@ -8,9 +8,11 @@ module Motorista
|
|||||||
nome = current_user.nome
|
nome = current_user.nome
|
||||||
|
|
||||||
# Card 1 — Valor ESTIMADO (mês atual): entregas pagas × preco_entrega
|
# Card 1 — Valor ESTIMADO (mês atual): entregas pagas × preco_entrega
|
||||||
|
@estimado_inicio = Date.current.beginning_of_month
|
||||||
|
@estimado_fim = Date.current
|
||||||
entregas_mes = Entrega.pagas.da_conta_gade
|
entregas_mes = Entrega.pagas.da_conta_gade
|
||||||
.do_motorista(nome)
|
.do_motorista(nome)
|
||||||
.no_periodo(Date.current.beginning_of_month, Date.current)
|
.no_periodo(@estimado_inicio, @estimado_fim)
|
||||||
.count
|
.count
|
||||||
@valor_estimado = entregas_mes * Configuracao.preco_entrega
|
@valor_estimado = entregas_mes * Configuracao.preco_entrega
|
||||||
@entregas_mes = entregas_mes
|
@entregas_mes = entregas_mes
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
<%# Card 1 — Valor Estimado (LARANJA) %>
|
<%# Card 1 — Valor Estimado (LARANJA) %>
|
||||||
<div class="bg-orange-500 rounded-2xl p-6">
|
<div class="bg-orange-500 rounded-2xl p-6">
|
||||||
<p class="text-black/80 font-bold uppercase tracking-wide">💰 Valor estimado deste mês</p>
|
<p class="text-black/80 font-bold uppercase tracking-wide">💰 Valor estimado deste mês</p>
|
||||||
|
<p class="text-black/70 text-sm mt-1">📅 <%= l @estimado_inicio, format: :short %> a <%= l @estimado_fim, format: :short %></p>
|
||||||
<p class="text-black font-black text-4xl sm:text-5xl mt-2 leading-tight whitespace-nowrap"><%= moeda(@valor_estimado) %></p>
|
<p class="text-black font-black text-4xl sm:text-5xl mt-2 leading-tight whitespace-nowrap"><%= moeda(@valor_estimado) %></p>
|
||||||
<p class="text-black/80 text-base mt-2">
|
<p class="text-black/80 text-base mt-2">
|
||||||
<%= @entregas_mes %> entregas feitas e confirmadas
|
<%= @entregas_mes %> entregas feitas e confirmadas
|
||||||
|
|||||||
Reference in New Issue
Block a user