1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-07 14:35:23 +02:00

Checkpoint

This commit is contained in:
Zach Gollwitzer 2025-07-08 10:25:16 -04:00
parent 15f8d827b5
commit b7acef1e7a
9 changed files with 56 additions and 23 deletions

View file

@ -1,10 +1,12 @@
<%# locals: (account:, url:) %>
<% if @error_message.present? %>
<%= render AlertComponent.new(message: @error_message, variant: :error) %>
<div class="mb-4">
<%= render AlertComponent.new(message: @error_message, variant: :error) %>
</div>
<% end %>
<%= styled_form_with model: account, url: url, scope: :account, data: { turbo: false }, class: "flex flex-col gap-4 justify-between grow text-primary" do |form| %>
<%= styled_form_with model: account, url: url, scope: :account, class: "flex flex-col gap-4 justify-between grow text-primary" do |form| %>
<div class="grow space-y-2">
<%= form.hidden_field :accountable_type %>
<%= form.hidden_field :return_to, value: params[:return_to] %>
@ -12,7 +14,19 @@
<%= form.text_field :name, placeholder: t(".name_placeholder"), required: "required", label: t(".name_label") %>
<% unless account.linked? %>
<%= form.money_field :balance, label: t(".balance"), required: true, default_currency: Current.family.currency %>
<%= form.money_field :balance,
label: t(".balance"),
required: true,
default_currency: Current.family.currency,
label_tooltip: "The current balance or value of the account, which is typically the balance reported by your financial institution." %>
<% unless account.persisted? %>
<%= form.date_field :tracking_start_date,
label: "Tracking start date",
required: true,
value: 2.years.ago.to_date,
label_tooltip: "The date we will start tracking the balance for this account. If you're not sure, we recommend using the default of 2 years ago so net worth graphs have adequate historical data." %>
<% end %>
<% end %>
<%= yield form %>