Expand budgeting icon options (#341)

* Expand budgeting icon options

* Reorder/compact

* Underscore in parent_category and lucide_icon

* Display category parent on delete/reassign

* Add scrolling on mobile

* Icon name fix

* Already i18n, why not?
This commit is contained in:
Juan José Mata
2025-12-12 16:05:53 +01:00
committed by GitHub
parent dd461faf84
commit 3e5dfc0263
6 changed files with 31 additions and 21 deletions

View File

@@ -42,7 +42,7 @@
<div class="flex flex-wrap gap-2 justify-center flex-col w-auto md:w-87">
<h4 class="text-secondary text-sm">Icon</h4>
<div class="flex flex-wrap gap-0.5">
<div class="flex flex-wrap gap-0.5 max-h-52 overflow-auto">
<% Category.icon_codes.each do |icon| %>
<label class="relative">
<%= f.radio_button :lucide_icon, icon, class: "sr-only peer", data: { action: "change->category#handleIconChange change->category#handleIconColorChange", category_target:"icon" } %>

View File

@@ -9,8 +9,8 @@
deletion_submit_text_when_not_replacing_value: t(".delete_and_leave_uncategorized", category_name: @category.name),
deletion_submit_text_when_replacing_value: t(".delete_and_recategorize", category_name: @category.name) } do |f| %>
<%= f.collection_select :replacement_category_id,
Current.family.categories.alphabetically.without(@category),
:id, :name,
Current.family.categories.alphabetically_by_hierarchy.without(@category),
:id, :name_with_parent,
{ prompt: t(".replacement_category_prompt"), label: t(".category"), container_class: "mb-4" },
data: { deletion_target: "replacementField", action: "deletion#chooseSubmitButton" } %>
@@ -22,7 +22,7 @@
) %>
<%= render DS::Button.new(
text: "Delete and reassign",
text: t(".delete_and_recategorize", category_name: @category.name),
data: { deletion_target: "safeSubmitButton" },
hidden: true,
full_width: true

View File

@@ -96,7 +96,7 @@
</div>
<div class="flex flex-col gap-4 items-center">
<%= render DS::FilledIcon.new(icon: "line-chart", variant: :surface) %>
<%= render DS::FilledIcon.new(icon: "chart-line", variant: :surface) %>
<p class="text-sm text-primary text-center">Performance and investment returns across portfolio</p>
</div>