feat(manager): add champs de routage in procedure show
This commit is contained in:
parent
ce221f86af
commit
42027e9db9
3 changed files with 10 additions and 0 deletions
|
@ -16,6 +16,7 @@ class ProcedureDashboard < Administrate::BaseDashboard
|
|||
administrateurs: Field::HasMany,
|
||||
instructeurs: Field::HasMany,
|
||||
groupe_instructeurs: Field::HasMany,
|
||||
routing_champs: Field::String,
|
||||
id: Field::Number.with_options(searchable: true),
|
||||
libelle: Field::String,
|
||||
description: Field::String,
|
||||
|
@ -74,6 +75,7 @@ class ProcedureDashboard < Administrate::BaseDashboard
|
|||
:administrateurs,
|
||||
:instructeurs,
|
||||
:groupe_instructeurs,
|
||||
:routing_champs,
|
||||
:libelle,
|
||||
:description,
|
||||
:tags,
|
||||
|
|
|
@ -700,6 +700,10 @@ class Procedure < ApplicationRecord
|
|||
groupe_instructeurs - [defaut_groupe_instructeur]
|
||||
end
|
||||
|
||||
def routing_champs
|
||||
active_revision.types_de_champ_public.filter(&:used_by_routing_rules?).map(&:libelle)
|
||||
end
|
||||
|
||||
def can_be_deleted_by_administrateur?
|
||||
brouillon? || dossiers.state_en_instruction.empty?
|
||||
end
|
||||
|
|
|
@ -74,3 +74,7 @@ fr:
|
|||
sva_svr:
|
||||
immutable: "La configuration SVA/SVR ne peut plus être modifiée"
|
||||
declarative_incompatible: "Le SVA/SVR est incompatible avec une démarche déclarative"
|
||||
helpers:
|
||||
label:
|
||||
procedure:
|
||||
routing_champs: Champ(s) de routage
|
||||
|
|
Loading…
Reference in a new issue