diff --git a/app/views/users/dossiers/_deleted_dossiers_list.html.haml b/app/views/users/dossiers/_deleted_dossiers_list.html.haml index 4b1e039d2..55785b475 100644 --- a/app/views/users/dossiers/_deleted_dossiers_list.html.haml +++ b/app/views/users/dossiers/_deleted_dossiers_list.html.haml @@ -9,6 +9,7 @@ %tbody - deleted_dossiers.each do |dossier| - libelle_demarche = Procedure.find(dossier.procedure_id).libelle + %tr{ data: { 'dossier-id': dossier.dossier_id } } %td.number-col %span.icon.folder diff --git a/app/views/users/dossiers/_hidden_dossiers_list.html.haml b/app/views/users/dossiers/_hidden_dossiers_list.html.haml new file mode 100644 index 000000000..58f2f7eb1 --- /dev/null +++ b/app/views/users/dossiers/_hidden_dossiers_list.html.haml @@ -0,0 +1,36 @@ +- if hidden_dossiers.present? + %table.table.dossiers-table.hoverable + %thead + %tr + %th.number-col Nº dossier + %th Démarche + %th Raison de suppression + %th Date de suppression + %tbody + - hidden_dossiers.each do |dossier| + - libelle_demarche = dossier.procedure.libelle + + %tr{ data: { 'dossier-id': dossier.id } } + %td.number-col + %span.icon.folder + = dossier.id + %td + = libelle_demarche + + %td.cell-link + = deletion_reason_badge("user_request") + %td + = dossier.updated_at.strftime('%d/%m/%Y') + %td + = link_to restore_dossier_path(dossier.id), method: :patch, class: "button primary" do + Restaurer + + = paginate(hidden_dossiers) + +- else + .blank-tab + %h2.empty-text Aucun dossier. + %p.empty-text-details + Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche. + %br + Celui ci doit ressembler à #{APPLICATION_BASE_URL}/commencer/xxx. diff --git a/app/views/users/dossiers/index.html.haml b/app/views/users/dossiers/index.html.haml index 326962e92..577625690 100644 --- a/app/views/users/dossiers/index.html.haml +++ b/app/views/users/dossiers/index.html.haml @@ -39,11 +39,17 @@ active: @statut == 'dossiers-expirant', badge: number_with_html_delimiter(@dossiers_close_to_expiration.count)) - - if @dossiers_supprimes.present? - = tab_item(t('pluralize.dossiers_supprimes', count: @dossiers_supprimes.count), - dossiers_path(statut: 'dossiers-supprimes'), - active: @statut == 'dossiers-supprimes', - badge: number_with_html_delimiter(@dossiers_supprimes.count)) + - if @dossiers_supprimes_recemment.present? + = tab_item(t('pluralize.dossiers_supprimes_recemment', count: @dossiers_supprimes_recemment.count), + dossiers_path(statut: 'dossiers-supprimes-recemment'), + active: @statut == 'dossiers-supprimes-recemment', + badge: number_with_html_delimiter(@dossiers_supprimes_recemment.count)) + + - if @dossiers_supprimes_definitivement.present? + = tab_item(t('pluralize.dossiers_supprimes_definitivement', count: @dossiers_supprimes_definitivement.count), + dossiers_path(statut: 'dossiers-supprimes-definitivement'), + active: @statut == 'dossiers-supprimes-definitivement', + badge: number_with_html_delimiter(@dossiers_supprimes_definitivement.count)) - if @dossier_transfers.present? = tab_item(t('pluralize.dossiers_transferes', count: @dossier_transfers.count), @@ -61,8 +67,12 @@ - if @statut == "dossiers-invites" = render partial: "dossiers_list", locals: { dossiers: @dossiers_invites } - - if @statut == "dossiers-supprimes" - = render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers_supprimes } + - if @statut == "dossiers-supprimes-recemment" + = render partial: "hidden_dossiers_list", locals: { hidden_dossiers: @dossiers_supprimes_recemment } + + - if @statut == "dossiers-supprimes-definitivement" + = render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers_supprimes_definitivement } + - if @statut == "dossiers-transferes" = render partial: "transfered_dossiers_list", locals: { dossier_transfers: @dossier_transfers }