Merge pull request #5857 from tchak/fix-personne-morale-api-type

Fix personne morale api type
This commit is contained in:
Paul Chavard 2021-01-27 12:51:36 +01:00 committed by GitHub
commit 92f6105eb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 12 deletions

View file

@ -803,13 +803,13 @@ type Entreprise {
effectif pour un mois donné
"""
effectifMensuel: Effectif
formeJuridique: String!
formeJuridiqueCode: String!
formeJuridique: String
formeJuridiqueCode: String
inlineAdresse: String!
nom: String!
nom: String
nomCommercial: String!
numeroTvaIntracommunautaire: String!
prenom: String!
prenom: String
raisonSociale: String!
siren: String!
siretSiegeSocial: String!

View file

@ -9,8 +9,8 @@ module Types
field :siren, String, null: false
field :capital_social, GraphQL::Types::BigInt, null: false, description: "capital social de lentreprise. -1 si inconnu."
field :numero_tva_intracommunautaire, String, null: false
field :forme_juridique, String, null: false
field :forme_juridique_code, String, null: false
field :forme_juridique, String, null: true
field :forme_juridique_code, String, null: true
field :nom_commercial, String, null: false
field :raison_sociale, String, null: false
field :siret_siege_social, String, null: false
@ -18,8 +18,8 @@ module Types
field :effectif_mensuel, EffectifType, null: true, description: "effectif pour un mois donné"
field :effectif_annuel, EffectifType, null: true, description: "effectif moyen dune année"
field :date_creation, GraphQL::Types::ISO8601Date, null: false
field :nom, String, null: false
field :prenom, String, null: false
field :nom, String, null: true
field :prenom, String, null: true
field :inline_adresse, String, null: false
field :attestation_sociale_attachment, Types::File, null: true
field :attestation_fiscale_attachment, Types::File, null: true

View file

@ -7,8 +7,8 @@ class Entreprise < Hashie::Dash
property :siren
property :capital_social
property :numero_tva_intracommunautaire
property :forme_juridique
property :forme_juridique_code
property :forme_juridique, default: nil
property :forme_juridique_code, default: nil
property :nom_commercial
property :raison_sociale
property :siret_siege_social
@ -19,8 +19,8 @@ class Entreprise < Hashie::Dash
property :effectif_annuel
property :effectif_annuel_annee
property :date_creation
property :nom
property :prenom
property :nom, default: nil
property :prenom, default: nil
property :inline_adresse
end

View file

@ -48,6 +48,8 @@
# entreprise_id :integer
#
class Etablissement < ApplicationRecord
self.ignored_columns = [:entreprise_id]
belongs_to :dossier, optional: true
has_one :champ, class_name: 'Champs::SiretChamp'