2021-04-29 09:33:23 +02:00
|
|
|
|
- content_for(:title, "Recherche : #{@search_terms}")
|
|
|
|
|
|
2023-04-14 17:43:38 +02:00
|
|
|
|
.fr-container
|
2022-11-03 17:39:12 +01:00
|
|
|
|
|
2022-11-07 17:00:31 +01:00
|
|
|
|
- if @dossier_not_in_instructor_group.present?
|
2022-11-03 17:39:12 +01:00
|
|
|
|
.fr-alert.fr-alert--info.fr-alert--sm.fr-mt-3w
|
2022-11-07 17:00:31 +01:00
|
|
|
|
= p t('views.instructeurs.search.dossier_not_in_instructor_group', dossier_id: @dossier_not_in_instructor_group.id, procedure_libelle: @dossier_not_in_instructor_group.procedure.libelle, groupe_instructeur_label: @dossier_not_in_instructor_group.groupe_instructeur.label)
|
2023-10-17 14:25:14 +02:00
|
|
|
|
- if @deleted_dossier.present?
|
|
|
|
|
.fr-alert.fr-alert--info.fr-alert--sm.fr-mt-3w
|
|
|
|
|
= p t('views.instructeurs.search.deleted_dossier', dossier_id: @deleted_dossier.dossier_id, procedure_libelle: @deleted_dossier.procedure.libelle, deleted_at: l(@deleted_dossier.deleted_at))
|
2022-11-03 17:39:12 +01:00
|
|
|
|
|
2021-04-29 09:33:23 +02:00
|
|
|
|
- if @projected_dossiers.present?
|
2024-11-12 17:04:30 +01:00
|
|
|
|
.fr-table.fr-table--no-scroll.fr-table--bordered
|
|
|
|
|
.fr-table__wrapper
|
|
|
|
|
.fr-table__container
|
|
|
|
|
.fr-table__content
|
|
|
|
|
%table.dossiers-table
|
|
|
|
|
%caption
|
|
|
|
|
Résultat de la recherche :
|
|
|
|
|
= t('pluralize.dossier_trouve', count: @dossiers_count)
|
|
|
|
|
%thead
|
|
|
|
|
%tr
|
|
|
|
|
%th Nº dossier
|
|
|
|
|
%th Démarche
|
|
|
|
|
%th Demandeur
|
|
|
|
|
%th Statut
|
|
|
|
|
%th.follow-col
|
|
|
|
|
%tbody
|
|
|
|
|
- @projected_dossiers.each do |p|
|
|
|
|
|
- procedure_libelle, user_email, procedure_id = p.columns
|
|
|
|
|
- instructeur_dossier = @instructeur_dossiers_ids.include?(p.dossier_id)
|
|
|
|
|
- expert_dossier = @dossier_avis_ids_h[p.dossier_id].present?
|
|
|
|
|
- hidden_by_administration = p.hidden_by_administration_at.present?
|
|
|
|
|
- instructeur_and_expert_dossier = instructeur_dossier && expert_dossier
|
|
|
|
|
- path = instructeur_dossier ? instructeur_dossier_path(procedure_id, p.dossier_id) : expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id])
|
|
|
|
|
|
|
|
|
|
%tr{ class: [p.hidden_by_administration_at.present? && "file-hidden-by-user"] }
|
|
|
|
|
- if instructeur_and_expert_dossier
|
2024-11-13 18:40:09 +01:00
|
|
|
|
%td.fr-cell--numeric
|
2024-11-25 12:38:20 +01:00
|
|
|
|
.relative
|
2024-11-12 17:04:30 +01:00
|
|
|
|
= p.dossier_id
|
|
|
|
|
- if @notifications_dossier_ids.include?(p.dossier_id)
|
|
|
|
|
%span.notifications{ 'aria-label': 'notifications' }
|
2024-11-25 14:42:59 +01:00
|
|
|
|
%td.fr-cell--multiline= procedure_libelle
|
2024-11-25 12:38:20 +01:00
|
|
|
|
%td= user_email
|
|
|
|
|
%td.flex.column= status_badge(p.state)
|
2024-11-12 17:04:30 +01:00
|
|
|
|
|
|
|
|
|
- elsif hidden_by_administration
|
|
|
|
|
= render partial: "recherche/hidden_dossier", locals: {p: p, procedure_libelle: procedure_libelle, user_email: user_email}
|
|
|
|
|
|
|
|
|
|
- else
|
2024-11-13 18:40:09 +01:00
|
|
|
|
%td.fr-cell--numeric
|
2024-11-25 12:33:53 +01:00
|
|
|
|
%a.fr-link.relative{ href: path }
|
2024-11-12 17:04:30 +01:00
|
|
|
|
= p.dossier_id
|
|
|
|
|
- if @notifications_dossier_ids.include?(p.dossier_id)
|
|
|
|
|
%span.notifications{ 'aria-label': 'notifications' }
|
|
|
|
|
|
|
|
|
|
%td
|
2024-11-25 12:38:20 +01:00
|
|
|
|
%a{ href: path }= procedure_libelle
|
2024-11-12 17:04:30 +01:00
|
|
|
|
|
|
|
|
|
%td
|
2024-11-25 12:38:20 +01:00
|
|
|
|
%a{ href: path }= user_email
|
2024-11-12 17:04:30 +01:00
|
|
|
|
|
|
|
|
|
%td
|
2024-11-25 12:38:20 +01:00
|
|
|
|
%a.flex.column{ href: path }= status_badge(p.state)
|
2024-11-12 17:04:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if instructeur_dossier && expert_dossier
|
|
|
|
|
%td.follow-col
|
|
|
|
|
= render Dropdown::MenuComponent.new(wrapper: :div, button_options: {class: ['fr-btn--sm']}) do |menu|
|
|
|
|
|
- menu.with_button_inner_html do
|
|
|
|
|
Actions
|
|
|
|
|
|
|
|
|
|
- menu.with_item do
|
|
|
|
|
= link_to(instructeur_dossier_path(procedure_id, p.dossier_id), role: 'menuitem') do
|
|
|
|
|
= dsfr_icon('fr-icon-file-text-fill', :sm)
|
|
|
|
|
.dropdown-description
|
|
|
|
|
Voir le dossier
|
|
|
|
|
|
|
|
|
|
- menu.with_item do
|
|
|
|
|
= link_to(expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id]), role: 'menuitem') do
|
|
|
|
|
= dsfr_icon('fr-icon-chat-3-fill', :sm)
|
|
|
|
|
.dropdown-description
|
|
|
|
|
Donner mon avis
|
|
|
|
|
|
|
|
|
|
- elsif instructeur_dossier
|
|
|
|
|
- if hidden_by_administration
|
|
|
|
|
%td.follow-col
|
|
|
|
|
= link_to restore_instructeur_dossier_path(procedure_id, p.dossier_id), method: :patch, class: "button primary" do
|
|
|
|
|
= t('views.instructeurs.dossiers.restore')
|
|
|
|
|
|
|
|
|
|
- else
|
|
|
|
|
%td.follow-col
|
|
|
|
|
%ul.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline-lg.fr-btns-group--icon-right
|
|
|
|
|
= render partial: "instructeurs/procedures/dossier_actions",
|
|
|
|
|
locals: { procedure_id: procedure_id,
|
|
|
|
|
dossier_id: p.dossier_id,
|
|
|
|
|
state: p.state,
|
|
|
|
|
archived: p.archived,
|
|
|
|
|
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
|
|
|
|
close_to_expiration: nil,
|
|
|
|
|
hidden_by_administration: nil,
|
|
|
|
|
hidden_by_expired: nil,
|
|
|
|
|
sva_svr: p.sva_svr_decision_on.present?,
|
|
|
|
|
has_blocking_pending_correction: p.pending_correction? && Flipper.enabled?(:blocking_pending_correction, ProcedureFlipperActor.new(procedure_id)),
|
|
|
|
|
turbo: false,
|
|
|
|
|
with_menu: false }
|
|
|
|
|
|
|
|
|
|
- else
|
|
|
|
|
%td
|
|
|
|
|
.fr-table__footer
|
|
|
|
|
.fr-table__footer--start
|
|
|
|
|
.fr-table__footer--middle
|
|
|
|
|
= paginate @paginated_ids, views_prefix: 'shared'
|
|
|
|
|
.fr-table__footer--end
|
2021-04-29 09:33:23 +02:00
|
|
|
|
|
|
|
|
|
- else
|
2024-11-12 17:04:30 +01:00
|
|
|
|
%h2.fr-h4.fr-my-4w Aucun dossier correspondant à votre recherche n’a été trouvé
|