fix: hide useless information and use PF link #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolve :
This pull request introduces several changes to the handling and validation of SIRET numbers, updates to the user interface, and modifications to test cases and constants. The most important changes include adding validation for SIRET length, updating the user interface to comment out certain fields, and updating constants and translations for SIRET length.
Validation and Constants Updates:
app/models/champs/siret_champ.rb
: Added a private methodvalidate_siret_length
to ensure the SIRET number has at least 9 characters.config/initializers/constants.rb
: UpdatedSIRET_LENGTHS
to include both 9 and 14 as valid lengths for TAHITI and SIRET numbers.config/locales/en.yml
andconfig/locales/fr.yml
: Updated the error message for invalid SIRET length to reflect the new valid lengths (9 or 14 characters). [1] [2]User Interface Changes:
app/views/shared/dossiers/_identite_entreprise.html.haml
: Commented out several fields related to entreprise effectif, TVA number, capital social, and chiffre d’affaires. [1] [2]app/views/users/dossiers/siret.html.haml
: Updated the link in the help text to point toispf.pf/rte
instead ofannuaire-entreprises.data.gouv.fr
.Test Case Updates:
spec/controllers/champs/siret_controller_spec.rb
: Updated test cases to reflect the new valid SIRET lengths and corrected the expected error message. [1] [2]spec/models/dossier_spec.rb
: Modified test cases to validate the new SIRET length requirements and ensure proper error messages are displayed.