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.
27 lines
540 B
Ruby
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
|