- Handle blank series in trend method to avoid nil errors (#357)

- Add Turbo Stream rendering for SimpleFIN items to address missing content
- Update dashboard view to render correctly when trend data is unavailable

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
This commit is contained in:
LPW
2025-11-20 02:31:03 -05:00
committed by GitHub
parent 1234fd5568
commit 6decd6eaca
3 changed files with 19 additions and 8 deletions

View File

@@ -9,14 +9,13 @@
<h2 class="text-lg font-medium"><%= t(".title") %></h2>
</div>
<p class="text-primary -space-x-0.5 text-3xl font-medium <%= "animate-pulse" if balance_sheet.syncing? %>">
<%= series.trend.current.format %>
</p>
<% if series.trend.nil? %>
<p class="text-sm text-secondary"><%= t(".data_not_available") %></p>
<% else %>
<% if series.trend.present? %>
<p class="text-primary -space-x-0.5 text-3xl font-medium <%= "animate-pulse" if balance_sheet.syncing? %>">
<%= series.trend.current.format %>
</p>
<%= render partial: "shared/trend_change", locals: { trend: series.trend, comparison_label: period.comparison_label } %>
<% else %>
<p class="text-sm text-secondary"><%= t(".data_not_available") %></p>
<% end %>
</div>
</div>