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

View file

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

View file

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