Merge pull request #4078 from betagouv/remove-individual-with-siret
Suppression du code de `individual_with_siret` sur `Procedure`
This commit is contained in:
commit
3e43ef029e
5 changed files with 4 additions and 5 deletions
|
@ -269,7 +269,7 @@ class Admin::ProceduresController < AdminController
|
|||
if @procedure&.locked?
|
||||
params.require(:procedure).permit(*editable_params)
|
||||
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
|
||||
|
|
|
@ -24,7 +24,6 @@ class ProcedureDashboard < Administrate::BaseDashboard
|
|||
created_at: Field::DateTime,
|
||||
updated_at: Field::DateTime,
|
||||
for_individual: Field::Boolean,
|
||||
individual_with_siret: Field::Boolean,
|
||||
auto_archive_on: Field::DateTime,
|
||||
published_at: Field::DateTime,
|
||||
hidden_at: Field::DateTime,
|
||||
|
@ -75,7 +74,6 @@ class ProcedureDashboard < Administrate::BaseDashboard
|
|||
:types_de_champ_private,
|
||||
:types_de_piece_justificative,
|
||||
:for_individual,
|
||||
:individual_with_siret,
|
||||
:auto_archive_on,
|
||||
:gestionnaires,
|
||||
:initiated_mail_template,
|
||||
|
|
|
@ -3,6 +3,8 @@ require Rails.root.join('lib', 'percentile')
|
|||
class Procedure < ApplicationRecord
|
||||
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_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
|
||||
|
|
|
@ -30,7 +30,7 @@ class ProcedurePresentation < ApplicationRecord
|
|||
)
|
||||
end
|
||||
|
||||
if !procedure.for_individual || (procedure.for_individual && procedure.individual_with_siret)
|
||||
if !procedure.for_individual
|
||||
fields.push(
|
||||
field_hash('SIREN', 'etablissement', 'entreprise_siren'),
|
||||
field_hash('Forme juridique', 'etablissement', 'entreprise_forme_juridique'),
|
||||
|
|
|
@ -323,7 +323,6 @@ describe Admin::ProceduresController, type: :controller do
|
|||
it { expect(subject.direction).to eq procedure_params[:direction] }
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue