2018-09-06 19:23:27 +02:00
|
|
|
|
- case siret
|
2023-01-16 15:14:53 +01:00
|
|
|
|
- when :invalid_length
|
2023-06-22 16:03:59 +02:00
|
|
|
|
%p.fr-error-text= t('errors.messages.invalid_siret_length')
|
2023-01-16 15:14:53 +01:00
|
|
|
|
|
|
|
|
|
- when :invalid_checksum
|
2023-06-22 16:03:59 +02:00
|
|
|
|
%p.fr-error-text= t('errors.messages.invalid_siret_checksum')
|
2018-09-06 19:23:27 +02:00
|
|
|
|
|
|
|
|
|
- when :not_found
|
2023-06-22 16:03:59 +02:00
|
|
|
|
%p.fr-error-text
|
|
|
|
|
Nous n’avons pas trouvé d’établissement correspondant à ce numéro de SIRET.
|
2024-04-24 15:50:42 +02:00
|
|
|
|
= link_to('Plus d’informations', t("links.common.faq.erreur_siret_url"))
|
2018-09-06 19:23:27 +02:00
|
|
|
|
|
2019-05-02 11:24:22 +02:00
|
|
|
|
- when :network_error
|
2023-06-22 16:03:59 +02:00
|
|
|
|
%p.fr-error-text= t('errors.messages.siret_network_error')
|
2019-05-02 11:24:22 +02:00
|
|
|
|
|
2022-09-19 10:27:20 +02:00
|
|
|
|
- when :api_entreprise_down
|
2023-06-22 16:03:59 +02:00
|
|
|
|
%p.fr-error-text= t('errors.messages.api_entreprise_down')
|
2022-09-19 10:27:20 +02:00
|
|
|
|
|
2023-03-20 13:00:50 +01:00
|
|
|
|
- when :empty
|
|
|
|
|
// NOOP
|
2018-09-06 19:23:27 +02:00
|
|
|
|
- else
|
2023-03-20 13:00:50 +01:00
|
|
|
|
- if siret.present? # NOTE: probably always true because siret is a symbol or the string value
|
2022-09-19 11:03:47 +02:00
|
|
|
|
- if siret == etablissement&.siret && raison_sociale_or_name(etablissement).present?
|
|
|
|
|
= render EditableChamp::EtablissementTitreComponent.new(etablissement: etablissement)
|
|
|
|
|
- else
|
2023-06-22 16:03:59 +02:00
|
|
|
|
%p.fr-info-text Ce SIRET existe, nous en récupérons les informations.
|