diff --git a/app/models/type_de_champ.rb b/app/models/type_de_champ.rb index a0f0409b3..fe3c8039f 100644 --- a/app/models/type_de_champ.rb +++ b/app/models/type_de_champ.rb @@ -47,6 +47,7 @@ class TypeDeChamp < ApplicationRecord dossier_link: 'dossier_link', piece_justificative: 'piece_justificative', siret: 'siret', + rna: 'rna', carte: 'carte', repetition: 'repetition', titre_identite: 'titre_identite', @@ -261,6 +262,10 @@ class TypeDeChamp < ApplicationRecord type_champ == TypeDeChamp.type_champs.fetch(:cnaf) end + def rna? + type_champ == TypeDeChamp.type_champs.fetch(:rna) + end + def dgfip? type_champ == TypeDeChamp.type_champs.fetch(:dgfip) end diff --git a/app/models/types_de_champ/rna_type_de_champ.rb b/app/models/types_de_champ/rna_type_de_champ.rb new file mode 100644 index 000000000..01bf96815 --- /dev/null +++ b/app/models/types_de_champ/rna_type_de_champ.rb @@ -0,0 +1,5 @@ +class TypesDeChamp::RNATypeDeChamp < TypesDeChamp::TypeDeChampBase + def estimated_fill_duration(revision) + FILL_DURATION_MEDIUM + end +end diff --git a/config/locales/models/type_de_champ/fr.yml b/config/locales/models/type_de_champ/fr.yml index a1a77f807..436a7fe8a 100644 --- a/config/locales/models/type_de_champ/fr.yml +++ b/config/locales/models/type_de_champ/fr.yml @@ -31,6 +31,7 @@ fr: dossier_link: 'Lien vers un autre dossier' piece_justificative: 'Pièce justificative' siret: 'SIRET' + rna: 'RNA' carte: 'Carte' repetition: 'Bloc répétable' titre_identite: 'Titre identité' diff --git a/spec/factories/type_de_champ.rb b/spec/factories/type_de_champ.rb index 0406bb84e..6a69f55c2 100644 --- a/spec/factories/type_de_champ.rb +++ b/spec/factories/type_de_champ.rb @@ -143,6 +143,9 @@ FactoryBot.define do factory :type_de_champ_siret do type_champ { TypeDeChamp.type_champs.fetch(:siret) } end + factory :type_de_champ_rna do + type_champ { TypeDeChamp.type_champs.fetch(:rna) } + end factory :type_de_champ_iban do type_champ { TypeDeChamp.type_champs.fetch(:iban) } end