move under types_de_champ_editor namespace

This commit is contained in:
simon lehericey 2022-07-07 11:18:47 +02:00
parent 5ea8842294
commit 0ffa23c259
9 changed files with 9 additions and 9 deletions

View file

@ -1,4 +1,4 @@
class TypesDeChamp::ConditionsComponent < ApplicationComponent class TypesDeChampEditor::ConditionsComponent < ApplicationComponent
include Logic include Logic
def initialize(tdc:, upper_tdcs:, procedure_id:) def initialize(tdc:, upper_tdcs:, procedure_id:)

View file

@ -5,7 +5,7 @@
%p.mr-2 Logique conditionnelle %p.mr-2 Logique conditionnelle
= logic_conditionnel_button = 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? - if @condition.present?
%table.condition-table.mt-2.width-100 %table.condition-table.mt-2.width-100

View file

@ -1,4 +1,4 @@
class TypesDeChamp::ConditionsErrorsComponent < ApplicationComponent class TypesDeChampEditor::ConditionsErrorsComponent < ApplicationComponent
def initialize(conditions:, upper_tdcs:) def initialize(conditions:, upper_tdcs:)
@conditions, @upper_tdcs = conditions, upper_tdcs @conditions, @upper_tdcs = conditions, upper_tdcs
end end

View file

@ -1,11 +1,11 @@
class TypesDeChamp::ConditionsComponentPreview < ViewComponent::Preview class TypesDeChampEditor::ConditionsComponentPreview < ViewComponent::Preview
include Logic include Logic
def with_empty_condition def with_empty_condition
tdc = TypeDeChamp.create(type_champ: :text, condition: empty_operator(empty, empty), libelle: 't') tdc = TypeDeChamp.create(type_champ: :text, condition: empty_operator(empty, empty), libelle: 't')
upper_tdcs = [] upper_tdcs = []
render TypesDeChamp::ConditionsComponent.new( render TypesDeChampEditor::ConditionsComponent.new(
tdc: tdc, upper_tdcs: upper_tdcs, procedure_id: '1' tdc: tdc, upper_tdcs: upper_tdcs, procedure_id: '1'
) )
end end
@ -23,7 +23,7 @@ class TypesDeChamp::ConditionsComponentPreview < ViewComponent::Preview
]) ])
tdc = TypeDeChamp.create(type_champ: :integer_number, condition: condition, libelle: 'nb de piece') 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' tdc: tdc, upper_tdcs: upper_tdcs, procedure_id: '1'
) )
end end
@ -43,7 +43,7 @@ class TypesDeChamp::ConditionsComponentPreview < ViewComponent::Preview
tdc = TypeDeChamp.create(type_champ: :integer_number, condition: condition, libelle: 'nb de piece') 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' tdc: tdc, upper_tdcs: upper_tdcs, procedure_id: '1'
) )
end end

View file

@ -1,4 +1,4 @@
describe TypesDeChamp::ConditionsComponent, type: :component do describe TypesDeChampEditor::ConditionsComponent, type: :component do
include Logic include Logic
describe 'render' do describe 'render' do

View file

@ -1,4 +1,4 @@
describe TypesDeChamp::ConditionsErrorsComponent, type: :component do describe TypesDeChampEditor::ConditionsErrorsComponent, type: :component do
include Logic include Logic
describe 'render' do describe 'render' do