gestionnaire: remove UI for filtering pieces justificatives
This commit is contained in:
parent
f825f62ce5
commit
0018f36b44
2 changed files with 1 additions and 22 deletions
|
@ -93,11 +93,7 @@ class Gestionnaire < ApplicationRecord
|
|||
.find_by(gestionnaire: self, dossier: dossier)
|
||||
|
||||
if follow.present?
|
||||
champs_publiques = follow.dossier.champs.updated_since?(follow.demande_seen_at).any?
|
||||
|
||||
pieces_justificatives = follow.dossier.pieces_justificatives.updated_since?(follow.demande_seen_at).any?
|
||||
|
||||
demande = champs_publiques || pieces_justificatives
|
||||
demande = follow.dossier.champs.updated_since?(follow.demande_seen_at).any?
|
||||
|
||||
annotations_privees = follow.dossier.champs_private.updated_since?(follow.annotations_privees_seen_at).any?
|
||||
|
||||
|
@ -154,10 +150,6 @@ class Gestionnaire < ApplicationRecord
|
|||
.joins(:champs)
|
||||
.where('champs.updated_at > follows.demande_seen_at')
|
||||
|
||||
updated_pieces_justificatives = dossiers
|
||||
.joins(:pieces_justificatives)
|
||||
.where('pieces_justificatives.updated_at > follows.demande_seen_at')
|
||||
|
||||
updated_annotations = dossiers
|
||||
.joins(:champs_private)
|
||||
.where('champs.updated_at > follows.annotations_privees_seen_at')
|
||||
|
@ -174,7 +166,6 @@ class Gestionnaire < ApplicationRecord
|
|||
|
||||
[
|
||||
updated_demandes,
|
||||
updated_pieces_justificatives,
|
||||
updated_annotations,
|
||||
updated_avis,
|
||||
updated_messagerie
|
||||
|
|
|
@ -251,12 +251,6 @@ describe Gestionnaire, type: :model do
|
|||
it { is_expected.to match({ demande: true, annotations_privees: false, avis: false, messagerie: false }) }
|
||||
end
|
||||
|
||||
context 'when there is a modification on a piece jusitificative' do
|
||||
before { dossier.pieces_justificatives << create(:piece_justificative, :contrat) }
|
||||
|
||||
it { is_expected.to match({ demande: true, annotations_privees: false, avis: false, messagerie: false }) }
|
||||
end
|
||||
|
||||
context 'when there is a modification on private champs' do
|
||||
before { dossier.champs_private.first.update_attribute('value', 'toto') }
|
||||
|
||||
|
@ -326,12 +320,6 @@ describe Gestionnaire, type: :model do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when there is a modification on a piece justificative' do
|
||||
before { dossier.pieces_justificatives << create(:piece_justificative, :contrat) }
|
||||
|
||||
it { is_expected.to match([dossier.id]) }
|
||||
end
|
||||
|
||||
context 'when there is a modification on public champs on a followed dossier from another procedure' do
|
||||
before { dossier_on_procedure_2.champs.first.update_attribute('value', 'toto') }
|
||||
|
||||
|
|
Loading…
Reference in a new issue