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 end
def transfer 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? if transfer.persisted?
flash[:success] = "Une invitation de transfert a été envoyée à #{params[:email]}" flash[:success] = "Une invitation de transfert a été envoyée à #{params[:email]}"
else else

View file

@ -68,7 +68,10 @@
= render Dsfr::AlertComponent.new(state: :info, size: :sm) do |c| = render Dsfr::AlertComponent.new(state: :info, size: :sm) do |c|
- c.body do - c.body do
%p %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 %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.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 = 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| = render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: "fr-mb-2w") do |c|
- c.body do - c.body do
%p %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 %p
= link_to t('views.users.dossiers.transfers.revoke'), transfer_path(dossier.transfer), class: 'fr-link', method: :delete = 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 deleted_badge: Deleted
transfers: transfers:
sender_demande_en_cours: "A transfer request is pending on file Nº %{id} to %{email}" 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: "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 revoke: Revoke this request
accept: Accept accept: Accept
reject: Reject reject: Reject

View file

@ -493,7 +493,9 @@ fr:
other_actions: "Autres actions" other_actions: "Autres actions"
transfers: transfers:
sender_demande_en_cours: "Une demande de transfert est en cours sur le dossier Nº %{id} pour %{email}" 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: "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 revoke: Révoquer cette demande
accept: Accepter accept: Accepter
reject: Rejeter reject: Rejeter