chore(prefill): remove unused prefill support on complex champs

This commit is contained in:
Paul Chavard 2024-10-09 11:26:53 +02:00
parent d51d3fd8ad
commit e56bc9d35b
No known key found for this signature in database
10 changed files with 19 additions and 103 deletions

View file

@ -298,10 +298,8 @@ class TypeDeChamp < ApplicationRecord
TypeDeChamp.type_champs.fetch(:repetition),
TypeDeChamp.type_champs.fetch(:multiple_drop_down_list),
TypeDeChamp.type_champs.fetch(:epci),
TypeDeChamp.type_champs.fetch(:annuaire_education),
TypeDeChamp.type_champs.fetch(:dossier_link),
TypeDeChamp.type_champs.fetch(:siret),
TypeDeChamp.type_champs.fetch(:rna)
TypeDeChamp.type_champs.fetch(:siret)
])
end

View file

@ -1,13 +0,0 @@
# frozen_string_literal: true
class TypesDeChamp::PrefillAnnuaireEducationTypeDeChamp < TypesDeChamp::PrefillTypeDeChamp
def to_assignable_attributes(champ, value)
return nil if value.blank?
{
id: champ.id,
external_id: value,
value: value
}
end
end

View file

@ -31,8 +31,6 @@ class TypesDeChamp::PrefillTypeDeChamp < SimpleDelegator
TypesDeChamp::PrefillAddressTypeDeChamp.new(type_de_champ, revision)
when TypeDeChamp.type_champs.fetch(:epci)
TypesDeChamp::PrefillEpciTypeDeChamp.new(type_de_champ, revision)
when TypeDeChamp.type_champs.fetch(:annuaire_education)
TypesDeChamp::PrefillAnnuaireEducationTypeDeChamp.new(type_de_champ, revision)
else
new(type_de_champ, revision)
end