highlight demandes when groupe instructeur updated on procedure list

This commit is contained in:
Christophe Robillard 2020-02-26 23:37:42 +01:00
parent 50007b2aac
commit b5030b8972
2 changed files with 51 additions and 1 deletions

View file

@ -187,7 +187,7 @@ class Dossier < ApplicationRecord
.joins('LEFT OUTER JOIN "commentaires" ON "commentaires" . "dossier_id" = "dossiers" . "id" and commentaires.updated_at > follows.messagerie_seen_at and "commentaires"."email" != \'contact@tps.apientreprise.fr\' AND "commentaires"."email" != \'contact@demarches-simplifiees.fr\'')
updated_demandes = joined_dossiers
.where('champs.updated_at > follows.demande_seen_at')
.where('champs.updated_at > follows.demande_seen_at OR groupe_instructeur_updated_at > follows.demande_seen_at')
updated_annotations = joined_dossiers
.where('champs_privates_dossiers.updated_at > follows.annotations_privees_seen_at')