allow rna prefill
This commit is contained in:
parent
396ebbcf2b
commit
7e55aca107
5 changed files with 11 additions and 5 deletions
|
@ -273,7 +273,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(:siret)
|
||||
TypeDeChamp.type_champs.fetch(:siret),
|
||||
TypeDeChamp.type_champs.fetch(:rna)
|
||||
])
|
||||
end
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ en:
|
|||
datetime_html: ISO8601 datetime
|
||||
drop_down_list_other_html: Any value
|
||||
siret_html: A SIRET number
|
||||
rna_html: A RNA number
|
||||
repetition_html: A array of hashes with possible values for each field of the repetition.
|
||||
epci_html: An array of the department code and the <a href="https://geo.api.gouv.fr/epcis" target="_blank" rel="noopener noreferrer">EPCI one</a>.
|
||||
examples:
|
||||
|
@ -155,7 +156,8 @@ en:
|
|||
date: "2023-02-01"
|
||||
datetime: "2023-02-01T10:30"
|
||||
checkbox: "true"
|
||||
siret: 13002526500013
|
||||
rna: "W503726238"
|
||||
siret: "13002526500013"
|
||||
prefill_link_title: Prefill link (GET)
|
||||
prefill_link_info: Use the button to copy the link, then remplace the values with your data.
|
||||
prefill_link_too_long: Warning, the prefill link is too long and may not work on all browsers.
|
||||
|
|
|
@ -127,6 +127,7 @@ fr:
|
|||
datetime_html: Datetime au format ISO8601
|
||||
date_html: Date au format ISO8601
|
||||
drop_down_list_other_html: Toute valeur
|
||||
rna_html: Un numéro RNA
|
||||
siret_html: Un numéro de SIRET
|
||||
repetition_html: Un tableau de dictionnaires avec les valeurs possibles pour chaque champ de la répétition.
|
||||
epci_html: Un tableau contenant le code de département et <a href="https://geo.api.gouv.fr/epcis" target="_blank" rel="noopener noreferrer">celui de l'EPCI</a>.
|
||||
|
@ -147,7 +148,8 @@ fr:
|
|||
date: "2023-02-01"
|
||||
datetime: "2023-02-01T10:30"
|
||||
checkbox: "true"
|
||||
siret: 13002526500013
|
||||
rna: "W503726238"
|
||||
siret: "13002526500013"
|
||||
prefill_link_title: Lien de préremplissage (GET)
|
||||
prefill_link_info: Copiez le lien grâce au bouton ci-dessous et remplacez les valeurs par les données dont vous disposez.
|
||||
prefill_link_too_long: Attention, ce lien de préremplissage est trop long et risque de ne pas fonctionner sur certains navigateurs.
|
||||
|
|
|
@ -143,6 +143,7 @@ RSpec.describe PrefillParams do
|
|||
it_behaves_like "a champ public value that is authorized", :multiple_drop_down_list, ["val1", "val2"]
|
||||
it_behaves_like "a champ public value that is authorized", :epci, ['01', '200042935']
|
||||
it_behaves_like "a champ public value that is authorized", :siret, "13002526500013"
|
||||
it_behaves_like "a champ public value that is authorized", :rna, "value"
|
||||
|
||||
context "when the public type de champ is authorized (repetition)" do
|
||||
let(:types_de_champ_public) { [{ type: :repetition, children: [{ type: :text }] }] }
|
||||
|
@ -176,6 +177,7 @@ RSpec.describe PrefillParams do
|
|||
it_behaves_like "a champ private value that is authorized", :checkbox, "false"
|
||||
it_behaves_like "a champ private value that is authorized", :drop_down_list, "value"
|
||||
it_behaves_like "a champ private value that is authorized", :regions, "93"
|
||||
it_behaves_like "a champ private value that is authorized", :rna, "value"
|
||||
it_behaves_like "a champ private value that is authorized", :siret, "13002526500013"
|
||||
it_behaves_like "a champ private value that is authorized", :departements, "03"
|
||||
it_behaves_like "a champ private value that is authorized", :communes, ['01', '01457']
|
||||
|
@ -219,7 +221,6 @@ RSpec.describe PrefillParams do
|
|||
it_behaves_like "a champ public value that is unauthorized", :regions, "value"
|
||||
it_behaves_like "a champ public value that is unauthorized", :departements, "value"
|
||||
it_behaves_like "a champ public value that is unauthorized", :communes, "value"
|
||||
it_behaves_like "a champ public value that is unauthorized", :rna, "value"
|
||||
it_behaves_like "a champ public value that is unauthorized", :annuaire_education, "value"
|
||||
it_behaves_like "a champ public value that is unauthorized", :multiple_drop_down_list, ["value"]
|
||||
|
||||
|
|
|
@ -256,6 +256,7 @@ describe TypeDeChamp do
|
|||
it_behaves_like "a prefillable type de champ", :type_de_champ_multiple_drop_down_list
|
||||
it_behaves_like "a prefillable type de champ", :type_de_champ_epci
|
||||
it_behaves_like "a prefillable type de champ", :type_de_champ_siret
|
||||
it_behaves_like "a prefillable type de champ", :type_de_champ_rna
|
||||
|
||||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_number
|
||||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_dossier_link
|
||||
|
@ -270,7 +271,6 @@ describe TypeDeChamp do
|
|||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_mesri
|
||||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_carte
|
||||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_address
|
||||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_rna
|
||||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_annuaire_education
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue