21bb04d74e
- link to full dossier if gestionnaire is affected on procedure - link to avis if avis expert requested on related dossier
12 lines
329 B
Ruby
12 lines
329 B
Ruby
module DossierLinkHelper
|
|
def dossier_linked_path(gestionnaire, dossier)
|
|
if dossier.procedure.gestionnaires.include?(gestionnaire)
|
|
dossier_path(dossier.procedure, dossier)
|
|
else
|
|
avis = dossier.avis.find_by(gestionnaire: gestionnaire)
|
|
if avis.present?
|
|
avis_path(avis)
|
|
end
|
|
end
|
|
end
|
|
end
|