diff --git a/app/graphql/schema.graphql b/app/graphql/schema.graphql index 5f73dbc34..24e02e2d3 100644 --- a/app/graphql/schema.graphql +++ b/app/graphql/schema.graphql @@ -1869,6 +1869,11 @@ enum TypeDeChamp { """ civilite + """ + Données de la Caisse nationale des allocations familiales + """ + cnaf + """ Communes """ diff --git a/app/models/type_de_champ.rb b/app/models/type_de_champ.rb index 2976b6e7d..6511e7f51 100644 --- a/app/models/type_de_champ.rb +++ b/app/models/type_de_champ.rb @@ -48,7 +48,8 @@ class TypeDeChamp < ApplicationRecord repetition: 'repetition', titre_identite: 'titre_identite', iban: 'iban', - annuaire_education: 'annuaire_education' + annuaire_education: 'annuaire_education', + cnaf: 'cnaf' } belongs_to :revision, class_name: 'ProcedureRevision', optional: true diff --git a/app/models/types_de_champ/cnaf_type_de_champ.rb b/app/models/types_de_champ/cnaf_type_de_champ.rb new file mode 100644 index 000000000..2702bec84 --- /dev/null +++ b/app/models/types_de_champ/cnaf_type_de_champ.rb @@ -0,0 +1,2 @@ +class TypesDeChamp::CnafTypeDeChamp < TypesDeChamp::TextTypeDeChamp +end diff --git a/config/locales/models/type_de_champ/fr.yml b/config/locales/models/type_de_champ/fr.yml index 9d42446f4..15a4d2aad 100644 --- a/config/locales/models/type_de_champ/fr.yml +++ b/config/locales/models/type_de_champ/fr.yml @@ -36,3 +36,5 @@ fr: titre_identite: 'Titre identité' iban: 'Iban' annuaire_education: 'Annuaire de l’éducation' + cnaf: 'Données de la Caisse nationale des allocations familiales' + diff --git a/spec/factories/type_de_champ.rb b/spec/factories/type_de_champ.rb index ae6fa4cc1..9f5223e86 100644 --- a/spec/factories/type_de_champ.rb +++ b/spec/factories/type_de_champ.rb @@ -151,6 +151,9 @@ FactoryBot.define do factory :type_de_champ_annuaire_education do type_champ { TypeDeChamp.type_champs.fetch(:annuaire_education) } end + factory :type_de_champ_cnaf do + type_champ { TypeDeChamp.type_champs.fetch(:cnaf) } + end factory :type_de_champ_carte do type_champ { TypeDeChamp.type_champs.fetch(:carte) } end diff --git a/spec/services/procedure_export_service_spec.rb b/spec/services/procedure_export_service_spec.rb index bca98ba9c..6888e77e1 100644 --- a/spec/services/procedure_export_service_spec.rb +++ b/spec/services/procedure_export_service_spec.rb @@ -77,6 +77,7 @@ describe ProcedureExportService do "titre_identite", "iban", "annuaire_education", + "cnaf", "text" ] end @@ -164,6 +165,7 @@ describe ProcedureExportService do "titre_identite", "iban", "annuaire_education", + "cnaf", "text" ] end @@ -247,6 +249,7 @@ describe ProcedureExportService do "titre_identite", "iban", "annuaire_education", + "cnaf", "text" ] end