procedure: remove individual_with_siret

It isn't used anymore (see #3077)
This commit is contained in:
Pierre de La Morinerie 2019-07-10 18:27:26 +02:00
parent 34cc3793a8
commit c2c9b19b3b
5 changed files with 4 additions and 5 deletions

View file

@ -269,7 +269,7 @@ class Admin::ProceduresController < AdminController
if @procedure&.locked? if @procedure&.locked?
params.require(:procedure).permit(*editable_params) params.require(:procedure).permit(*editable_params)
else else
params.require(:procedure).permit(*editable_params, :duree_conservation_dossiers_dans_ds, :duree_conservation_dossiers_hors_ds, :for_individual, :individual_with_siret, :ask_birthday, :path) params.require(:procedure).permit(*editable_params, :duree_conservation_dossiers_dans_ds, :duree_conservation_dossiers_hors_ds, :for_individual, :ask_birthday, :path)
end end
end end
end end

View file

@ -24,7 +24,6 @@ class ProcedureDashboard < Administrate::BaseDashboard
created_at: Field::DateTime, created_at: Field::DateTime,
updated_at: Field::DateTime, updated_at: Field::DateTime,
for_individual: Field::Boolean, for_individual: Field::Boolean,
individual_with_siret: Field::Boolean,
auto_archive_on: Field::DateTime, auto_archive_on: Field::DateTime,
published_at: Field::DateTime, published_at: Field::DateTime,
hidden_at: Field::DateTime, hidden_at: Field::DateTime,
@ -75,7 +74,6 @@ class ProcedureDashboard < Administrate::BaseDashboard
:types_de_champ_private, :types_de_champ_private,
:types_de_piece_justificative, :types_de_piece_justificative,
:for_individual, :for_individual,
:individual_with_siret,
:auto_archive_on, :auto_archive_on,
:gestionnaires, :gestionnaires,
:initiated_mail_template, :initiated_mail_template,

View file

@ -3,6 +3,8 @@ require Rails.root.join('lib', 'percentile')
class Procedure < ApplicationRecord class Procedure < ApplicationRecord
MAX_DUREE_CONSERVATION = 36 MAX_DUREE_CONSERVATION = 36
self.ignored_columns = [:individual_with_siret]
has_many :types_de_piece_justificative, -> { ordered }, inverse_of: :procedure, dependent: :destroy has_many :types_de_piece_justificative, -> { ordered }, inverse_of: :procedure, dependent: :destroy
has_many :types_de_champ, -> { root.public_only.ordered }, inverse_of: :procedure, dependent: :destroy has_many :types_de_champ, -> { root.public_only.ordered }, inverse_of: :procedure, dependent: :destroy
has_many :types_de_champ_private, -> { root.private_only.ordered }, class_name: 'TypeDeChamp', inverse_of: :procedure, dependent: :destroy has_many :types_de_champ_private, -> { root.private_only.ordered }, class_name: 'TypeDeChamp', inverse_of: :procedure, dependent: :destroy

View file

@ -30,7 +30,7 @@ class ProcedurePresentation < ApplicationRecord
) )
end end
if !procedure.for_individual || (procedure.for_individual && procedure.individual_with_siret) if !procedure.for_individual
fields.push( fields.push(
field_hash('SIREN', 'etablissement', 'entreprise_siren'), field_hash('SIREN', 'etablissement', 'entreprise_siren'),
field_hash('Forme juridique', 'etablissement', 'entreprise_forme_juridique'), field_hash('Forme juridique', 'etablissement', 'entreprise_forme_juridique'),

View file

@ -323,7 +323,6 @@ describe Admin::ProceduresController, type: :controller do
it { expect(subject.direction).to eq procedure_params[:direction] } it { expect(subject.direction).to eq procedure_params[:direction] }
it { expect(subject.for_individual).not_to eq procedure_params[:for_individual] } it { expect(subject.for_individual).not_to eq procedure_params[:for_individual] }
it { expect(subject.individual_with_siret).not_to eq procedure_params[:individual_with_siret] }
end end
end end
end end