Save SIRET data on search
This commit is contained in:
parent
d5d2f8cc18
commit
69a51e3296
13 changed files with 28 additions and 188 deletions
|
@ -1,44 +1,4 @@
|
|||
class Champs::SiretChamp < Champ
|
||||
ETABLISSEMENT_ATTRIBUTES = [
|
||||
:id,
|
||||
:_destroy,
|
||||
:signature,
|
||||
:siret,
|
||||
:siege_social,
|
||||
:naf,
|
||||
:libelle_naf,
|
||||
:adresse,
|
||||
:numero_voie,
|
||||
:type_voie,
|
||||
:nom_voie,
|
||||
:code_postal,
|
||||
:localite,
|
||||
:code_insee_localite,
|
||||
:entreprise_siren,
|
||||
:entreprise_capital_social,
|
||||
:entreprise_numero_tva_intracommunautaire,
|
||||
:entreprise_forme_juridique,
|
||||
:entreprise_forme_juridique_code,
|
||||
:entreprise_nom_commercial,
|
||||
:entreprise_raison_sociale,
|
||||
:entreprise_siret_siege_social,
|
||||
:entreprise_code_effectif_entreprise,
|
||||
:entreprise_date_creation,
|
||||
:entreprise_nom,
|
||||
:entreprise_prenom,
|
||||
:association_rna,
|
||||
:association_titre,
|
||||
:association_objet,
|
||||
:association_date_creation,
|
||||
:association_date_declaration,
|
||||
:association_date_publication,
|
||||
exercices_attributes: [
|
||||
[:id, :ca, :date_fin_exercice, :date_fin_exercice_timestamp]
|
||||
]
|
||||
]
|
||||
|
||||
accepts_nested_attributes_for :etablissement, allow_destroy: true, update_only: true
|
||||
|
||||
def search_terms
|
||||
etablissement.present? ? etablissement.search_terms : [value]
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue