indicates when support team initiated dossier transfer

This commit is contained in:
Christophe Robillard 2023-11-28 11:09:10 +01:00
parent 332570bfba
commit a74ecb1f99
4 changed files with 13 additions and 3 deletions

View file

@ -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

View file

@ -68,6 +68,9 @@
= render Dsfr::AlertComponent.new(state: :info, size: :sm) do |c|
- c.body do
%p
- 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
@ -76,6 +79,9 @@
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: "fr-mb-2w") do |c|
- c.body do
%p
- 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

View file

@ -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

View file

@ -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