2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-08-12 10:45:04 +02:00
|
|
|
class EditableChamp::RepetitionRowComponent < ApplicationComponent
|
2024-03-14 15:13:13 +01:00
|
|
|
def initialize(form:, dossier:, type_de_champ:, row_id:, row_number:, seen_at: nil)
|
|
|
|
@form, @dossier, @type_de_champ, @row_id, @row_number, @seen_at = form, dossier, type_de_champ, row_id, row_number, seen_at
|
|
|
|
@types_de_champ = dossier.revision.children_of(type_de_champ)
|
2023-11-28 17:27:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
attr_reader :row_id, :row_number
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def section_component
|
2024-03-14 15:13:13 +01:00
|
|
|
EditableChamp::SectionComponent.new(dossier: @dossier, types_de_champ: @types_de_champ, row_id:)
|
2022-08-12 10:45:04 +02:00
|
|
|
end
|
|
|
|
end
|