tests
This commit is contained in:
parent
328c2a8e3c
commit
81f5a5254b
16 changed files with 544 additions and 674 deletions
|
@ -3,11 +3,11 @@ module DossierLinkHelper
|
|||
if user.is_a?(Instructeur)
|
||||
if user.groupe_instructeurs.include?(dossier.groupe_instructeur)
|
||||
instructeur_dossier_path(dossier.procedure, dossier)
|
||||
else
|
||||
avis = dossier.avis.find_by(instructeur: user)
|
||||
if avis.present?
|
||||
instructeur_avis_path(avis.procedure, avis)
|
||||
end
|
||||
end
|
||||
elsif user.is_a?(Expert)
|
||||
avis = dossier.avis.find_by(expert: user.user)
|
||||
if avis.present?
|
||||
expert_avis_path(avis.procedure, avis)
|
||||
end
|
||||
elsif user.owns_or_invite?(dossier)
|
||||
dossier_path(dossier)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue