put dossier_pdf apart
This commit is contained in:
parent
d5241381eb
commit
51a6145d96
1 changed files with 6 additions and 3 deletions
|
@ -1,10 +1,13 @@
|
|||
class ActiveStorage::DownloadableFile
|
||||
def self.create_list_from_dossiers(dossiers, for_expert = false)
|
||||
dossiers.flat_map do |dossier|
|
||||
dossier_export = PiecesJustificativesService.generate_dossier_export(dossier)
|
||||
pjs = [dossier_export] + PiecesJustificativesService.liste_documents(dossier, for_expert)
|
||||
pj_and_paths = dossiers.map { |d| pj_and_path(d, PiecesJustificativesService.generate_dossier_export(d)) }
|
||||
|
||||
pj_and_paths += dossiers.flat_map do |dossier|
|
||||
pjs = PiecesJustificativesService.liste_documents(dossier, for_expert)
|
||||
pjs.map { |piece_justificative| pj_and_path(dossier, piece_justificative) }
|
||||
end
|
||||
|
||||
pj_and_paths
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue