Merge pull request #9286 from demarches-simplifiees/etq-instructeur-i-see-a-badge-for-reaffected-dossiers
ETQ instructeur je vois un badge d'alerte quand le dossier a été réaffecté
This commit is contained in:
commit
04ab6ed0aa
3 changed files with 9 additions and 0 deletions
|
@ -18,6 +18,8 @@
|
|||
= render partial: "shared/champs/carte/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:dossier_link)
|
||||
= render partial: "shared/champs/dossier_link/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:drop_down_list)
|
||||
= render partial: "shared/champs/drop_down_list/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list)
|
||||
= render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:piece_justificative), TypeDeChamp.type_champs.fetch(:titre_identite)
|
||||
|
|
|
@ -62,6 +62,7 @@ class Champ < ApplicationRecord
|
|||
delegate :to_typed_id, :to_typed_id_for_query, to: :type_de_champ, prefix: true
|
||||
|
||||
delegate :revision, to: :dossier, prefix: true
|
||||
delegate :used_by_routing_rules?, to: :type_de_champ
|
||||
|
||||
scope :updated_since?, -> (date) { where('champs.updated_at > ?', date) }
|
||||
scope :public_only, -> { where(private: false) }
|
||||
|
|
6
app/views/shared/champs/drop_down_list/_show.html.haml
Normal file
6
app/views/shared/champs/drop_down_list/_show.html.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
- if champ.used_by_routing_rules? && champ.dossier.forced_groupe_instructeur
|
||||
%p
|
||||
%span= champ.value
|
||||
%span.fr-badge.fr-badge--warning.fr-badge--sm dossier réaffecté au groupe « #{champ.dossier.groupe_instructeur.label} »
|
||||
- else
|
||||
%p= champ.value
|
Loading…
Reference in a new issue