Files
sure/app/views/holdings/_cash.html.erb
Zach Gollwitzer ab6fdbbb68 Component namespacing (#2463)
* [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:23 EDT

* [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:30 EDT

* Update stimulus controller references to use namespace

* Fix remaining tests
2025-07-18 08:30:00 -04:00

39 lines
1.1 KiB
Plaintext

<%# locals: (account:) %>
<% currency = Money::Currency.new(account.currency) %>
<div class="grid grid-cols-12 items-center text-primary text-sm font-medium p-4">
<div class="col-span-4 flex items-center gap-4">
<%= render DS::FilledIcon.new(
variant: :text,
text: currency.symbol,
rounded: true,
size: "lg"
) %>
<div class="space-y-0.5">
<%= tag.p t(".brokerage_cash"), class: "text-primary" %>
<%= tag.p account.currency, class: "text-secondary text-xs uppercase" %>
</div>
</div>
<div class="col-span-2 flex justify-end items-center gap-2">
<% cash_weight = account.balance.zero? ? 0 : account.cash_balance / account.balance * 100 %>
<%= render "shared/progress_circle", progress: cash_weight %>
<%= tag.p number_to_percentage(cash_weight, precision: 1) %>
</div>
<div class="col-span-2 text-right">
<%= tag.p "--", class: "text-secondary" %>
</div>
<div class="col-span-2 text-right">
<%= tag.p format_money account.cash_balance_money %>
</div>
<div class="col-span-2 text-right">
<%= tag.p "--", class: "text-secondary" %>
</div>
</div>