clean(routing): use translations for operator_tag

This commit is contained in:
Eric Leroy-Terquem 2023-08-28 17:52:56 +02:00
parent d0da808325
commit a7859a8a9c

View file

@ -46,12 +46,18 @@ class Procedure::OneGroupeManagementComponent < ApplicationComponent
def operator_tag
select_tag('operator_name',
options_for_select(
[['est égal à', Logic::Eq.name], ["n'est pas égal à", Logic::NotEq.name]],
options_for_operator_tag,
selected: operator_name
),
class: 'fr-select')
end
def options_for_operator_tag
[Eq, NotEq]
.map(&:name)
.map { |name| [t(name, scope: 'logic.operators'), name] }
end
def value_tag
select_tag(
'value',