Merge pull request #10812 from colinux/date-last-updated-at-tag
ETQ admin, créé les balises "date de mise à jour" du dossier et "date prévisionnelle SVA/SVR"
This commit is contained in:
commit
99534ef834
5 changed files with 71 additions and 12 deletions
|
@ -50,6 +50,6 @@ module MailTemplateConcern
|
|||
end
|
||||
|
||||
def dossier_tags
|
||||
TagsSubstitutionConcern::DOSSIER_TAGS + TagsSubstitutionConcern::DOSSIER_TAGS_FOR_MAIL
|
||||
super + TagsSubstitutionConcern::DOSSIER_TAGS_FOR_MAIL
|
||||
end
|
||||
end
|
||||
|
|
|
@ -102,6 +102,13 @@ module TagsSubstitutionConcern
|
|||
lambda: -> (d) { format_date(d.processed_at) },
|
||||
available_for_states: Dossier::TERMINE
|
||||
},
|
||||
{
|
||||
id: 'dossier_last_champ_updated_at',
|
||||
libelle: 'date de mise à jour',
|
||||
description: 'Date de dernière mise à jour d’un champ du dossier',
|
||||
lambda: -> (d) { format_date(d.last_champ_updated_at) },
|
||||
available_for_states: Dossier::SOUMIS
|
||||
},
|
||||
{
|
||||
id: 'dossier_procedure_libelle',
|
||||
libelle: 'libellé démarche',
|
||||
|
@ -151,6 +158,14 @@ module TagsSubstitutionConcern
|
|||
}
|
||||
]
|
||||
|
||||
DOSSIER_SVA_SVR_DECISION_DATE_TAG = {
|
||||
id: 'dossier_sva_svr_decision_on',
|
||||
libelle: 'date prévisionnelle SVA/SVR',
|
||||
description: 'Date prévisionnelle de décision automatique par le SVA/SVR',
|
||||
lambda: -> (d) { format_date(d.sva_svr_decision_on) },
|
||||
available_for_states: Dossier.states.fetch(:en_instruction)
|
||||
}
|
||||
|
||||
INDIVIDUAL_TAGS = [
|
||||
{
|
||||
id: 'individual_gender',
|
||||
|
@ -328,7 +343,13 @@ module TagsSubstitutionConcern
|
|||
|
||||
def dossier_tags
|
||||
# Overridden by MailTemplateConcern
|
||||
DOSSIER_TAGS
|
||||
DOSSIER_TAGS + contextual_dossier_tags
|
||||
end
|
||||
|
||||
def contextual_dossier_tags
|
||||
tags = []
|
||||
tags << DOSSIER_SVA_SVR_DECISION_DATE_TAG if respond_to?(:procedure) && procedure.sva_svr_enabled?
|
||||
tags
|
||||
end
|
||||
|
||||
def tags_for_dossier_state(tags)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue