change flash alert wording and display message in show if dossier is in batch

This commit is contained in:
Lisa Durand 2022-12-01 12:15:29 +01:00 committed by mfo
parent 1beb219fdd
commit c52443f221
3 changed files with 30 additions and 12 deletions

View file

@ -47,6 +47,7 @@ module Instructeurs
def show
@demande_seen_at = current_instructeur.follows.find_by(dossier: dossier_with_champs)&.demande_seen_at
@is_dossier_in_batch_operation = dossier.batch_operation.present?
respond_to do |format|
format.pdf do
@ -330,7 +331,7 @@ module Instructeurs
current_instructeur.dossiers.find(params[:dossier_id])
end
if dossier_in_batch.batch_operation.present?
flash.alert = "Ce dossier fait parti d'un traitement de masse, veuillez attendre la fin de ce traitement"
flash.alert = "Votre action n'a pas été effectuée, ce dossier fait parti d'un traitement de masse."
redirect_back(fallback_location: instructeur_dossier_path(procedure, dossier_in_batch))
end
end

View file

@ -1,3 +1,10 @@
- if @is_dossier_in_batch_operation
= render Dsfr::NoticeComponent.new(closable: false) do |c|
- c.with_title do
Un traitement de masse est en cours sur ce dossier, vous ne pouvez pas le modifier.
= link_to "Recharger la page", instructeur_dossier_path, data: { action: 'turbo-poll#refresh' }
pour voir si l'opération est finie.
.sub-header
.container
.flex.justify-between