add warning in revision change component if tdc options used for routing has been changed
This commit is contained in:
parent
50abf496fd
commit
54fe10ff76
4 changed files with 6 additions and 0 deletions
|
@ -24,6 +24,7 @@ fr:
|
|||
update_type_champ: Le type du champ « %{label} » a été modifié. Il est maintenant de type « %{to} ».
|
||||
update_piece_justificative_template: Le modèle de pièce justificative du champ « %{label} » a été modifié.
|
||||
update_drop_down_options: "Les options de sélection du champ « %{label} » ont été modifiées :"
|
||||
update_drop_down_options_alert: "Le champ « %{label} » est utilisé pour le routage des dossiers. Veuillez mettre à jour la configuration des groupes d'instructeurs après avoir publié les modifications."
|
||||
enable_mandatory: Le champ « %{label} » est maintenant obligatoire.
|
||||
disable_mandatory: Le champ « %{label} » n’est plus obligatoire.
|
||||
enable_drop_down_other: Le champ « %{label} » comporte maintenant un choix « Autre ».
|
||||
|
|
|
@ -74,6 +74,9 @@
|
|||
- if !total_dossiers.zero? && !change.can_rebase?
|
||||
.fr-alert.fr-alert--warning.fr-mt-1v
|
||||
%p= t('.breaking_change', count: total_dossiers)
|
||||
- if removed.present? && change.type_de_champ.used_by_routing_rules?
|
||||
.fr-alert.fr-alert--warning.fr-mt-1v
|
||||
= t(".#{prefix}.update_drop_down_options_alert", label: change.label)
|
||||
- when :drop_down_other
|
||||
- if change.from == false
|
||||
- list.with_item do
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class ProcedureRevisionChange
|
||||
attr_reader :type_de_champ
|
||||
def initialize(type_de_champ)
|
||||
@type_de_champ = type_de_champ
|
||||
end
|
||||
|
|
|
@ -131,6 +131,7 @@ class TypeDeChamp < ApplicationRecord
|
|||
has_one :procedure, through: :revision
|
||||
|
||||
delegate :estimated_fill_duration, :estimated_read_duration, :tags_for_template, :libelle_for_export, to: :dynamic_type
|
||||
delegate :used_by_routing_rules?, to: :revision_type_de_champ
|
||||
|
||||
class WithIndifferentAccess
|
||||
def self.load(options)
|
||||
|
|
Loading…
Add table
Reference in a new issue