1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 13:35:21 +02:00

Show cash + holdings value for investment account view (#1046)

* Handle missing tickers in security price syncs

* Show combined cash and holdings value on account page

* Improve partial locals
This commit is contained in:
Zach Gollwitzer 2024-08-02 17:09:25 -04:00 committed by GitHub
parent 453a54e5e6
commit ea8309eedd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 168 additions and 33 deletions

View file

@ -53,13 +53,13 @@
<div class="p-4 flex justify-between">
<div class="space-y-2">
<%= tag.p t(".total_value"), class: "text-sm font-medium text-gray-500" %>
<%= tag.p format_money(@account.balance_money, precision: 0), class: "text-gray-900 text-3xl font-medium" %>
<%= tag.p format_money(@account.value, precision: 0), class: "text-gray-900 text-3xl font-medium" %>
<div>
<% if @balance_series.trend.direction.flat? %>
<% if @series.trend.direction.flat? %>
<%= tag.span t(".no_change"), class: "text-gray-500" %>
<% else %>
<%= tag.span format_money(@balance_series.trend.value), style: "color: #{@balance_series.trend.color}" %>
<%= tag.span "(#{@balance_series.trend.percent}%)", style: "color: #{@balance_series.trend.color}" %>
<%= tag.span format_money(@series.trend.value), style: "color: #{@trend.color}" %>
<%= tag.span "(#{@trend.percent}%)", style: "color: #{@trend.color}" %>
<% end %>
<%= tag.span period_label(@period), class: "text-gray-500" %>
@ -70,7 +70,7 @@
<% end %>
</div>
<div class="h-96 flex items-center justify-center text-2xl font-bold">
<%= render partial: "shared/line_chart", locals: { series: @balance_series } %>
<%= render partial: "shared/line_chart", locals: { series: @series } %>
</div>
</div>