feat(manager): add routing rule in groupe instructeur show

This commit is contained in:
Eric Leroy-Terquem 2023-11-16 17:55:00 +01:00
parent 42027e9db9
commit 61ba089203
3 changed files with 7 additions and 0 deletions

View file

@ -12,6 +12,7 @@ class GroupeInstructeurDashboard < Administrate::BaseDashboard
label: Field::String,
closed: Field::Boolean,
instructeurs: Field::HasMany,
humanized_routing_rule: Field::String,
created_at: Field::DateTime,
updated_at: Field::DateTime
}.freeze
@ -32,6 +33,7 @@ class GroupeInstructeurDashboard < Administrate::BaseDashboard
:label,
:closed,
:instructeurs,
:humanized_routing_rule,
:created_at,
:updated_at
].freeze

View file

@ -113,6 +113,10 @@ class GroupeInstructeur < ApplicationRecord
procedure.groupe_instructeurs - [self]
end
def humanized_routing_rule
routing_rule&.to_s(procedure.active_revision.types_de_champ)
end
private
def routing_rule_matches_tdc?(rule)

View file

@ -7,6 +7,7 @@ fr:
attributes:
groupe_instructeur:
label: Libellé
humanized_routing_rule: Règle de routage
errors:
models:
groupe_instructeur: