Merge pull request #1051 from sgmap/naf

An Etablissement’s libelle is its Libellé NAF, not its name
This commit is contained in:
gregoirenovel 2017-12-07 16:31:21 +01:00 committed by GitHub
commit ff1fa1df3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -71,7 +71,7 @@ class PreferenceListDossier < ActiveRecord::Base
{
siret: create_column('SIRET', table, 'siret', 'siret', 2),
libelle: create_column('Nom établissement', table, 'libelle_naf', 'libelle_naf', 3),
libelle: create_column('Libellé NAF', table, 'libelle_naf', 'libelle_naf', 3),
code_postal: create_column('Code postal', table, 'code_postal', 'code_postal', 1)
}
end

View file

@ -211,7 +211,7 @@ class Procedure < ActiveRecord::Base
fields << [
field_hash('SIRET', 'etablissement', 'siret'),
field_hash('Nom établissement', 'etablissement', 'libelle_naf'),
field_hash('Libellé NAF', 'etablissement', 'libelle_naf'),
field_hash('Code postal', 'etablissement', 'code_postal')
]
end

View file

@ -212,7 +212,7 @@ describe PreferenceListDossier do
describe 'libelle' do
subject { super()[:libelle] }
it { expect(subject[:libelle]).to eq 'Nom établissement' }
it { expect(subject[:libelle]).to eq 'Libellé NAF' }
it { expect(subject[:table]).to eq 'etablissement' }
it { expect(subject[:attr]).to eq 'libelle_naf' }
it { expect(subject[:attr_decorate]).to eq 'libelle_naf' }

View file

@ -447,7 +447,7 @@ describe Procedure do
{ "label" => 'SIRET siège social', "table" => 'entreprise', "column" => 'siret_siege_social' },
{ "label" => 'Date de création', "table" => 'entreprise', "column" => 'date_creation' },
{ "label" => 'SIRET', "table" => 'etablissement', "column" => 'siret' },
{ "label" => 'Nom établissement', "table" => 'etablissement', "column" => 'libelle_naf' },
{ "label" => 'Libellé NAF', "table" => 'etablissement', "column" => 'libelle_naf' },
{ "label" => 'Code postal', "table" => 'etablissement', "column" => 'code_postal' },
{ "label" => tdc_1.libelle, "table" => 'type_de_champ', "column" => tdc_1.id.to_s },
{ "label" => tdc_2.libelle, "table" => 'type_de_champ', "column" => tdc_2.id.to_s },