Remove unused users/carte_controller
This commit is contained in:
parent
b015d1ca27
commit
37a7e26fc3
9 changed files with 0 additions and 549 deletions
|
@ -1,28 +1,4 @@
|
|||
class ModuleApiCartoService
|
||||
def self.save_qp!(dossier, json_latlngs)
|
||||
if dossier.procedure.module_api_carto.quartiers_prioritaires?
|
||||
qp_list = generate_qp(JSON.parse(json_latlngs))
|
||||
|
||||
qp_list.each do |qp|
|
||||
qp[:dossier_id] = dossier.id
|
||||
qp[:geometry] = qp[:geometry].to_json
|
||||
QuartierPrioritaire.create(qp)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.save_cadastre!(dossier, json_latlngs)
|
||||
if dossier.procedure.module_api_carto.cadastre?
|
||||
cadastre_list = generate_cadastre JSON.parse(json_latlngs)
|
||||
|
||||
cadastre_list.each do |cadastre|
|
||||
cadastre[:dossier_id] = dossier.id
|
||||
cadastre[:geometry] = cadastre[:geometry].to_json
|
||||
Cadastre.create(cadastre)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.generate_qp(coordinates)
|
||||
coordinates.flat_map do |coordinate|
|
||||
ApiCarto::QuartiersPrioritairesAdapter.new(
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
class UserRoutesAuthorizationService
|
||||
def self.authorized_route?(controller, dossier)
|
||||
auth = controller.route_authorization
|
||||
|
||||
auth[:states].include?(dossier.state) &&
|
||||
(auth[:api_carto].nil? ? true : auth[:api_carto] == dossier.use_legacy_carto?)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue