2017-11-17 23:40:51 +01:00
- content_for(:title, "#{@procedure.libelle}")
2017-07-11 16:09:03 +02:00
#procedure-show
2018-04-23 17:22:20 +02:00
.sub-header
2017-07-18 15:12:55 +02:00
.container.flex
2017-07-11 16:09:03 +02:00
2019-08-28 13:11:58 +02:00
.procedure-logo{ style: "background-image: url(#{@procedure.logo_url})",
2018-09-05 14:48:42 +02:00
role: 'img', 'aria-label': "logo de la démarche #{@procedure.libelle}" }
2017-09-14 10:11:45 +02:00
2021-12-03 16:21:41 +01:00
= render partial: 'header', locals: { procedure: @procedure, statut: @statut }
.procedure-actions
= render partial: "download_dossiers", locals: { procedure: @procedure, exports: @exports, dossier_count: @tous_count + @archives_count }
.container.flex= render partial: "tabs", locals: { procedure: @procedure,
2021-09-23 15:03:20 +02:00
statut: @statut,
a_suivre_count: @a_suivre_count,
suivis_count: @suivis_count,
traites_count: @traites_count,
tous_count: @tous_count,
2022-01-27 17:02:02 +01:00
supprimes_recemment_count: @supprimes_recemment_count,
2021-09-23 15:03:20 +02:00
archives_count: @archives_count,
2021-12-01 17:39:47 +01:00
expirant_count: @expirant_count,
2021-09-23 15:03:20 +02:00
has_en_cours_notifications: @has_en_cours_notifications,
has_termine_notifications: @has_termine_notifications }
2017-07-11 15:40:09 +02:00
.container
2019-07-11 10:58:40 +02:00
- if @statut == 'a-suivre'
2021-05-26 15:16:30 +02:00
%p.explication-onglet Aucun instructeur n’ est affecté au suivi de ces dossiers. Soyez le premier !
2019-07-11 10:58:40 +02:00
- if @statut == 'suivis'
%p.explication-onglet Les dossiers qui sont dans cet onglet sont uniquement ceux que vous suivez. Vous pouvez échanger avec le demandeur jusqu'à pouvoir les accepter, les refuser ou les classer sans suite.
- if @statut == 'traites'
%p.explication-onglet Les dossiers dans cet onglet sont terminés : ils ont été acceptés, refusés ou classés sans suite.
- if @statut == 'tous'
2020-04-20 11:34:57 +02:00
%p.explication-onglet Tous les dossiers qui ont été déposés sur cette démarche, quel que soit le statut.
2022-01-27 17:02:02 +01:00
- if @statut == 'supprimes_recemment'
%p.explication-onglet Tous les dossiers terminés et supprimés par les instructeurs sur cette démarche
2019-07-11 10:58:40 +02:00
- if @statut == 'archives'
2020-05-11 16:21:55 +02:00
%p.explication-onglet
Les dossiers de cet onglet sont archivés : vous ne pouvez plus y répondre, et les demandeurs ne peuvent plus les modifier.
%br
Ces dossiers seront supprimés lorsque leur délai de conservation dans Démarches-simplifiées
- if @procedure.duree_conservation_dossiers_dans_ds
= "(#{@procedure.duree_conservation_dossiers_dans_ds} mois)"
sera expiré.
= link_to 'En savoir plus', ARCHIVAGE_DOC_URL
2020-03-20 17:59:16 +01:00
.afficher-dossiers-supprimes
= link_to deleted_dossiers_instructeur_procedure_path(@procedure) do
%span.icon.delete
Afficher les dossiers supprimés
2021-12-01 17:39:47 +01:00
- if @statut == 'expirant'
%p.explication-onglet Les dossiers n'expireront pas avant la période de conservation des données.
2019-07-11 10:58:40 +02:00
2021-12-03 16:21:41 +01:00
2021-04-25 21:29:31 +02:00
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
2021-04-25 21:32:22 +02:00
- pagination = paginate @filtered_sorted_paginated_ids
= pagination
2018-09-11 17:51:44 +02:00
%span.dropdown
2020-09-14 11:28:24 +02:00
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'filter-menu' }
2018-09-11 17:51:44 +02:00
Filtrer
2020-09-14 11:28:24 +02:00
#filter-menu.dropdown-content.left-aligned.fade-in-down
2019-08-06 11:02:54 +02:00
= form_tag add_filter_instructeur_procedure_path(@procedure), method: :post, class: 'dropdown-form large' do
2017-09-28 11:04:18 +02:00
= label_tag :field, "Colonne"
2020-10-30 11:38:58 +01:00
= select_tag :field, options_for_select(@displayed_fields_options)
2017-09-28 11:04:18 +02:00
%br
= label_tag :value, "Valeur"
2021-07-20 14:00:29 +02:00
= text_field_tag :value, nil, maxlength: ProcedurePresentation::FILTERS_VALUE_MAX_LENGTH
2017-09-28 11:04:18 +02:00
= hidden_field_tag :statut, @statut
%br
= submit_tag "Ajouter le filtre", class: 'button'
2019-03-04 18:07:47 +01:00
- @current_filters.group_by { |filter| filter['table'] }.each_with_index do |(table, filters), i|
- if i > 0
et
- filters.each_with_index do |filter, i|
- if i > 0
ou
%span.filter
2020-10-30 15:07:44 +01:00
= link_to remove_filter_instructeur_procedure_path(@procedure, { statut: @statut, field: "#{filter['table']}/#{filter['column']}", value: filter['value'] }) do
2019-03-04 18:07:47 +01:00
%img.close-icon{ src: image_url("close.svg") }
2020-06-08 14:33:58 +02:00
= "#{filter['label'].truncate(50)} : #{@procedure_presentation.human_value_for_filter(filter)}"
2017-07-31 15:01:26 +02:00
%table.table.dossiers-table.hoverable
%thead
2017-07-11 15:40:09 +02:00
%tr
2019-09-23 15:36:27 +02:00
- if @statut.in? %w(suivis traites tous)
2017-11-01 20:40:33 +01:00
= render partial: "header_field", locals: { field: { "label" => "●", "table" => "notifications", "column" => "notifications" }, classname: "notification-col" }
- else
%th.notification-col
2017-09-25 10:46:09 +02:00
= render partial: "header_field", locals: { field: { "label" => "Nº dossier", "table" => "self", "column" => "id" }, classname: "number-col" }
2017-10-02 17:03:38 +02:00
2018-10-03 14:46:12 +02:00
- @procedure_presentation.displayed_fields.each do |field|
2017-09-25 10:46:09 +02:00
= render partial: "header_field", locals: { field: field, classname: "" }
= render partial: "header_field", locals: { field: { "label" => "Statut", "table" => "self", "column" => "state" }, classname: "status-col" }
2017-10-02 17:03:38 +02:00
2019-01-16 15:34:38 +01:00
%th.action-col.follow-col
2018-09-11 17:51:44 +02:00
%span.dropdown
2020-09-14 11:28:24 +02:00
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'custom-menu' }
2018-09-11 17:51:44 +02:00
Personnaliser
2020-09-14 11:28:24 +02:00
#custom-menu.dropdown-content.fade-in-down
2021-04-23 13:45:04 +02:00
= form_tag update_displayed_fields_instructeur_procedure_path(@procedure), method: :patch, class: 'dropdown-form large columns-form' do
2022-01-05 11:42:33 +01:00
= hidden_field_tag :values, nil
= react_component("ComboMultiple",
options: @displayed_fields_options,
selected: @displayed_fields_selected,
disabled: [],
label: 'Colonne à afficher',
group: '.columns-form',
name: 'values')
2021-02-11 15:32:00 +01:00
2017-10-02 17:03:38 +02:00
= submit_tag "Enregistrer", class: 'button'
2017-07-31 15:01:26 +02:00
%tbody
2021-04-21 12:03:15 +02:00
- @projected_dossiers.each do |p|
2021-04-26 10:35:22 +02:00
- path = instructeur_dossier_path(@procedure, p.dossier_id)
2021-11-24 10:35:34 +01:00
%tr{ class: [p.hidden_by_user_at.present? && "file-hidden-by-user"] }
2017-11-01 20:40:33 +01:00
%td.folder-col
2021-04-20 20:54:20 +02:00
%a.cell-link{ href: path }
2018-02-07 20:40:15 +01:00
%span.icon.folder
2021-04-26 10:35:22 +02:00
- if @not_archived_notifications_dossier_ids.include?(p.dossier_id)
2018-02-07 20:40:15 +01:00
%span.notifications{ 'aria-label': 'notifications' }
2017-11-01 20:40:33 +01:00
2017-07-31 15:01:26 +02:00
%td.number-col
2021-04-26 10:35:22 +02:00
%a.cell-link{ href: path }= p.dossier_id
2017-10-02 17:03:38 +02:00
2021-04-21 12:03:15 +02:00
- p.columns.each do |column|
2017-10-02 17:03:38 +02:00
%td
2021-11-24 10:35:34 +01:00
%a.cell-link{ href: path }
= column
= "- #{t('views.instructeurs.dossiers.deleted_by_user')}" if p.hidden_by_user_at.present?
2017-10-02 17:03:38 +02:00
2017-07-31 15:01:26 +02:00
%td.status-col
2021-04-26 10:35:22 +02:00
%a.cell-link{ href: path }= status_badge(p.state)
%td.action-col.follow-col= render partial: 'dossier_actions',
2021-12-03 16:09:51 +01:00
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),
2022-01-27 17:02:02 +01:00
close_to_expiration: @statut == 'expirant',
2022-02-01 17:52:38 +01:00
recently_deleted: @statut == 'supprimes_recemment' }
2021-04-20 20:54:20 +02:00
2021-04-25 21:32:22 +02:00
= pagination
2017-07-11 15:40:09 +02:00
- else
2017-09-20 17:07:09 +02:00
%h2.empty-text Aucun dossier