change design from table to cards for usager for deleted dossier tab
This commit is contained in:
parent
1edfaae354
commit
6738dcf080
8 changed files with 52 additions and 64 deletions
|
@ -1,38 +1,31 @@
|
||||||
- if deleted_dossiers.present?
|
- if deleted_dossiers.present?
|
||||||
%span.fr-h6.fr-mr-2w
|
.fr-h6.fr-mb-2w
|
||||||
= page_entries_info deleted_dossiers
|
= page_entries_info deleted_dossiers
|
||||||
|
|
||||||
.fr-table.fr-table--bordered.fr-table--no-caption.fr-mt-2w
|
|
||||||
%table.table.dossiers-table.hoverable.display-table
|
|
||||||
%caption= t('views.users.dossiers.dossiers_list.caption')
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th.number-col Nº dossier
|
|
||||||
%th Démarche
|
|
||||||
%th Raison de suppression
|
|
||||||
%th Date de suppression
|
|
||||||
%tbody
|
|
||||||
- deleted_dossiers.each do |dossier|
|
- deleted_dossiers.each do |dossier|
|
||||||
%tr{ data: { 'dossier-id': dossier.dossier_id } }
|
.card
|
||||||
%td.number-col
|
.flex.justify-between
|
||||||
%span.icon.folder
|
%div
|
||||||
= dossier.dossier_id
|
%h2.card-title
|
||||||
%td
|
|
||||||
= dossier.procedure.libelle
|
= dossier.procedure.libelle
|
||||||
|
|
||||||
%td.cell-link
|
%p.fr-icon--sm.fr-icon-delete-line.fr-mb-0
|
||||||
= deletion_reason_badge(dossier.reason)
|
= t('views.users.dossiers.dossiers_list.deleted', date: dossier.updated_at.strftime('%d/%m/%Y'))
|
||||||
%td
|
= "-"
|
||||||
= dossier.updated_at.strftime('%d/%m/%Y')
|
= t("activerecord.attributes.deleted_dossier.reason.#{dossier.reason}")
|
||||||
|
|
||||||
|
.text-right
|
||||||
|
%p.fr-mb-0
|
||||||
|
= t('views.users.dossiers.dossiers_list.n_dossier')
|
||||||
|
= dossier.dossier_id
|
||||||
|
|
||||||
|
%span.fr-badge.fr-badge--warning
|
||||||
|
= t('views.users.dossiers.dossiers_list.deleted_badge')
|
||||||
|
|
||||||
= paginate deleted_dossiers, views_prefix: 'shared'
|
= paginate deleted_dossiers, views_prefix: 'shared'
|
||||||
|
|
||||||
- else
|
- else
|
||||||
.blank-tab
|
.blank-tab
|
||||||
%h2.empty-text
|
%h2.empty-text= t('views.users.dossiers.dossiers_list.no_result_title')
|
||||||
= t("views.users.dossiers.account_creation.empty")
|
|
||||||
%p.empty-text-details
|
%p.empty-text-details
|
||||||
= t("views.users.dossiers.account_creation.detail_one")
|
= t('views.users.dossiers.dossiers_list.no_result_text_html', app_base: APPLICATION_BASE_URL)
|
||||||
%p.empty-text-details
|
|
||||||
= t("views.users.dossiers.account_creation.detail_two")
|
|
||||||
#{APPLICATION_BASE_URL}/commencer/xxx.
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
- if dossier.hidden_by_user?
|
- if dossier.hidden_by_user?
|
||||||
%p.fr-icon--sm.fr-icon-delete-line
|
%p.fr-icon--sm.fr-icon-delete-line
|
||||||
= t('views.users.dossiers.dossiers_list.hidden_by_user', date: dossier.hidden_by_user_at.strftime('%d/%m/%Y'))
|
= t('views.users.dossiers.dossiers_list.deleted', date: dossier.hidden_by_user_at.strftime('%d/%m/%Y'))
|
||||||
- else
|
- else
|
||||||
%p.fr-icon--sm.fr-icon-edit-box-line
|
%p.fr-icon--sm.fr-icon-edit-box-line
|
||||||
- if dossier.depose_at.present?
|
- if dossier.depose_at.present?
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
- if @statut == "dossiers-supprimes-recemment"
|
- if @statut == "dossiers-supprimes-recemment"
|
||||||
%span.fr-badge.fr-badge--warning
|
%span.fr-badge.fr-badge--warning
|
||||||
= t('views.users.dossiers.dossiers_list.hidden_by_user_badge')
|
= t('views.users.dossiers.dossiers_list.deleted_badge')
|
||||||
- else
|
- else
|
||||||
= status_badge(dossier.state, 'fr-mb-1w')
|
= status_badge(dossier.state, 'fr-mb-1w')
|
||||||
|
|
||||||
|
|
|
@ -78,23 +78,8 @@
|
||||||
- else
|
- else
|
||||||
= render Dossiers::UserFilterComponent.new(statut: @statut, filter: @filter)
|
= render Dossiers::UserFilterComponent.new(statut: @statut, filter: @filter)
|
||||||
|
|
||||||
- if @statut == "en-cours"
|
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
|
||||||
|
|
||||||
- if @statut == "traites"
|
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
|
||||||
|
|
||||||
- if @statut == "dossiers-invites"
|
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
|
||||||
|
|
||||||
- if @statut == "dossiers-supprimes-recemment"
|
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
|
||||||
|
|
||||||
- if @statut == "dossiers-supprimes-definitivement"
|
- if @statut == "dossiers-supprimes-definitivement"
|
||||||
|
-# /!\ in this context, @dossiers is a collection of DeletedDossier not Dossier
|
||||||
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers }
|
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers }
|
||||||
|
- else
|
||||||
- if @statut == "dossiers-transferes"
|
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
|
||||||
|
|
||||||
- if @statut == "dossiers-expirant"
|
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
||||||
|
|
|
@ -393,10 +393,6 @@ en:
|
||||||
dossier_not_in_instructor_group: "File no. %{dossier_id} of the “%{procedure_libelle}” procedure corresponds to your search, but it is attached to the “%{groupe_instructeur_label}” instructor group."
|
dossier_not_in_instructor_group: "File no. %{dossier_id} of the “%{procedure_libelle}” procedure corresponds to your search, but it is attached to the “%{groupe_instructeur_label}” instructor group."
|
||||||
users:
|
users:
|
||||||
dossiers:
|
dossiers:
|
||||||
account_creation:
|
|
||||||
empty: "No file"
|
|
||||||
detail_one: "To complete a procedure, contact your administration and ask for the link to the procedure."
|
|
||||||
detail_two: "This one should look like"
|
|
||||||
fix_champ: "fill in this field"
|
fix_champ: "fill in this field"
|
||||||
archived_dossier: "Your file will be kept %{duree_conservation_dossiers_dans_ds} more months"
|
archived_dossier: "Your file will be kept %{duree_conservation_dossiers_dans_ds} more months"
|
||||||
identite:
|
identite:
|
||||||
|
@ -460,7 +456,6 @@ en:
|
||||||
index:
|
index:
|
||||||
dossiers: "My files"
|
dossiers: "My files"
|
||||||
dossiers_list:
|
dossiers_list:
|
||||||
caption: My files
|
|
||||||
n_dossier: "File n."
|
n_dossier: "File n."
|
||||||
no_result_title: No files
|
no_result_title: No files
|
||||||
no_result_text_html: "To fill a procedure, contact your administration asking for the procedure link. <br> It should look like %{app_base}/commencer/xxx."
|
no_result_text_html: "To fill a procedure, contact your administration asking for the procedure link. <br> It should look like %{app_base}/commencer/xxx."
|
||||||
|
@ -472,8 +467,8 @@ en:
|
||||||
created_at: Created at %{date}
|
created_at: Created at %{date}
|
||||||
updated_at: updated at %{date}
|
updated_at: updated at %{date}
|
||||||
shared_with: File shared with
|
shared_with: File shared with
|
||||||
hidden_by_user: Deleted at %{date}
|
deleted: Deleted at %{date}
|
||||||
hidden_by_user_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}"
|
||||||
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}"
|
||||||
|
|
|
@ -395,10 +395,6 @@ fr:
|
||||||
dossier_not_in_instructor_group: "Le dossier n° %{dossier_id} de la procédure « %{procedure_libelle} » correspond à votre recherche mais il est rattaché au groupe d’instructeurs « %{groupe_instructeur_label} »."
|
dossier_not_in_instructor_group: "Le dossier n° %{dossier_id} de la procédure « %{procedure_libelle} » correspond à votre recherche mais il est rattaché au groupe d’instructeurs « %{groupe_instructeur_label} »."
|
||||||
users:
|
users:
|
||||||
dossiers:
|
dossiers:
|
||||||
account_creation:
|
|
||||||
empty: "Aucun dossier"
|
|
||||||
detail_one: "Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche."
|
|
||||||
detail_two: "Celui ci doit ressembler à"
|
|
||||||
fix_champ: "corriger l’erreur"
|
fix_champ: "corriger l’erreur"
|
||||||
archived_dossier: "Votre dossier sera conservé %{duree_conservation_dossiers_dans_ds} mois supplémentaire"
|
archived_dossier: "Votre dossier sera conservé %{duree_conservation_dossiers_dans_ds} mois supplémentaire"
|
||||||
identite:
|
identite:
|
||||||
|
@ -462,7 +458,6 @@ fr:
|
||||||
index:
|
index:
|
||||||
dossiers: "Mes dossiers"
|
dossiers: "Mes dossiers"
|
||||||
dossiers_list:
|
dossiers_list:
|
||||||
caption: Mes dossiers
|
|
||||||
n_dossier: "Nº dossier"
|
n_dossier: "Nº dossier"
|
||||||
no_result_title: Aucun dossier
|
no_result_title: Aucun dossier
|
||||||
no_result_text_html: "Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche. <br> Celui ci doit ressembler à %{app_base}/commencer/xxx."
|
no_result_text_html: "Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche. <br> Celui ci doit ressembler à %{app_base}/commencer/xxx."
|
||||||
|
@ -474,8 +469,8 @@ fr:
|
||||||
created_at: Créé le %{date}
|
created_at: Créé le %{date}
|
||||||
updated_at: modifié le %{date}
|
updated_at: modifié le %{date}
|
||||||
shared_with: Dossier partagé avec
|
shared_with: Dossier partagé avec
|
||||||
hidden_by_user: Supprimé le %{date}
|
deleted: Supprimé le %{date}
|
||||||
hidden_by_user_badge: Supprimé
|
deleted_badge: Supprimé
|
||||||
dossier_action:
|
dossier_action:
|
||||||
edit_dossier: "Modifier le dossier"
|
edit_dossier: "Modifier le dossier"
|
||||||
start_other_dossier: "Commencer un autre dossier vide"
|
start_other_dossier: "Commencer un autre dossier vide"
|
||||||
|
|
16
config/locales/models/deleted_dossier/en.yml
Normal file
16
config/locales/models/deleted_dossier/en.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
en:
|
||||||
|
activerecord:
|
||||||
|
models:
|
||||||
|
deleted_dossier:
|
||||||
|
one: "Deleted file"
|
||||||
|
other: "Deleted files"
|
||||||
|
attributes:
|
||||||
|
deleted_dossier:
|
||||||
|
reason:
|
||||||
|
user_request: User request
|
||||||
|
manager_request: Manager request
|
||||||
|
user_removed: User removed
|
||||||
|
procedure_removed: Procedure removed
|
||||||
|
expired: Expired
|
||||||
|
unknown: Unknow
|
||||||
|
instructeur_request: Deleted by instructor
|
|
@ -1,5 +1,9 @@
|
||||||
fr:
|
fr:
|
||||||
activerecord:
|
activerecord:
|
||||||
|
models:
|
||||||
|
deleted_dossier:
|
||||||
|
one: "Dossier supprimé"
|
||||||
|
other: "Dossiers supprimés"
|
||||||
attributes:
|
attributes:
|
||||||
deleted_dossier:
|
deleted_dossier:
|
||||||
reason:
|
reason:
|
||||||
|
|
|
@ -11,8 +11,8 @@ describe 'Transfer dossier:' do
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'the user can transfer dossier to another user' do
|
scenario 'the user can transfer dossier to another user' do
|
||||||
within(:css, "tr[data-dossier-id=\"#{dossier.id}\"]") do
|
within(:css, ".card", match: :first) do
|
||||||
click_on 'Actions'
|
click_on 'Autres actions'
|
||||||
click_on 'Transférer le dossier'
|
click_on 'Transférer le dossier'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue