demarches-normaliennes/app/views/shared/dossiers/_edit_annotations.html.haml
simon lehericey e64ac79f05 tech(refactor): much nicer code, thx LeSim
root -> rooted_tree

depth_cach -> walk

smal refactor

comment

remove form for header_section

remove seen_at from header section

header_section: champ -> header_section

champ_subree: remove if not

remove root_depth use header_section_level_value instead

remove unused include

remove ChampTreeComponent

rename ChampsSubtreeComponent to SectionComponent

use TreeableConcern only in section component

remove fields_for_champ_component

champs -> tail

add split_section_champ helper

refactor(editable_champ::header_section): keep same interface everywhere

fix(repetition): add spec for SectionComponent on repetitions
2023-04-20 08:22:02 +02:00

10 lines
526 B
Text

.container.dossier-edit
- if dossier.champs_private.present?
%section.counter-start-header-section
= render NestedForms::FormOwnerComponent.new
= form_for dossier, url: annotations_instructeur_dossier_path(dossier.procedure, dossier), html: { class: 'form', multipart: true } do |f|
= render EditableChamp::SectionComponent.new(champs: dossier.champs_private)
= render Dossiers::EditFooterComponent.new(dossier: dossier, annotation: true)
- else
%h2.empty-text Aucune annotation privée