feat(instructeur): nest all instruction routes under statut params for back purpose

This commit is contained in:
mfo 2024-11-20 11:34:40 +01:00
parent b426e51d87
commit c260c43dac
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
30 changed files with 195 additions and 141 deletions

View file

@ -13,4 +13,8 @@ class Dossiers::BatchAlertComponent < ApplicationComponent
@batch.seen_at = Time.zone.now
@batch.save
end
def procedure_path
instructeur_procedure_path(@procedure, statut: params[:statut])
end
end

View file

@ -12,7 +12,7 @@
%p= t(".#{batch.operation}.in_progress.text_success", count: @batch.total_count, success_count: @batch.success_count)
%p
= link_to t('.link_text'), instructeur_procedure_path(@procedure, statut: params["statut"]), data: { action: 'turbo-poll#refresh' }
= link_to t('.link_text'), procedure_path, data: { action: 'turbo-poll#refresh' }
= t('.after_link_text')
%p.fr-mt-2w

View file

@ -80,7 +80,7 @@ class Dossiers::MessageComponent < ApplicationComponent
end
def delete_url
groupe_gestionnaire ? gestionnaire_groupe_gestionnaire_commentaire_path(groupe_gestionnaire, commentaire) : instructeur_commentaire_path(commentaire.dossier.procedure, commentaire.dossier, commentaire)
groupe_gestionnaire ? gestionnaire_groupe_gestionnaire_commentaire_path(groupe_gestionnaire, commentaire, statut: params[:statut]) : instructeur_commentaire_path(commentaire.dossier.procedure, commentaire.dossier, commentaire, statut: params[:statut])
end
def highlight?

View file

@ -4,7 +4,7 @@
- if dossier.may_repasser_en_construction?
= menu.with_item do
= link_to(repasser_en_construction_instructeur_dossier_path(dossier.procedure.id, dossier.id), method: :post, role: 'menuitem') do
= link_to(repasser_en_construction_instructeur_dossier_path(dossier.procedure.id, dossier.id, statut: params[:statut]), method: :post, role: 'menuitem') do
%span.fr-icon.fr-icon-draft-line.fr-text-default--info.fr-mt-1v{ "aria-hidden": "true" }
.dropdown-description
%h4= t('.revert_en_construction')
@ -27,7 +27,7 @@
- menu.with_item(class: "inactive form-inside fr-pt-1v") do
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier:,
visible: true,
form_path: pending_correction_instructeur_dossier_path(dossier.procedure, dossier),
form_path: pending_correction_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut]),
placeholder: 'Expliquez au demandeur quelle(s) correction(s) sont attendues',
popup_class: 'pending_correction',
button_justificatif_label: "Ajouter une pièce jointe (facultatif)",