mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
Preference to set default_period (#1941)
This commit is contained in:
parent
372b64ffea
commit
26762477a3
12 changed files with 35 additions and 8 deletions
|
@ -1,5 +1,4 @@
|
|||
<% period = params[:period] ? Period.from_key(params[:period]) : Period.last_30_days %>
|
||||
<% series = @account.balance_series(period: period) %>
|
||||
<% series = @account.balance_series(period: @period) %>
|
||||
<% trend = series.trend %>
|
||||
|
||||
<%= turbo_frame_tag dom_id(@account, :chart_details) do %>
|
||||
|
@ -13,7 +12,7 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= tag.span period.comparison_label, class: "text-secondary" %>
|
||||
<%= tag.span @period.comparison_label, class: "text-secondary" %>
|
||||
</div>
|
||||
|
||||
<div class="h-64 pb-4">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%# locals: (account:, title: nil, tooltip: nil, **args) %>
|
||||
|
||||
<% period = params[:period] ? Period.from_key(params[:period]) : Period.last_30_days %>
|
||||
<% period = @period || Period.last_30_days %>
|
||||
<% 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">
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
{ label: t(".date_format") },
|
||||
{ data: { auto_submit_form_target: "auto" } } %>
|
||||
|
||||
<%= form.select :default_period,
|
||||
Period.all.map { |period| [ period.label, period.key ] },
|
||||
{ label: t(".default_period") },
|
||||
{ data: { auto_submit_form_target: "auto" } } %>
|
||||
|
||||
<%= family_form.select :country,
|
||||
country_options,
|
||||
{ label: t(".country") },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue