mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
* Domain model sketch * Scaffold out rules domain * Migrations * Remove existing data enrichment for clean slate * Sketch out business logic and basic tests * Simplify rule scope building and action executions * Get generator working again * Basic implementation + tests * Remove manual merchant management (rules will replace) * Revert "Remove manual merchant management (rules will replace)" This reverts commit 83dcbd9ff0aa7bbee211796b71aa48b71df5e57e. * Family and Provider merchants model * Fix brakeman warnings * Fix notification loader * Update notification position * Add Rule action and condition registries * Rule form with compound conditions and tests * Split out notification types, add CTA type * Rules form builder and Stimulus controller * Clean up rule registry domain * Clean up rules stimulus controller * CTA message for rule when user changes transaction category * Fix tests * Lint updates * Centralize notifications in Notifiable concern * Implement category rule prompts with auto backoff and option to disable * Fix layout bug caused by merge conflict * Initialize rule with correct action for category CTA * Add rule deletions, get rules working * Complete dynamic rule form, split Stimulus controllers by resource * Fix failing tests * Change test password to avoid chromium conflicts * Update integration tests * Centralize all test password references * Add re-apply rule action * Rule confirm modal * Run migrations * Trigger rule notification after inline category updates * Clean up rule styles * Basic attribute locking for rules * Apply attribute locks on user edits * Log data enrichments, only apply rules to unlocked attributes * Fix merge errors * Additional merge conflict fixes * Form UI improvements, ignore attribute locks on manual rule application * Batch AI auto-categorization of transactions * Auto merchant detection, ai enrichment in batches * Fix Plaid merchant assignments * Plaid category matching * Cleanup 1 * Test cleanup * Remove stale route * Fix desktop chat UI issues * Fix mobile nav styling issues
72 lines
3.5 KiB
Plaintext
72 lines
3.5 KiB
Plaintext
<%= content_for :page_title, t(".page_title") %>
|
|
|
|
<%= settings_section title: t(".general_title"), subtitle: t(".general_subtitle") do %>
|
|
<div>
|
|
<%= styled_form_with model: @user, class: "space-y-4", data: { controller: "auto-submit-form" } do |form| %>
|
|
<%= form.hidden_field :redirect_to, value: "preferences" %>
|
|
|
|
<%= form.fields_for :family do |family_form| %>
|
|
<%= family_form.select :currency,
|
|
currencies_for_select.map { |currency| [ "#{currency.name} (#{currency.iso_code})", currency.iso_code ] },
|
|
{ label: t(".currency") }, disabled: true %>
|
|
|
|
<%= family_form.select :locale,
|
|
language_options,
|
|
{ label: t(".language") },
|
|
{ data: { auto_submit_form_target: "auto" } } %>
|
|
|
|
<%= family_form.select :timezone,
|
|
timezone_options,
|
|
{ label: t(".timezone") },
|
|
{ data: { auto_submit_form_target: "auto" } } %>
|
|
|
|
<%= family_form.select :date_format,
|
|
Family::DATE_FORMATS,
|
|
{ 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") },
|
|
{ data: { auto_submit_form_target: "auto" } } %>
|
|
|
|
<p class="text-xs italic pl-2 text-secondary">Please note, we are still working on translations for various languages. Please see the <%= link_to "I18n issue", "https://github.com/maybe-finance/maybe/issues/1225", target: "_blank", class: "underline" %> for more information.</p>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= settings_section title: t(".theme_title"), subtitle: t(".theme_subtitle") do %>
|
|
<div>
|
|
<%= styled_form_with model: @user, class: "flex flex-col md:flex-row justify-between items-center gap-4", data: { controller: "auto-submit-form" } do |form| %>
|
|
<%= form.hidden_field :redirect_to, value: "preferences" %>
|
|
<div class="text-center">
|
|
<%= image_tag("light-mode-preview.png", alt: "Light Theme Preview", class: "h-44 mb-4") %>
|
|
<div class="flex justify-center items-center gap-2">
|
|
<%= form.radio_button :theme, "light", checked: @user.theme == "light", data: { auto_submit_form_target: "auto", action: "theme#updateTheme" } %>
|
|
<%= form.label :theme_light, t(".theme_light"), value: "light" %>
|
|
</div>
|
|
</div>
|
|
<div class="text-center">
|
|
<%= image_tag("dark-mode-preview.png", alt: "Dark Theme Preview", class: "h-44 mb-4") %>
|
|
<div class="flex justify-center items-center gap-2">
|
|
<%= form.radio_button :theme, "dark", checked: @user.theme == "dark", data: { auto_submit_form_target: "auto", action: "theme#updateTheme" } %>
|
|
<%= form.label :theme_dark, t(".theme_dark"), value: "dark" %>
|
|
</div>
|
|
</div>
|
|
<div class="text-center">
|
|
<%= image_tag("system-mode-preview.png", alt: "System Theme Preview", class: "h-44 mb-4") %>
|
|
<div class="flex items-center gap-2 justify-center">
|
|
<%= form.radio_button :theme, "system", checked: @user.theme == "system", data: { auto_submit_form_target: "auto", action: "theme#updateTheme" } %>
|
|
<%= form.label :theme_system, t(".theme_system"), value: "system" %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|