<%= render "onboardings/header" %>

<%= t(".title") %>

<%= t(".subtitle") %>

<%= tag.p t(".example"), class: "text-gray-500 text-sm" %> <%= tag.p "$2,323.25", class: "text-gray-900 font-medium text-2xl" %>

+<%= format_money(Money.new(78.90, params[:currency] || @user.family.currency)) %> (+<%= format_money(Money.new(6.39, params[:currency] || @user.family.currency)) %>) as of <%= format_date(Date.parse("2024-10-23"), :default, format_code: params[:date_format] || @user.family.date_format) %>

<% placeholder_series_data = [ { date: Date.current - 14.days, value: 200 }, { date: Date.current - 13.days, value: 200 }, { date: Date.current - 12.days, value: 220 }, { date: Date.current - 11.days, value: 220 }, { date: Date.current - 10.days, value: 220 }, { date: Date.current - 9.days, value: 220 }, { date: Date.current - 8.days, value: 220 }, { date: Date.current - 7.days, value: 220 }, { date: Date.current - 6.days, value: 230 }, { date: Date.current - 5.days, value: 230 }, { date: Date.current - 4.days, value: 250 }, { date: Date.current - 3.days, value: 250 }, { date: Date.current - 2.days, value: 265 }, { date: Date.current - 1.day, value: 265 }, { date: Date.current, value: 265 } ] %>

<%= t(".preview") %>

<%= styled_form_with model: @user do |form| %> <%= form.hidden_field :onboarded_at, value: Time.current %> <%= form.hidden_field :redirect_to, value: "home" %>
<%= form.fields_for :family do |family_form| %> <%= family_form.select :locale, language_options, { label: t(".locale"), required: true, selected: params[:locale] || @user.family.locale }, { data: { action: "onboarding#setLocale" } } %> <%= family_form.select :currency, currencies_for_select.map { |currency| [ "#{currency.name} (#{currency.iso_code})", currency.iso_code ] }, { label: t(".currency"), required: true, selected: params[:currency] || @user.family.currency }, { data: { action: "onboarding#setCurrency" } } %> <%= family_form.select :date_format, date_format_options, { label: t(".date_format"), required: true, selected: params[:date_format] || @user.family.date_format }, { data: { action: "onboarding#setDateFormat" } } %> <% end %>
<%= form.submit t(".submit") %> <% end %>
<%= render "layouts/footer" %>