refactor(download): remove useless turbo of menu since it's not dynamic anymore
This commit is contained in:
parent
eabc43ce53
commit
9bec007dfa
4 changed files with 1 additions and 19 deletions
|
@ -137,11 +137,6 @@ module Instructeurs
|
|||
.groupe_instructeurs
|
||||
.where(procedure: procedure)
|
||||
|
||||
@can_download_dossiers = current_instructeur
|
||||
.dossiers
|
||||
.visible_by_administration
|
||||
.exists?(groupe_instructeur_id: groupe_instructeur_ids) && !instructeur_as_manager?
|
||||
|
||||
export = Export.find_or_create_fresh_export(export_format, groupe_instructeurs, current_instructeur, **export_options)
|
||||
|
||||
@procedure = procedure
|
||||
|
|
|
@ -1,4 +1 @@
|
|||
-# not renderable as administrateur flagged as manager, so render it anyway
|
||||
- if @can_download_dossiers
|
||||
= turbo_stream.update_all '.procedure-actions' do
|
||||
= render Dossiers::ExportDropdownComponent.new(procedure: @procedure, count: @dossiers_count, export_url: method(:admin_procedure_exports_path))
|
||||
-# empty file so notice are still rendered
|
||||
|
|
|
@ -1,11 +1,2 @@
|
|||
-# not renderable as instructeur flagged as manager, so render it anyway
|
||||
- if @can_download_dossiers
|
||||
- if @statut.nil?
|
||||
= turbo_stream.update_all '.procedure-actions' do
|
||||
= render Dossiers::ExportDropdownComponent.new(procedure: @procedure, export_templates: current_instructeur.export_templates_for(@procedure), export_url: method(:download_export_instructeur_procedure_path))
|
||||
- else
|
||||
= turbo_stream.update_all '.dossiers-export' do
|
||||
= render Dossiers::ExportDropdownComponent.new(procedure: @procedure, export_templates: current_instructeur.export_templates_for(@procedure), statut: @statut, count: @dossiers_count, export_url: method(:download_export_instructeur_procedure_path))
|
||||
|
||||
= turbo_stream.update "last-export-alert" do
|
||||
= render partial: "last_export_alert", locals: { export: @last_export, statut: @statut }
|
||||
|
|
|
@ -59,7 +59,6 @@ describe Administrateurs::ExportsController, type: :controller do
|
|||
end
|
||||
|
||||
it 'responds in the correct format' do
|
||||
expect(response.media_type).to eq('text/vnd.turbo-stream.html')
|
||||
expect(response).to have_http_status(:ok)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue