mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 07:09:39 +02:00
* Start tests rework * Cash balance on schema * Add reverse syncer * Reverse balance sync with holdings * Reverse holdings sync * Reverse holdings sync should work with only trade entries * Consolidate brokerage cash * Add forward sync option * Update new balance info after syncs * Intraday balance calculator and sync fixes * Show only balance for trade entries * Tests passing * Update Gemfile.lock * Cleanup, performance improvements * Remove account reloads for reliable sync outputs * Simplify valuation view logic * Special handling for Plaid cash holding
25 lines
1 KiB
Text
25 lines
1 KiB
Text
<%# locals: (account:, title: nil, tooltip: nil, **args) %>
|
|
|
|
<% period = Period.from_param(params[:period]) %>
|
|
<% default_value_title = account.asset? ? t(".balance") : t(".owed") %>
|
|
|
|
<div id="<%= dom_id(account, :chart) %>" class="bg-white shadow-xs rounded-xl border border-alpha-black-25 rounded-lg space-y-2">
|
|
<div class="flex justify-between px-4 pt-4 mb-2">
|
|
<div class="space-y-2">
|
|
<div class="flex items-center gap-1">
|
|
<%= tag.p title || default_value_title, class: "text-sm font-medium text-gray-500" %>
|
|
<%= tooltip %>
|
|
</div>
|
|
|
|
<%= tag.p format_money(account.balance_money), class: "text-gray-900 text-3xl font-medium" %>
|
|
</div>
|
|
|
|
<%= form_with url: request.path, method: :get, data: { controller: "auto-submit-form" } do |form| %>
|
|
<%= period_select form: form, selected: period.name %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= turbo_frame_tag dom_id(account, :chart_details), src: chart_account_path(account, period: period.name) do %>
|
|
<%= render "accounts/chart_loader" %>
|
|
<% end %>
|
|
</div>
|