2024-04-18 10:32:36 -04:00
|
|
|
<%# locals: { trend: } %>
|
2024-10-07 16:20:36 -04:00
|
|
|
|
2024-03-06 09:56:59 -05:00
|
|
|
<% styles = trend_styles(trend) %>
|
2024-10-07 16:20:36 -04:00
|
|
|
|
2024-03-06 09:56:59 -05:00
|
|
|
<p class="text-sm <%= styles[:text_class] %>">
|
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 %>
|
2024-04-24 15:02:22 +01:00
|
|
|
<span><%= styles[:symbol] %><%= trend.value.is_a?(Money) ? format_money(trend.value.abs) : trend.value.abs.round(2) %></span>
|
2024-10-07 16:20:36 -04:00
|
|
|
<% unless trend.percent.infinite? %>
|
|
|
|
<span>(<%= lucide_icon(styles[:icon], class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent.abs %>%)</span>
|
|
|
|
<% end %>
|
2024-03-06 09:56:59 -05:00
|
|
|
<% end %>
|
2024-04-09 16:08:58 +04:00
|
|
|
</p>
|