refactor(instruction): menu repasser en construction + demander une correction
This commit is contained in:
parent
3c4ea6f8cf
commit
fd4a9a6a2f
15 changed files with 164 additions and 70 deletions
|
@ -2,12 +2,14 @@
|
|||
= render partial: "instructeurs/procedures/dossier_actions",
|
||||
locals: { procedure_id: dossier.procedure.id,
|
||||
dossier_id: dossier.id,
|
||||
dossier: dossier,
|
||||
state: dossier.state,
|
||||
archived: dossier.archived,
|
||||
dossier_is_followed: current_instructeur&.follow?(dossier),
|
||||
close_to_expiration: dossier.close_to_expiration?,
|
||||
hidden_by_administration: dossier.hidden_by_administration?,
|
||||
turbo: true }
|
||||
turbo: true,
|
||||
with_menu: true }
|
||||
|
||||
%li.instruction-button
|
||||
= render Instructeurs::InstructionMenuComponent.new(dossier:)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.motivation{ class: class_names(popup_class => true, hidden: !defined?(visible) || !visible) }
|
||||
.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
|
||||
- if title == 'Accepter'
|
||||
= text_area :dossier, :motivation, class: 'fr-input', placeholder: placeholder, required: false
|
||||
|
|
|
@ -29,11 +29,15 @@
|
|||
= ""
|
||||
|
||||
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
|
||||
- if with_menu
|
||||
%li.en-construction-menu{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= render Instructeurs::EnConstructionMenuComponent.new(dossier:)
|
||||
|
||||
- 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-btn--secondary fr-icon-edit-line' do
|
||||
Passer en instruction
|
||||
- elsif Dossier.states[:en_instruction] == state
|
||||
- elsif Dossier.states[:en_instruction] == state && !with_menu
|
||||
%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
|
||||
Repasser en construction
|
||||
|
|
|
@ -183,7 +183,8 @@
|
|||
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
||||
close_to_expiration: @statut == 'expirant',
|
||||
hidden_by_administration: @statut == 'supprimes_recemment',
|
||||
turbo: false }
|
||||
turbo: false,
|
||||
with_menu: false }
|
||||
%tfoot
|
||||
%tr
|
||||
%td.force-table-100{ colspan: @procedure_presentation.displayed_fields_for_headers.size + 2 }
|
||||
|
|
|
@ -101,7 +101,8 @@
|
|||
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
||||
close_to_expiration: nil,
|
||||
hidden_by_administration: nil,
|
||||
turbo: false }
|
||||
turbo: false,
|
||||
with_menu: false }
|
||||
|
||||
- else
|
||||
%td
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue