Commit 900072fb authored by Pedro Henrique's avatar Pedro Henrique
Browse files

Fix reports for adm prefeitura


Signed-off-by: Pedro Henrique's avatarPedro Henrique! <pha14@inf.ufpr.br>
parent 9cd07077
...@@ -467,13 +467,12 @@ class ReportsController < ApplicationController ...@@ -467,13 +467,12 @@ class ReportsController < ApplicationController
@professionals = Professional.active.hide_c3sl_user @professionals = Professional.active.hide_c3sl_user
end end
if !current_citizen.professional.administradorsistema? if !current_citizen.professional.administradorc3sl?
@professionals_service_places = current_citizen.professional.professionals_service_places @professionals_service_places = current_citizen.professional.professionals_service_places
@tipos_atendimento_ativos = ServiceTypeServicePlace.where(service_place_id: @currentProfessionalServicePlace.service_place_id, active: true) @tipos_atendimento_ativos = ServiceTypeServicePlace.where(service_place_id: @currentProfessionalServicePlace.service_place_id, active: true)
@tipos_atendimento = [] @tipos_atendimento = []
@tipos_atendimento_ativos.each { |x| @tipos_atendimento.push(ServiceType.find(x.service_type_id))} @tipos_atendimento_ativos.each { |x| @tipos_atendimento.push(ServiceType.find(x.service_type_id))}
end end
if !@tipos_atendimento.nil? if !@tipos_atendimento.nil?
@tipos_atendimento = @tipos_atendimento.sort_by{|t| t.description} @tipos_atendimento = @tipos_atendimento.sort_by{|t| t.description}
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment