export bilans for avis
This commit is contained in:
parent
cf9d6ccf34
commit
23cc618dda
2 changed files with 10 additions and 3 deletions
|
@ -73,8 +73,9 @@ module Instructeurs
|
|||
end
|
||||
|
||||
def bilans_bdf
|
||||
if avis.dossier.etablissement&.entreprise_bilans_bdf_to_csv.present?
|
||||
render csv: avis.dossier.etablissement.entreprise_bilans_bdf_to_csv
|
||||
if avis.dossier.etablissement&.entreprise_bilans_bdf.present?
|
||||
extension = params[:format]
|
||||
render extension.to_sym => avis.dossier.etablissement.entreprise_bilans_bdf_to_sheet(extension)
|
||||
else
|
||||
redirect_to instructeur_avis_path(avis)
|
||||
end
|
||||
|
|
|
@ -90,7 +90,13 @@
|
|||
= "en #{etablissement.entreprise_bilans_bdf_monnaie}"
|
||||
- if profile == 'instructeur'
|
||||
- if controller.is_a?(Instructeurs::AvisController)
|
||||
%td= link_to "Consulter les bilans", bilans_bdf_instructeur_avis_path(@avis.id)
|
||||
%td
|
||||
Consulter les bilans
|
||||
= link_to "au format csv", bilans_bdf_instructeur_avis_path(@avis, format: 'csv')
|
||||
,
|
||||
= link_to "au format xlsx", bilans_bdf_instructeur_avis_path(@avis, format: 'xlsx')
|
||||
ou
|
||||
= link_to "au format ods", bilans_bdf_instructeur_avis_path(@avis, format: 'ods')
|
||||
- else
|
||||
%td
|
||||
Consulter les bilans
|
||||
|
|
Loading…
Reference in a new issue