Add SIRET Type De Champ
This commit is contained in:
parent
0b79a3d79d
commit
45ef32e6d9
18 changed files with 210 additions and 5 deletions
|
@ -0,0 +1,6 @@
|
|||
= message
|
||||
- if etablissement.present?
|
||||
- champ_attributes = etablissement.champ.private? ? 'champs_private_attributes' : 'champs_attributes'
|
||||
= fields_for "dossier[#{champ_attributes}][#{position}][etablissement_attributes]", etablissement do |form|
|
||||
= form.hidden_field :_destroy
|
||||
|
4
app/views/shared/champs/siret/_etablissement.html.haml
Normal file
4
app/views/shared/champs/siret/_etablissement.html.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
= render partial: 'shared/dossiers/editable_champs/etablissement_titre', locals: { etablissement: etablissement }
|
||||
- champ_attributes = etablissement.champ.private? ? 'champs_private_attributes' : 'champs_attributes'
|
||||
= fields_for "dossier[#{champ_attributes}][#{position}][etablissement_attributes]", etablissement do |form|
|
||||
= render partial: 'shared/dossiers/editable_champs/etablissement', locals: { form: form, signature: etablissement.sign }
|
|
@ -0,0 +1,34 @@
|
|||
= form.hidden_field :signature, value: signature
|
||||
= form.hidden_field :siret
|
||||
= form.hidden_field :siege_social
|
||||
= form.hidden_field :naf
|
||||
= form.hidden_field :libelle_naf
|
||||
= form.hidden_field :adresse
|
||||
= form.hidden_field :numero_voie
|
||||
= form.hidden_field :type_voie
|
||||
= form.hidden_field :nom_voie
|
||||
= form.hidden_field :code_postal
|
||||
= form.hidden_field :localite
|
||||
= form.hidden_field :code_insee_localite
|
||||
= form.hidden_field :entreprise_siren
|
||||
= form.hidden_field :entreprise_capital_social
|
||||
= form.hidden_field :entreprise_numero_tva_intracommunautaire
|
||||
= form.hidden_field :entreprise_forme_juridique
|
||||
= form.hidden_field :entreprise_forme_juridique_code
|
||||
= form.hidden_field :entreprise_nom_commercial
|
||||
= form.hidden_field :entreprise_raison_sociale
|
||||
= form.hidden_field :entreprise_siret_siege_social
|
||||
= form.hidden_field :entreprise_code_effectif_entreprise
|
||||
= form.hidden_field :entreprise_date_creation
|
||||
= form.hidden_field :entreprise_nom
|
||||
= form.hidden_field :entreprise_prenom
|
||||
= form.hidden_field :association_rna
|
||||
= form.hidden_field :association_titre
|
||||
= form.hidden_field :association_objet
|
||||
= form.hidden_field :association_date_creation
|
||||
= form.hidden_field :association_date_declaration
|
||||
= form.hidden_field :association_date_publication
|
||||
= form.fields_for :exercices do |form|
|
||||
= form.hidden_field :ca
|
||||
= form.hidden_field :date_fin_exercice
|
||||
= form.hidden_field :date_fin_exercice_timestamp
|
|
@ -0,0 +1,6 @@
|
|||
.etablissement-titre
|
||||
= etablissement.titre
|
||||
= etablissement.entreprise_forme_juridique
|
||||
- if etablissement.entreprise_capital_social.present?
|
||||
au capital social de
|
||||
= number_to_currency(etablissement.entreprise_capital_social)
|
10
app/views/shared/dossiers/editable_champs/_siret.html.haml
Normal file
10
app/views/shared/dossiers/editable_champs/_siret.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
= form.text_field :value,
|
||||
placeholder: champ.libelle,
|
||||
class: 'small-margin',
|
||||
data: { siret: champs_siret_path(format: :js, champ_id: champ) },
|
||||
required: champ.mandatory?
|
||||
%div{ id: "etablissement-for-#{champ.id}" }
|
||||
- if champ.etablissement.present?
|
||||
= render partial: 'shared/dossiers/editable_champs/etablissement_titre', locals: { etablissement: champ.etablissement }
|
||||
= form.fields_for :etablissement do |form|
|
||||
= render partial: 'shared/dossiers/editable_champs/etablissement', locals: { form: form, signature: champ.etablissement.sign }
|
Loading…
Add table
Add a link
Reference in a new issue