Remove legacy geo sources
This commit is contained in:
parent
5abb07420b
commit
cad8ee31d8
10 changed files with 10 additions and 81 deletions
|
@ -51,7 +51,6 @@ class Api::V2::Schema < GraphQL::Schema
|
|||
Types::Champs::SiretChampType,
|
||||
Types::Champs::TextChampType,
|
||||
Types::GeoAreas::ParcelleCadastraleType,
|
||||
Types::GeoAreas::QuartierPrioritaireType,
|
||||
Types::GeoAreas::SelectionUtilisateurType,
|
||||
Types::PersonneMoraleType,
|
||||
Types::PersonnePhysiqueType
|
||||
|
|
|
@ -809,11 +809,6 @@ enum GeoAreaSource {
|
|||
"""
|
||||
cadastre
|
||||
|
||||
"""
|
||||
Quartier prioritaire
|
||||
"""
|
||||
quartier_prioritaire
|
||||
|
||||
"""
|
||||
Sélection utilisateur
|
||||
"""
|
||||
|
@ -1101,15 +1096,6 @@ type Profile {
|
|||
id: ID!
|
||||
}
|
||||
|
||||
type QuartierPrioritaire implements GeoArea {
|
||||
code: String!
|
||||
commune: String!
|
||||
geometry: GeoJSON!
|
||||
id: ID!
|
||||
nom: String!
|
||||
source: GeoAreaSource!
|
||||
}
|
||||
|
||||
type Query {
|
||||
"""
|
||||
Informations concernant une démarche.
|
||||
|
|
|
@ -4,11 +4,9 @@ module Types
|
|||
|
||||
class GeoAreaSource < Types::BaseEnum
|
||||
GeoArea.sources.each do |symbol_name, string_name|
|
||||
if string_name != "parcelle_agricole"
|
||||
value(string_name,
|
||||
I18n.t(symbol_name, scope: [:activerecord, :attributes, :geo_area, :source]),
|
||||
value: symbol_name)
|
||||
end
|
||||
value(string_name,
|
||||
I18n.t(symbol_name, scope: [:activerecord, :attributes, :geo_area, :source]),
|
||||
value: symbol_name)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -21,8 +19,6 @@ module Types
|
|||
case object.source
|
||||
when GeoArea.sources.fetch(:cadastre)
|
||||
Types::GeoAreas::ParcelleCadastraleType
|
||||
when GeoArea.sources.fetch(:quartier_prioritaire)
|
||||
Types::GeoAreas::QuartierPrioritaireType
|
||||
when GeoArea.sources.fetch(:selection_utilisateur)
|
||||
Types::GeoAreas::SelectionUtilisateurType
|
||||
end
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
module Types::GeoAreas
|
||||
class QuartierPrioritaireType < Types::BaseObject
|
||||
implements Types::GeoAreaType
|
||||
|
||||
field :code, String, null: false
|
||||
field :nom, String, null: false
|
||||
field :commune, String, null: false
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue