2023-06-29 15:03:22 +02:00
|
|
|
|
#header-top.fr-container
|
2024-11-29 11:56:34 +01:00
|
|
|
|
= render Instructeurs::DossiersNavigationComponent.new(dossier:, procedure_presentation:, statut: params[:statut])
|
2023-02-27 16:06:11 +01:00
|
|
|
|
|
2024-11-29 11:56:34 +01:00
|
|
|
|
.flex.fr-mb-3w
|
|
|
|
|
%div
|
|
|
|
|
.fr-mt-2w.badge-group
|
2023-06-08 15:07:43 +02:00
|
|
|
|
= procedure_badge(dossier.procedure)
|
|
|
|
|
|
|
|
|
|
= status_badge(dossier.state)
|
2024-01-24 17:01:59 +01:00
|
|
|
|
- if dossier.pending_correction?
|
|
|
|
|
= pending_correction_badge(:for_instructeur)
|
|
|
|
|
- elsif dossier.en_construction? && dossier.last_correction_resolved?
|
|
|
|
|
= correction_resolved_badge
|
2024-11-21 11:36:49 +01:00
|
|
|
|
= render Instructeurs::SVASVRDecisionBadgeComponent.new(dossier:, procedure: dossier.procedure, with_label: true)
|
2023-06-08 15:07:43 +02:00
|
|
|
|
|
2023-03-23 12:47:45 +01:00
|
|
|
|
|
2023-02-27 16:06:11 +01:00
|
|
|
|
.header-actions.fr-ml-auto
|
|
|
|
|
= render partial: 'instructeurs/dossiers/header_actions', locals: { dossier: }
|
|
|
|
|
= render partial: 'instructeurs/dossiers/print_and_export_actions', locals: { dossier: }
|
|
|
|
|
|
|
|
|
|
= render partial: 'instructeurs/dossiers/expiration_banner', locals: { dossier: }
|
|
|
|
|
|
|
|
|
|
- if dossier.user_deleted?
|
|
|
|
|
%p.fr-mb-1w
|
|
|
|
|
%small L’usager a supprimé son compte. Vous pouvez archiver puis supprimer le dossier.
|
2024-10-01 15:17:09 +02:00
|
|
|
|
|
2024-10-29 14:52:14 +01:00
|
|
|
|
- if dossier.procedure.labels.present?
|
2024-10-16 16:38:16 +02:00
|
|
|
|
.fr-mb-3w
|
2024-10-29 14:52:14 +01:00
|
|
|
|
- if dossier.labels.present?
|
|
|
|
|
- dossier.labels.each do |label|
|
2024-10-16 16:38:16 +02:00
|
|
|
|
= tag_label(label.name, label.color)
|
|
|
|
|
|
|
|
|
|
= render Dropdown::MenuComponent.new(wrapper: :span, button_options: { class: ['fr-btn--sm fr-btn--tertiary-no-outline fr-pl-1v']}, menu_options: { class: ['dropdown-label left-aligned'] }) do |menu|
|
2024-10-29 14:52:14 +01:00
|
|
|
|
- if dossier.labels.empty?
|
2024-10-16 16:38:16 +02:00
|
|
|
|
- menu.with_button_inner_html do
|
|
|
|
|
Ajouter un label
|
|
|
|
|
|
|
|
|
|
- menu.with_form do
|
|
|
|
|
= form_with(url: dossier_labels_instructeur_dossier_path(dossier_id: dossier.id, procedure_id: dossier.procedure.id), method: :post, class: 'fr-p-3w', data: { controller: 'autosubmit', turbo: 'true' }) do |f|
|
|
|
|
|
%fieldset.fr-fieldset.fr-mt-2w.fr-mb-0
|
2024-10-29 14:52:14 +01:00
|
|
|
|
= f.collection_check_boxes :label_id, dossier.procedure.labels, :id, :name, include_hidden: false do |b|
|
2024-10-16 16:38:16 +02:00
|
|
|
|
.fr-fieldset__element
|
|
|
|
|
.fr-checkbox-group.fr-checkbox-group--sm.fr-mb-1w
|
2024-10-29 14:52:14 +01:00
|
|
|
|
= b.check_box(checked: DossierLabel.find_by(dossier_id: dossier.id, label_id: b.value).present? )
|
2024-10-16 14:31:08 +02:00
|
|
|
|
= b.label(class: "fr-label fr-tag fr-tag--sm fr-tag--#{Label.colors.fetch(b.object.color)}") { b.text }
|
|
|
|
|
|
|
|
|
|
%hr
|
|
|
|
|
%p.fr-text--sm.fr-text-mention--grey.fr-mb-0
|
|
|
|
|
%b Besoin d'autres labels ?
|
|
|
|
|
%br
|
|
|
|
|
Contactez les
|
|
|
|
|
= link_to 'administrateurs de la démarche', administrateurs_instructeur_procedure_path(dossier.procedure), class: 'fr-link fr-link--sm', **external_link_attributes
|