diff --git a/app/controllers/manager/dossiers_controller.rb b/app/controllers/manager/dossiers_controller.rb index d947b6c9a..8155e1b1f 100644 --- a/app/controllers/manager/dossiers_controller.rb +++ b/app/controllers/manager/dossiers_controller.rb @@ -21,7 +21,7 @@ module Manager end def transfer - transfer = DossierTransfer.create(email: params[:email], dossiers: [Dossier.find(params[:id])]) + transfer = DossierTransfer.create(email: params[:email], dossiers: [Dossier.find(params[:id])], from_support: true) if transfer.persisted? flash[:success] = "Une invitation de transfert a été envoyée à #{params[:email]}" else diff --git a/app/views/users/dossiers/_dossiers_list.html.haml b/app/views/users/dossiers/_dossiers_list.html.haml index e2f759b32..643a71796 100644 --- a/app/views/users/dossiers/_dossiers_list.html.haml +++ b/app/views/users/dossiers/_dossiers_list.html.haml @@ -68,7 +68,10 @@ = render Dsfr::AlertComponent.new(state: :info, size: :sm) do |c| - c.body do %p - = t('views.users.dossiers.transfers.receiver_demande_en_cours', id: dossier.id, email: dossier.user.email) + - if dossier.transfer.from_support? + = t('views.users.dossiers.transfers.receiver_demande_en_cours_from_support', id: dossier.id, email: dossier.user.email) + - else + = t('views.users.dossiers.transfers.receiver_demande_en_cours', id: dossier.id, email: dossier.user.email) %p = link_to t('views.users.dossiers.transfers.accept'), transfer_path(dossier.transfer), class: "fr-link fr-mr-1w", method: :put = link_to t('views.users.dossiers.transfers.reject'), transfer_path(dossier.transfer), class: "fr-link", method: :delete @@ -76,7 +79,10 @@ = render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: "fr-mb-2w") do |c| - c.body do %p - = t('views.users.dossiers.transfers.sender_demande_en_cours', id: dossier.id, email: dossier.transfer.email) + - if dossier.transfer.from_support? + = t('views.users.dossiers.transfers.sender_demande_en_cours_from_support', id: dossier.id, email: dossier.transfer.email) + - else + = t('views.users.dossiers.transfers.sender_demande_en_cours', id: dossier.id, email: dossier.transfer.email) %p = link_to t('views.users.dossiers.transfers.revoke'), transfer_path(dossier.transfer), class: 'fr-link', method: :delete diff --git a/config/locales/en.yml b/config/locales/en.yml index 560c57f90..b50b51582 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -479,7 +479,9 @@ en: deleted_badge: Deleted transfers: sender_demande_en_cours: "A transfer request is pending on file Nº %{id} to %{email}" + sender_demande_en_cours: "A transfer request from technical support is pending on file Nº %{id} to %{email}" receiver_demande_en_cours: "Transfer request on file Nº %{id} sent by %{email}" + receiver_demande_en_cours_from_support: "Transfer request from technical support on file Nº %{id} of %{email}" revoke: Revoke this request accept: Accept reject: Reject diff --git a/config/locales/fr.yml b/config/locales/fr.yml index e38cc5a07..d76de8f49 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -493,7 +493,9 @@ fr: other_actions: "Autres actions" transfers: sender_demande_en_cours: "Une demande de transfert est en cours sur le dossier Nº %{id} pour %{email}" + sender_demande_en_cours_from_support: "Une demande de transfert par le support technique est en cours sur le dossier Nº %{id} pour %{email}" receiver_demande_en_cours: "Demande de transfert pour le dossier Nº %{id} envoyé par %{email}" + receiver_demande_en_cours_from_support: "Demande de transfert par le support technique pour le dossier Nº %{id} de %{email}" revoke: Révoquer cette demande accept: Accepter reject: Rejeter