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
|
2023-06-29 15:03:22 +02:00
|
|
|
.fr-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
|
2022-05-17 17:54:41 +02:00
|
|
|
- if @can_download_dossiers
|
2023-09-13 13:01:57 +02:00
|
|
|
= render Dossiers::ExportDropdownComponent.new(procedure: @procedure, export_url: method(:download_export_instructeur_procedure_path))
|
2022-03-11 13:57:53 +01:00
|
|
|
|
2023-06-29 15:03:22 +02:00
|
|
|
.fr-container.flex= render partial: "tabs", locals: { procedure: @procedure,
|
2021-09-23 15:03:20 +02:00
|
|
|
statut: @statut,
|
2022-03-31 18:28:12 +02:00
|
|
|
a_suivre_count: @counts[:a_suivre],
|
|
|
|
suivis_count: @counts[:suivis],
|
|
|
|
traites_count: @counts[:traites],
|
|
|
|
tous_count: @counts[:tous],
|
|
|
|
supprimes_recemment_count: @counts[:supprimes_recemment],
|
|
|
|
archives_count: @counts[:archives],
|
|
|
|
expirant_count: @counts[:expirant],
|
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
|
|
|
|
2023-06-29 15:03:22 +02:00
|
|
|
.fr-container.fr-highlight
|
2023-01-05 14:32:50 +01:00
|
|
|
- if @statut == 'a-suivre'
|
|
|
|
%p
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.a_suivre')
|
|
|
|
- if @statut == 'suivis'
|
|
|
|
%p
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.suivis')
|
|
|
|
- if @statut == 'traites'
|
|
|
|
%p
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.traites_html', archives_path: instructeur_archives_path(@procedure))
|
|
|
|
- if @statut == 'tous'
|
|
|
|
%p
|
2023-05-22 14:22:22 +02:00
|
|
|
- if @procedure.routing_enabled?
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.tous_with_routing')
|
|
|
|
- else
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.tous')
|
2023-01-05 14:32:50 +01:00
|
|
|
- if @statut == 'supprimes_recemment'
|
|
|
|
%p
|
2023-05-09 13:39:46 +02:00
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.supprimes_recemment').html_safe
|
2023-01-05 14:32:50 +01:00
|
|
|
- if @statut == 'archives'
|
|
|
|
%p
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.archives')
|
|
|
|
%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
|
|
|
|
- if @statut == 'expirant'
|
|
|
|
%p
|
|
|
|
= t('views.instructeurs.dossiers.tab_explainations.expirant')
|
2023-01-05 11:00:31 +01:00
|
|
|
|
2023-01-05 14:32:50 +01:00
|
|
|
.fr-container--fluid.fr-mx-4w.overflow-y-visible
|
2023-01-05 11:00:31 +01:00
|
|
|
%hr
|
2023-01-10 14:06:56 +01:00
|
|
|
.flex.align-center
|
2022-12-20 15:48:17 +01:00
|
|
|
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
|
2023-01-10 14:06:56 +01:00
|
|
|
= render partial: "dossiers_filter_dropdown", locals: { procedure: @procedure, statut: @statut}
|
|
|
|
= render Dossiers::NotifiedToggleComponent.new(procedure: @procedure, procedure_presentation: @procedure_presentation)
|
2022-12-20 15:48:17 +01:00
|
|
|
|
2023-01-05 11:00:31 +01:00
|
|
|
.fr-ml-auto
|
2023-09-05 17:14:18 +02:00
|
|
|
|
2023-01-05 11:00:31 +01:00
|
|
|
- if @statut == 'archives'
|
|
|
|
= link_to deleted_dossiers_instructeur_procedure_path(@procedure), class: "fr-link fr-icon-delete-line fr-link--icon-left fr-mr-2w" do
|
|
|
|
= t('views.instructeurs.dossiers.show_deleted_dossiers')
|
|
|
|
|
|
|
|
- if @dossiers_count > 0
|
|
|
|
%span.dossiers-export
|
2023-09-13 13:01:57 +02:00
|
|
|
= render Dossiers::ExportDropdownComponent.new(procedure: @procedure, statut: @statut, count: @dossiers_count, class_btn: 'fr-btn--tertiary', export_url: method(:download_export_instructeur_procedure_path))
|
2022-11-21 16:32:17 +01:00
|
|
|
|
2022-12-20 15:48:17 +01:00
|
|
|
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
|
2023-01-10 14:06:56 +01:00
|
|
|
= render partial: "dossiers_filter_tags", locals: { procedure: @procedure, procedure_presentation: @procedure_presentation, current_filters: @current_filters, statut: @statut }
|
|
|
|
|
2022-12-02 17:16:29 +01:00
|
|
|
- batch_operation_component = Dossiers::BatchOperationComponent.new(statut: @statut, procedure: @procedure)
|
2022-11-21 16:32:17 +01:00
|
|
|
|
2023-01-05 11:00:31 +01:00
|
|
|
- if @batch_operations.present?
|
|
|
|
- @batch_operations.each do |batch_operation|
|
|
|
|
= render Dossiers::BatchAlertComponent.new(batch: batch_operation, procedure: @procedure)
|
2022-12-01 11:22:20 +01:00
|
|
|
|
2023-01-05 11:00:31 +01:00
|
|
|
%div{ data: batch_operation_component.render? ? { controller: 'batch-operation' } : {} }
|
2023-01-13 15:36:13 +01:00
|
|
|
.flex.align-center.fr-mt-2w
|
2023-01-05 11:00:31 +01:00
|
|
|
%span.fr-h6.fr-mb-0.fr-mr-2w
|
2023-01-26 15:53:57 +01:00
|
|
|
= page_entries_info @filtered_sorted_paginated_ids
|
2023-01-10 14:06:56 +01:00
|
|
|
|
2023-01-05 11:00:31 +01:00
|
|
|
= render batch_operation_component
|
2023-01-20 11:21:06 +01:00
|
|
|
|
2022-11-21 16:32:17 +01:00
|
|
|
.fr-table.fr-table--bordered
|
2023-09-19 17:50:38 +02:00
|
|
|
%table.table.dossiers-table.hoverable.min-height-300
|
2022-11-21 16:32:17 +01:00
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
- if batch_operation_component.render?
|
2022-12-05 10:38:34 +01:00
|
|
|
%th.text-center
|
2023-04-14 17:41:22 +02:00
|
|
|
%input{ type: "checkbox", disabled: @disable_checkbox_all, checked: @disable_checkbox_all, data: { action: "batch-operation#onCheckAll" }, id: dom_id(BatchOperation.new, :checkbox_all), aria: { label: t('views.instructeurs.dossiers.select_all') } }
|
2022-03-11 13:57:53 +01:00
|
|
|
- else
|
2022-11-21 16:32:17 +01:00
|
|
|
- if @statut.in? %w(suivis traites tous)
|
2022-12-05 10:38:34 +01:00
|
|
|
= render partial: "header_field", locals: { field: { "label" => "●", "table" => "notifications", "column" => "notifications" }, classname: "notification-col text-center" }
|
2022-03-11 13:57:53 +01:00
|
|
|
- else
|
2022-11-21 16:32:17 +01:00
|
|
|
%th.notification-col
|
|
|
|
|
|
|
|
- @procedure_presentation.displayed_fields_for_headers.each do |field|
|
|
|
|
= render partial: "header_field", locals: { field: field, classname: field['classname'] }
|
|
|
|
|
2023-09-05 17:14:18 +02:00
|
|
|
%th.follow-col
|
2023-01-05 11:00:31 +01:00
|
|
|
Actions
|
2023-01-06 15:11:57 +01:00
|
|
|
|
2023-09-05 17:14:18 +02:00
|
|
|
%th.text-right
|
|
|
|
= render Dropdown::MenuComponent.new(wrapper: :span, button_options: { class: ['fr-btn--sm', 'fr-btn--tertiary-no-outline', 'fr-btn--icon-right', 'fr-icon-settings-5-line'] }, menu_options: { id: 'custom-menu' }) do |menu|
|
|
|
|
- menu.with_button_inner_html do
|
|
|
|
= t('views.instructeurs.dossiers.personalize')
|
|
|
|
- menu.with_form do
|
|
|
|
= form_tag update_displayed_fields_instructeur_procedure_path(@procedure), method: :patch, class: 'dropdown-form large columns-form' do
|
|
|
|
= hidden_field_tag :values, nil
|
|
|
|
= react_component("ComboMultiple",
|
|
|
|
options: @displayable_fields_for_select,
|
|
|
|
selected: @displayable_fields_selected,
|
|
|
|
disabled: [],
|
|
|
|
label: 'Colonne à afficher',
|
|
|
|
group: '.columns-form',
|
|
|
|
name: 'values')
|
|
|
|
|
|
|
|
= submit_tag t('views.instructeurs.dossiers.save'), class: 'fr-btn fr-btn--secondary'
|
|
|
|
|
2022-11-21 16:32:17 +01:00
|
|
|
|
|
|
|
%tbody
|
2023-01-30 17:03:30 +01:00
|
|
|
= render Dossiers::BatchSelectMoreComponent.new(dossiers_count: @dossiers_count, filtered_sorted_ids: @filtered_sorted_ids)
|
|
|
|
|
2022-11-21 16:32:17 +01:00
|
|
|
- @projected_dossiers.each do |p|
|
|
|
|
- path = instructeur_dossier_path(@procedure, p.dossier_id)
|
|
|
|
%tr{ class: [p.hidden_by_user_at.present? && "file-hidden-by-user"] }
|
2022-12-05 10:38:34 +01:00
|
|
|
%td.text-center
|
2022-11-21 16:32:17 +01:00
|
|
|
- if batch_operation_component.render?
|
|
|
|
- if p.batch_operation_id.present?
|
2023-04-05 10:40:20 +02:00
|
|
|
= check_box_tag :"batch_operation[dossier_ids][]", p.dossier_id, true, disabled: true, id: dom_id(BatchOperation.new, "checkbox_#{p.dossier_id}"), aria: { label: t('views.instructeurs.dossiers.batch_operation.disabled', dossier_id: p.dossier_id) }
|
2022-11-21 16:32:17 +01:00
|
|
|
- else
|
2023-04-05 10:40:20 +02:00
|
|
|
= check_box_tag :"batch_operation[dossier_ids][]", p.dossier_id, false, data: { batch_operation_target: "input", action: "batch-operation#onCheckOne", operations: batch_operation_component.operations_for_dossier(p).join(',') }, form: dom_id(BatchOperation.new), id: dom_id(BatchOperation.new, "checkbox_#{p.dossier_id}"), aria: { label: t('views.instructeurs.dossiers.batch_operation.enabled', dossier_id: p.dossier_id) }
|
2022-12-07 16:21:15 +01:00
|
|
|
|
|
|
|
- if @not_archived_notifications_dossier_ids.include?(p.dossier_id)
|
|
|
|
%span.notifications{ 'aria-label': 'notifications' }
|
2022-11-21 16:32:17 +01:00
|
|
|
- else
|
|
|
|
- if p.hidden_by_administration_at.present?
|
|
|
|
%span.cell-link
|
2023-11-28 09:50:43 +01:00
|
|
|
= dsfr_icon('fr-icon-file-text-line')
|
2022-11-21 16:32:17 +01:00
|
|
|
- else
|
|
|
|
%a.cell-link{ href: path }
|
2023-11-28 09:50:43 +01:00
|
|
|
= dsfr_icon('fr-icon-file-text-line')
|
|
|
|
- if @not_archived_notifications_dossier_ids.include?(p.dossier_id)
|
|
|
|
%span.notifications{ 'aria-label': 'notifications' }
|
2022-11-21 16:32:17 +01:00
|
|
|
|
|
|
|
%td.number-col
|
|
|
|
- if p.hidden_by_administration_at.present?
|
|
|
|
%span.cell-link= p.dossier_id
|
|
|
|
- else
|
|
|
|
%a.cell-link{ href: path }= p.dossier_id
|
|
|
|
|
|
|
|
- p.columns.each do |column|
|
|
|
|
%td
|
|
|
|
- if p.hidden_by_administration_at.present?
|
|
|
|
%span.cell-link
|
|
|
|
= column
|
|
|
|
= "- #{t('views.instructeurs.dossiers.deleted_by_user')}" if p.hidden_by_user_at.present?
|
2023-12-11 17:06:12 +01:00
|
|
|
- elsif p.for_tiers
|
|
|
|
%a.cell-link{ href: path }
|
|
|
|
= "#{column} (#{t('views.instructeurs.dossiers.acts_on_behalf')} #{p.prenom} #{p.nom})"
|
|
|
|
= "- #{t('views.instructeurs.dossiers.deleted_by_user')}" if p.hidden_by_user_at.present?
|
2022-11-21 16:32:17 +01:00
|
|
|
- else
|
|
|
|
%a.cell-link{ href: path }
|
|
|
|
= column
|
|
|
|
= "- #{t('views.instructeurs.dossiers.deleted_by_user')}" if p.hidden_by_user_at.present?
|
|
|
|
|
|
|
|
%td.status-col
|
2023-03-23 12:47:45 +01:00
|
|
|
- status = [status_badge(p.state)]
|
|
|
|
- status << pending_correction_badge(:for_instructeur, html_class: "fr-mt-1v") if p.pending_correction?
|
|
|
|
= link_to_if(p.hidden_by_administration_at.blank?, safe_join(status), path, class: class_names("cell-link": true, "fr-py-0": status.many?))
|
2022-11-21 16:32:17 +01:00
|
|
|
|
2023-06-07 19:11:37 +02:00
|
|
|
- if @procedure.sva_svr_enabled?
|
2023-06-07 17:25:41 +02:00
|
|
|
%td
|
2023-06-07 19:11:37 +02:00
|
|
|
%span.cell-link
|
2023-07-12 10:37:15 +02:00
|
|
|
= link_to_if p.hidden_by_administration_at.blank?, render(Instructeurs::SVASVRDecisionBadgeComponent.new(projection_or_dossier: p, procedure: @procedure)), path
|
2023-06-07 17:25:41 +02:00
|
|
|
|
2023-09-05 17:49:55 +02:00
|
|
|
%td.follow-col{ colspan:'2' }
|
2022-11-21 16:32:17 +01:00
|
|
|
%ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right
|
2023-04-07 10:43:21 +02:00
|
|
|
= render partial: 'instructeurs/procedures/dossier_actions', locals: { procedure_id: @procedure.id,
|
2022-11-21 16:32:17 +01:00
|
|
|
dossier_id: p.dossier_id,
|
|
|
|
state: p.state,
|
|
|
|
archived: p.archived,
|
|
|
|
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
|
|
|
close_to_expiration: @statut == 'expirant',
|
2023-02-24 15:48:29 +01:00
|
|
|
hidden_by_administration: @statut == 'supprimes_recemment',
|
2023-06-06 14:41:47 +02:00
|
|
|
sva_svr: @procedure.sva_svr_enabled?,
|
2023-04-18 18:06:24 +02:00
|
|
|
turbo: false,
|
|
|
|
with_menu: false }
|
2023-09-05 17:14:18 +02:00
|
|
|
|
2022-11-21 16:32:17 +01:00
|
|
|
%tfoot
|
|
|
|
%tr
|
2023-04-21 17:19:17 +02:00
|
|
|
%td.force-table-100{ colspan: @procedure_presentation.displayed_fields_for_headers.size + 2 }
|
|
|
|
= paginate @filtered_sorted_paginated_ids, views_prefix: 'shared'
|
2017-10-02 17:03:38 +02:00
|
|
|
|
2017-07-11 15:40:09 +02:00
|
|
|
- else
|
2022-04-13 15:44:29 +02:00
|
|
|
%h2.empty-text
|
|
|
|
= t('views.instructeurs.dossiers.no_file')
|