Merge pull request #6856 from betagouv/main

2022-02-02-01
This commit is contained in:
Kara Diaby 2022-02-02 09:57:57 +01:00 committed by GitHub
commit 1dfd4122cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 6 deletions

View file

@ -4,7 +4,8 @@ class RechercheController < ApplicationController
PROJECTIONS = [ PROJECTIONS = [
{ "table" => 'procedure', "column" => 'libelle' }, { "table" => 'procedure', "column" => 'libelle' },
{ "table" => 'user', "column" => 'email' }, { "table" => 'user', "column" => 'email' },
{ "table" => 'procedure', "column" => 'procedure_id' } { "table" => 'procedure', "column" => 'procedure_id' },
{ "table" => 'dossier', "column" => 'hidden_by_administration_at' }
] ]
def index def index

View file

@ -29,7 +29,7 @@
archived: dossier.archived, archived: dossier.archived,
dossier_is_followed: current_instructeur&.follow?(dossier), dossier_is_followed: current_instructeur&.follow?(dossier),
close_to_expiration: dossier.close_to_expiration?, close_to_expiration: dossier.close_to_expiration?,
supprimes_recemment: dossier.hidden_by_administration? } recently_deleted: dossier.hidden_by_administration? }
.state-button .state-button

View file

@ -21,7 +21,7 @@
%span.icon.archive %span.icon.archive
.dropdown-description .dropdown-description
Archiver le dossier Archiver le dossier
- if supprimes_recemment - if recently_deleted
%li.danger %li.danger
= link_to restore_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, data: { confirm: "Voulez vous vraiment restaurer le dossier #{dossier_id}" } do = link_to restore_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, data: { confirm: "Voulez vous vraiment restaurer le dossier #{dossier_id}" } do
%span.icon.reply %span.icon.reply

View file

@ -139,7 +139,7 @@
archived: p.archived, archived: p.archived,
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id), dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
close_to_expiration: @statut == 'expirant', close_to_expiration: @statut == 'expirant',
supprimes_recemment: @statut == 'supprimes_recemment' } recently_deleted: @statut == 'supprimes_recemment' }
= pagination = pagination
- else - else

View file

@ -20,7 +20,7 @@
%th.action-col.follow-col %th.action-col.follow-col
%tbody %tbody
- @projected_dossiers.each do |p| - @projected_dossiers.each do |p|
- procedure_libelle, user_email, procedure_id = p.columns - procedure_libelle, user_email, procedure_id, hidden_by_administration = p.columns
- instructeur_dossier = @instructeur_dossiers_ids.include?(p.dossier_id) - instructeur_dossier = @instructeur_dossiers_ids.include?(p.dossier_id)
- expert_dossier = @dossier_avis_ids_h[p.dossier_id].present? - expert_dossier = @dossier_avis_ids_h[p.dossier_id].present?
- instructeur_and_expert_dossier = instructeur_dossier && expert_dossier - instructeur_and_expert_dossier = instructeur_dossier && expert_dossier
@ -82,7 +82,8 @@
state: p.state, state: p.state,
archived: p.archived, archived: p.archived,
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id), dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
close_to_expiration: nil } close_to_expiration: nil,
recently_deleted: hidden_by_administration.blank? }
- else - else
%td %td