diff --git a/app/components/dossiers/export_link_component.rb b/app/components/dossiers/export_link_component.rb index 0fe2967aa..647d08a4b 100644 --- a/app/components/dossiers/export_link_component.rb +++ b/app/components/dossiers/export_link_component.rb @@ -11,9 +11,10 @@ class Dossiers::ExportLinkComponent < ApplicationComponent @export_url = export_url end - def download_export_path(export_format:, statut:, no_progress_notification: nil) + def download_export_path(export_format:, statut:, export_template_id: nil, no_progress_notification: nil) @export_url.call(@procedure, export_format: export_format, + export_template_id:, statut: statut, no_progress_notification: no_progress_notification) end diff --git a/app/components/dossiers/export_link_component/export_link_component.html.haml b/app/components/dossiers/export_link_component/export_link_component.html.haml index 0ed8d34a2..6f217d5ae 100644 --- a/app/components/dossiers/export_link_component/export_link_component.html.haml +++ b/app/components/dossiers/export_link_component/export_link_component.html.haml @@ -14,4 +14,4 @@ = export_button(export) - if export.failed? - = button_to refresh_button_options(export)[:title], download_export_path(export_format: export.format, statut: export.statut), refresh_button_options(export) + = button_to refresh_button_options(export)[:title], download_export_path(export_template_id: export.export_template&.id, export_format: export.format, statut: export.statut), refresh_button_options(export)