diff --git a/app/components/types_de_champ/conditions_component.rb b/app/components/types_de_champ_editor/conditions_component.rb similarity index 98% rename from app/components/types_de_champ/conditions_component.rb rename to app/components/types_de_champ_editor/conditions_component.rb index fff4ad938..3a68ee59b 100644 --- a/app/components/types_de_champ/conditions_component.rb +++ b/app/components/types_de_champ_editor/conditions_component.rb @@ -1,4 +1,4 @@ -class TypesDeChamp::ConditionsComponent < ApplicationComponent +class TypesDeChampEditor::ConditionsComponent < ApplicationComponent include Logic def initialize(tdc:, upper_tdcs:, procedure_id:) diff --git a/app/components/types_de_champ/conditions_component/conditions_component.fr.yml b/app/components/types_de_champ_editor/conditions_component/conditions_component.fr.yml similarity index 100% rename from app/components/types_de_champ/conditions_component/conditions_component.fr.yml rename to app/components/types_de_champ_editor/conditions_component/conditions_component.fr.yml diff --git a/app/components/types_de_champ/conditions_component/conditions_component.html.haml b/app/components/types_de_champ_editor/conditions_component/conditions_component.html.haml similarity index 90% rename from app/components/types_de_champ/conditions_component/conditions_component.html.haml rename to app/components/types_de_champ_editor/conditions_component/conditions_component.html.haml index 871cb2e9b..2cccb45b5 100644 --- a/app/components/types_de_champ/conditions_component/conditions_component.html.haml +++ b/app/components/types_de_champ_editor/conditions_component/conditions_component.html.haml @@ -5,7 +5,7 @@ %p.mr-2 Logique conditionnelle = logic_conditionnel_button - = render TypesDeChamp::ConditionsErrorsComponent.new(conditions: condition_per_row, upper_tdcs: @upper_tdcs) + = render TypesDeChampEditor::ConditionsErrorsComponent.new(conditions: condition_per_row, upper_tdcs: @upper_tdcs) - if @condition.present? %table.condition-table.mt-2.width-100 diff --git a/app/components/types_de_champ/conditions_errors_component.rb b/app/components/types_de_champ_editor/conditions_errors_component.rb similarity index 94% rename from app/components/types_de_champ/conditions_errors_component.rb rename to app/components/types_de_champ_editor/conditions_errors_component.rb index 5fa205bb2..fd7263274 100644 --- a/app/components/types_de_champ/conditions_errors_component.rb +++ b/app/components/types_de_champ_editor/conditions_errors_component.rb @@ -1,4 +1,4 @@ -class TypesDeChamp::ConditionsErrorsComponent < ApplicationComponent +class TypesDeChampEditor::ConditionsErrorsComponent < ApplicationComponent def initialize(conditions:, upper_tdcs:) @conditions, @upper_tdcs = conditions, upper_tdcs end diff --git a/app/components/types_de_champ/conditions_errors_component/conditions_errors_component.fr.yml b/app/components/types_de_champ_editor/conditions_errors_component/conditions_errors_component.fr.yml similarity index 100% rename from app/components/types_de_champ/conditions_errors_component/conditions_errors_component.fr.yml rename to app/components/types_de_champ_editor/conditions_errors_component/conditions_errors_component.fr.yml diff --git a/app/components/types_de_champ/conditions_errors_component/conditions_errors_component.html.haml b/app/components/types_de_champ_editor/conditions_errors_component/conditions_errors_component.html.haml similarity index 100% rename from app/components/types_de_champ/conditions_errors_component/conditions_errors_component.html.haml rename to app/components/types_de_champ_editor/conditions_errors_component/conditions_errors_component.html.haml diff --git a/spec/components/previews/types_de_champ/conditions_component_preview.rb b/spec/components/previews/types_de_champ_editor/conditions_component_preview.rb similarity index 87% rename from spec/components/previews/types_de_champ/conditions_component_preview.rb rename to spec/components/previews/types_de_champ_editor/conditions_component_preview.rb index 928023699..3edab6544 100644 --- a/spec/components/previews/types_de_champ/conditions_component_preview.rb +++ b/spec/components/previews/types_de_champ_editor/conditions_component_preview.rb @@ -1,11 +1,11 @@ -class TypesDeChamp::ConditionsComponentPreview < ViewComponent::Preview +class TypesDeChampEditor::ConditionsComponentPreview < ViewComponent::Preview include Logic def with_empty_condition tdc = TypeDeChamp.create(type_champ: :text, condition: empty_operator(empty, empty), libelle: 't') upper_tdcs = [] - render TypesDeChamp::ConditionsComponent.new( + render TypesDeChampEditor::ConditionsComponent.new( tdc: tdc, upper_tdcs: upper_tdcs, procedure_id: '1' ) end @@ -23,7 +23,7 @@ class TypesDeChamp::ConditionsComponentPreview < ViewComponent::Preview ]) tdc = TypeDeChamp.create(type_champ: :integer_number, condition: condition, libelle: 'nb de piece') - render TypesDeChamp::ConditionsComponent.new( + render TypesDeChampEditor::ConditionsComponent.new( tdc: tdc, upper_tdcs: upper_tdcs, procedure_id: '1' ) end @@ -43,7 +43,7 @@ class TypesDeChamp::ConditionsComponentPreview < ViewComponent::Preview tdc = TypeDeChamp.create(type_champ: :integer_number, condition: condition, libelle: 'nb de piece') - render TypesDeChamp::ConditionsComponent.new( + render TypesDeChampEditor::ConditionsComponent.new( tdc: tdc, upper_tdcs: upper_tdcs, procedure_id: '1' ) end diff --git a/spec/components/types_de_champ/conditions_component_spec.rb b/spec/components/types_de_champ_editor/conditions_component_spec.rb similarity index 98% rename from spec/components/types_de_champ/conditions_component_spec.rb rename to spec/components/types_de_champ_editor/conditions_component_spec.rb index d93c3a7c6..e4831f87b 100644 --- a/spec/components/types_de_champ/conditions_component_spec.rb +++ b/spec/components/types_de_champ_editor/conditions_component_spec.rb @@ -1,4 +1,4 @@ -describe TypesDeChamp::ConditionsComponent, type: :component do +describe TypesDeChampEditor::ConditionsComponent, type: :component do include Logic describe 'render' do diff --git a/spec/components/types_de_champ/conditions_errors_component_spec.rb b/spec/components/types_de_champ_editor/conditions_errors_component_spec.rb similarity index 94% rename from spec/components/types_de_champ/conditions_errors_component_spec.rb rename to spec/components/types_de_champ_editor/conditions_errors_component_spec.rb index 4a9bc8532..74ea2d8f5 100644 --- a/spec/components/types_de_champ/conditions_errors_component_spec.rb +++ b/spec/components/types_de_champ_editor/conditions_errors_component_spec.rb @@ -1,4 +1,4 @@ -describe TypesDeChamp::ConditionsErrorsComponent, type: :component do +describe TypesDeChampEditor::ConditionsErrorsComponent, type: :component do include Logic describe 'render' do