mirror of
https://github.com/we-promise/sure.git
synced 2026-04-28 00:14:23 +00:00
Balance sheet cache layer, non-blocking sync UI (#2356)
* Balance sheet cache layer with cache-busting * Update family cache timestamps during Sync * Less blocking sync loaders * Consolidate family data caching key logic * Fix turbo stream broadcasts * Remove dev delay * Add back account group sorting
This commit is contained in:
@@ -17,9 +17,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 flex justify-end items-center gap-2">
|
||||
<% if holding.account.syncing? %>
|
||||
<div class="w-16 h-6 bg-loader rounded-full"></div>
|
||||
<% elsif holding.weight %>
|
||||
<% if holding.weight %>
|
||||
<%= render "shared/progress_circle", progress: holding.weight %>
|
||||
<%= tag.p number_to_percentage(holding.weight, precision: 1) %>
|
||||
<% else %>
|
||||
@@ -28,39 +26,21 @@
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 text-right">
|
||||
<% if holding.account.syncing? %>
|
||||
<div class="flex justify-end">
|
||||
<div class="w-16 h-6 bg-loader rounded-full"></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= tag.p format_money holding.avg_cost %>
|
||||
<%= tag.p t(".per_share"), class: "font-normal text-secondary" %>
|
||||
<% end %>
|
||||
<%= tag.p format_money holding.avg_cost %>
|
||||
<%= tag.p t(".per_share"), class: "font-normal text-secondary" %>
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 text-right">
|
||||
<% if holding.account.syncing? %>
|
||||
<div class="flex flex-col gap-2 items-end">
|
||||
<div class="w-16 h-4 bg-loader rounded-full"></div>
|
||||
<div class="w-16 h-2 bg-loader rounded-full"></div>
|
||||
</div>
|
||||
<% if holding.amount_money %>
|
||||
<%= tag.p format_money holding.amount_money %>
|
||||
<% else %>
|
||||
<% if holding.amount_money %>
|
||||
<%= tag.p format_money holding.amount_money %>
|
||||
<% else %>
|
||||
<%= tag.p "--", class: "text-secondary" %>
|
||||
<% end %>
|
||||
<%= tag.p t(".shares", qty: number_with_precision(holding.qty, precision: 1)), class: "font-normal text-secondary" %>
|
||||
<%= tag.p "--", class: "text-secondary" %>
|
||||
<% end %>
|
||||
<%= tag.p t(".shares", qty: number_with_precision(holding.qty, precision: 1)), class: "font-normal text-secondary" %>
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 text-right">
|
||||
<% if holding.account.syncing? %>
|
||||
<div class="flex flex-col gap-2 items-end">
|
||||
<div class="w-16 h-4 bg-loader rounded-full"></div>
|
||||
<div class="w-16 h-2 bg-loader rounded-full"></div>
|
||||
</div>
|
||||
<% elsif holding.trend %>
|
||||
<% if holding.trend %>
|
||||
<%= tag.p format_money(holding.trend.value), style: "color: #{holding.trend.color};" %>
|
||||
<%= tag.p "(#{number_to_percentage(holding.trend.percent, precision: 1)})", style: "color: #{holding.trend.color};" %>
|
||||
<% else %>
|
||||
|
||||
Reference in New Issue
Block a user