Files
grecia/app/components/management/budgets/investments/search_component.rb
Javi Martín 1cefc040a7 Add labels to the search form in the management area
The text for the unfeasible checkbox wasn't correctly defined as a
label, while the fields to search investments and select the heading
weren't intuitive since their purpose wasn't obvious.
2024-11-11 15:04:35 +01:00

27 lines
540 B
Ruby

class Management::Budgets::Investments::SearchComponent < ApplicationComponent
attr_reader :budget, :url
use_helpers :budget_heading_select_options
def initialize(budget, url:)
@budget = budget
@url = url
end
private
def options
{
method: :get,
class: "management-investments-search"
}
end
def search_label_text
t("management.budget_investments.search.label")
end
def attribute_name(attribute)
Budget::Investment.human_attribute_name(attribute)
end
end