2024-04-18 10:32:36 -04:00
|
|
|
<%# locals: { trend: } %>
|
2024-10-07 16:20:36 -04:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<p class="text-sm" style="color: <%= trend.color %>">
|
2024-04-22 06:30:42 -06:00
|
|
|
<% if trend.direction.flat? %>
|
2024-03-06 09:56:59 -05:00
|
|
|
<span>No change</span>
|
|
|
|
<% else %>
|
2025-02-25 17:28:40 -05:00
|
|
|
<span class="font-mono">
|
2025-02-21 11:57:59 -05:00
|
|
|
<%= trend.value.is_a?(Money) ? format_money(trend.value) : trend.value.round(2) %>
|
|
|
|
</span>
|
2024-10-07 16:20:36 -04:00
|
|
|
<% unless trend.percent.infinite? %>
|
2025-02-25 17:28:40 -05:00
|
|
|
<span class="font-mono">(<%= lucide_icon(trend.icon, class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent_formatted %>)</span>
|
2024-10-07 16:20:36 -04:00
|
|
|
<% end %>
|
2024-03-06 09:56:59 -05:00
|
|
|
<% end %>
|
2024-04-09 16:08:58 +04:00
|
|
|
</p>
|