add module api carto in api procedure
This commit is contained in:
parent
3ea381413f
commit
c04627431c
4 changed files with 29 additions and 6 deletions
|
@ -9,4 +9,7 @@ class ProcedureDecorator < Draper::Decorator
|
|||
return 'logo-tps.png' if logo.blank?
|
||||
logo
|
||||
end
|
||||
def geographic_information
|
||||
module_api_carto
|
||||
end
|
||||
end
|
||||
|
|
7
app/serializers/module_api_carto_serializer.rb
Normal file
7
app/serializers/module_api_carto_serializer.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class ModuleApiCartoSerializer < ActiveModel::Serializer
|
||||
attributes :use_api_carto,
|
||||
:quartiers_prioritaires,
|
||||
:cadastre
|
||||
|
||||
|
||||
end
|
|
@ -1,11 +1,16 @@
|
|||
class ProcedureSerializer < ActiveModel::Serializer
|
||||
attribute :libelle, key: :label
|
||||
attribute :lien_demarche, key: :link
|
||||
|
||||
attributes :id,
|
||||
:libelle,
|
||||
:description,
|
||||
:organisation,
|
||||
:direction,
|
||||
:lien_demarche,
|
||||
:archived
|
||||
:archived,
|
||||
:geographic_information
|
||||
|
||||
|
||||
has_one :geographic_information, serializer: ModuleApiCartoSerializer
|
||||
has_many :types_de_champ, serializer: TypeDeChampSerializer
|
||||
has_many :types_de_piece_justificative, serializer: TypeDePieceJustificativeSerializer
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue