feat(instructeur): nest all instruction routes under statut params for back purpose
This commit is contained in:
parent
b426e51d87
commit
c260c43dac
30 changed files with 195 additions and 141 deletions
|
@ -1,2 +1,2 @@
|
|||
= render(Dsfr::SidemenuComponent.new) do |component|
|
||||
- component.with_links([{ name: t('helpers.sidemenu.see_avis'), url: avis_instructeur_dossier_path(@dossier.procedure, @dossier) }, { name: t('helpers.sidemenu.ask_avis'), url: avis_new_instructeur_dossier_path(@dossier.procedure, @dossier) }])
|
||||
- component.with_links([{ name: t('helpers.sidemenu.see_avis'), url: avis_instructeur_dossier_path(procedure_id: @dossier.procedure.id, statut: params[:statut], dossier_id: @dossier.id) }, { name: t('helpers.sidemenu.ask_avis'), url: avis_new_instructeur_dossier_path(@dossier.procedure, params[:statut], @dossier) }])
|
||||
|
|
|
@ -4,30 +4,30 @@
|
|||
- notifications_summary = current_instructeur.notifications_for_dossier(dossier)
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.request'),
|
||||
instructeur_dossier_path(dossier.procedure, dossier),
|
||||
instructeur_dossier_path(dossier.procedure, params[:statut], dossier),
|
||||
notification: notifications_summary[:demande])
|
||||
|
||||
- if gallery_attachments.present?
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.attachments'),
|
||||
pieces_jointes_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
pieces_jointes_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut]),
|
||||
notification: notifications_summary[:pieces_jointes])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.private_annotations'),
|
||||
annotations_privees_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
annotations_privees_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut]),
|
||||
notification: notifications_summary[:annotations_privees])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.external_opinion'),
|
||||
[avis_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
avis_new_instructeur_dossier_path(dossier.procedure, dossier)],
|
||||
[avis_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut]),
|
||||
avis_new_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut])],
|
||||
notification: notifications_summary[:avis])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.messaging'),
|
||||
messagerie_instructeur_dossier_path(dossier.procedure, dossier),
|
||||
messagerie_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut]),
|
||||
notification: notifications_summary[:messagerie])
|
||||
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.involved_persons'),
|
||||
personnes_impliquees_instructeur_dossier_path(dossier.procedure, dossier))
|
||||
personnes_impliquees_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut]))
|
||||
|
||||
- if dossier.procedure.routing_enabled?
|
||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.reaffectation'),
|
||||
reaffectation_instructeur_dossier_path(dossier.procedure, dossier))
|
||||
reaffectation_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut]))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.motivation{ class: class_names(popup_class => true, hidden: !defined?(visible) || !visible, "fr-pb-2w fr-px-2w": true) }
|
||||
= form_tag(defined?(form_path) ? form_path : terminer_instructeur_dossier_path(dossier.procedure, dossier), data: { turbo: true, turbo_confirm: confirm }, method: :post, multipart: true) do
|
||||
= form_tag(defined?(form_path) ? form_path : terminer_instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut]), data: { turbo: true, turbo_confirm: confirm }, method: :post, multipart: true) do
|
||||
- if title == 'Accepter'
|
||||
= text_area :dossier, :motivation, class: 'fr-input', placeholder: placeholder, required: false
|
||||
- if dossier.attestation_template&.activated?
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
Uniquement cet onglet
|
||||
|
||||
- menu.with_item do
|
||||
= link_to instructeur_dossier_path(dossier.procedure, dossier, format: :pdf), target: "_blank", rel: "noopener", class: "menu-item menu-link", role: 'menuitem' do
|
||||
= link_to instructeur_dossier_path(dossier.procedure, dossier, statut: params[:statut], format: :pdf), target: "_blank", rel: "noopener", class: "menu-item menu-link", role: 'menuitem' do
|
||||
Export PDF
|
||||
|
||||
- if dossier.geo_data?
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
.fr-col
|
||||
- if !@dossier.termine?
|
||||
- if @dossier.procedure.allow_expert_review
|
||||
= render partial: "shared/avis/form", locals: { url: avis_instructeur_dossier_path(@dossier.procedure, @dossier), linked_dossiers: @dossier.linked_dossiers_for(current_instructeur), must_be_confidentiel: false, avis: @avis }
|
||||
= render partial: "shared/avis/form", locals: { url: avis_instructeur_dossier_path(@dossier.procedure, params[:statut], @dossier), linked_dossiers: @dossier.linked_dossiers_for(current_instructeur), must_be_confidentiel: false, avis: @avis }
|
||||
- else
|
||||
%h2.empty-text
|
||||
= t('helpers.information_text.unauthorized_avis_text')
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
= render partial: "header", locals: { dossier: @dossier, gallery_attachments: @gallery_attachments }
|
||||
|
||||
= render partial: "shared/dossiers/messagerie", locals: { dossier: @dossier, connected_user: current_instructeur, messagerie_seen_at: @messagerie_seen_at , new_commentaire: @commentaire, form_url: commentaire_instructeur_dossier_path(@dossier.procedure, @dossier) }
|
||||
= render partial: "shared/dossiers/messagerie", locals: { dossier: @dossier, connected_user: current_instructeur, messagerie_seen_at: @messagerie_seen_at , new_commentaire: @commentaire, form_url: commentaire_instructeur_dossier_path(@dossier.procedure, @dossier, statut: params[:statut]) }
|
||||
|
|
|
@ -25,23 +25,23 @@
|
|||
= ""
|
||||
|
||||
- else
|
||||
= button_to repasser_en_instruction_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-edit-line', form: { data: { turbo: turbo ? 'true' : 'false' } } do
|
||||
= button_to repasser_en_instruction_instructeur_dossier_path(procedure_id, dossier_id, statut: params[:statut]), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-edit-line', form: { data: { turbo: turbo ? 'true' : 'false' } } do
|
||||
Repasser en instruction
|
||||
|
||||
= button_to archive_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-icon-folder-2-line' do
|
||||
= button_to archive_instructeur_dossier_path(procedure_id, dossier_id, statut: params[:statut]), method: :patch, class: 'fr-btn fr-icon-folder-2-line' do
|
||||
Archiver le dossier
|
||||
|
||||
= button_to instructeur_dossier_path(procedure_id, dossier_id), method: :delete, class: 'fr-btn fr-btn--secondary fr-icon-delete-line icon-only danger', title: t('views.instructeurs.dossiers.delete_dossier') do
|
||||
= button_to instructeur_dossier_path(procedure_id, dossier_id, statut: params[:statut]), method: :delete, class: 'fr-btn fr-btn--secondary fr-icon-delete-line icon-only danger', title: t('views.instructeurs.dossiers.delete_dossier') do
|
||||
= ""
|
||||
|
||||
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
|
||||
- if dossier_is_followed
|
||||
%li
|
||||
= button_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-fill' do
|
||||
= button_to unfollow_instructeur_dossier_path(procedure_id, statut: params[:statut], dossier_id:), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-fill' do
|
||||
= t('views.instructeurs.dossiers.stop_follow')
|
||||
- else
|
||||
%li
|
||||
= button_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-line' do
|
||||
= button_to follow_instructeur_dossier_path(procedure_id, statut: params[:statut], dossier_id:), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-line' do
|
||||
= t('views.instructeurs.dossiers.follow_file')
|
||||
|
||||
- if with_menu
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
- if Dossier.states[:en_construction] == state
|
||||
%li{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= button_to passer_en_instruction_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: 'fr-btn fr-icon-edit-line',
|
||||
= button_to passer_en_instruction_instructeur_dossier_path(procedure_id, statut: params[:statut], dossier_id:), method: :post, class: 'fr-btn fr-icon-edit-line',
|
||||
disabled: has_blocking_pending_correction, "aria-describedby" => has_blocking_pending_correction ? "tooltip-passer-en-instruction" : nil do
|
||||
= t('views.instructeurs.dossiers.passer_en_instruction')
|
||||
|
||||
|
@ -60,5 +60,5 @@
|
|||
|
||||
- elsif Dossier.states[:en_instruction] == state && !with_menu && !sva_svr
|
||||
%li{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= button_to repasser_en_construction_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-draft-line' do
|
||||
= button_to repasser_en_construction_instructeur_dossier_path(procedure_id, statut: params[:statut], dossier_id:), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-draft-line' do
|
||||
= t('views.instructeurs.dossiers.repasser_en_construction')
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
|
||||
- @projected_dossiers.each do |p|
|
||||
- dossier = p.dossier
|
||||
- path = instructeur_dossier_path(@procedure, dossier.id)
|
||||
- path = instructeur_dossier_path(@procedure, dossier.id, statut: params[:statut])
|
||||
%tr{ class: class_names("file-hidden-by-user" => dossier.hidden_by_user_at.present?), id: "table-dossiers-row-#{dossier.id}", "aria-selected" => "false", "data-row-key" => dossier.id }
|
||||
- if batch_operation_component.render?
|
||||
%th.fr-cell--fixed{ scope: 'row' }
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
= t('relance_effectuee_le', scope: 'views.shared.avis', date: l(avis.reminded_at, format: '%d/%m/%y à %H:%M'))
|
||||
- if expert_or_instructeur.is_a?(Instructeur)
|
||||
- if avis.answer.blank?
|
||||
= link_to(t('remind', scope: 'helpers.label'), remind_instructeur_avis_path(avis.procedure, avis), class:'fr-btn fr-btn--sm fr-btn--tertiary-no-outline', data: { confirm: t('remind', scope: 'helpers.confirmation', email: avis.expert.email) })
|
||||
= link_to(t('remind', scope: 'helpers.label'), remind_instructeur_avis_path(avis.procedure, params[:statut], avis), class:'fr-btn fr-btn--sm fr-btn--tertiary-no-outline', data: { confirm: t('remind', scope: 'helpers.confirmation', email: avis.expert.email) })
|
||||
|
||||
- if avis.revokable_by?(expert_or_instructeur)
|
||||
= link_to(t('revoke', scope: 'helpers.label'), revoquer_instructeur_avis_path(avis.procedure, avis), class:'fr-btn fr-btn--sm fr-btn--tertiary-no-outline', data: { confirm: t('revoke', scope: 'helpers.confirmation', email: avis.expert.email) }, method: :patch)
|
||||
= link_to(t('revoke', scope: 'helpers.label'), revoquer_instructeur_avis_path(avis.procedure, params[:statut], avis), class:'fr-btn fr-btn--sm fr-btn--tertiary-no-outline', data: { confirm: t('revoke', scope: 'helpers.confirmation', email: avis.expert.email) }, method: :patch)
|
||||
|
||||
.border-left
|
||||
- if avis.introduction_file.attached?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue