Commit 1c8638ce authored by Bruno Freitas Tissei's avatar Bruno Freitas Tissei
Browse files

Fix service type order


Signed-off-by: Bruno Freitas Tissei's avatarBruno Freitas Tissei <bft15@inf.ufpr.br>
parent 99c143c2
...@@ -361,10 +361,10 @@ class ProfessionalsController < ApplicationController ...@@ -361,10 +361,10 @@ class ProfessionalsController < ApplicationController
def shifts def shifts
#TODO Tem que fazer [by Fabricio] #TODO Tem que fazer [by Fabricio]
if @currentProfessionalServicePlace.role == "adm_c3sl" if @currentProfessionalServicePlace.role == "adm_c3sl"
@service_places_professionals = ServiceType.all.order(:description) @service_places_professionals = ServiceType.all.order('description ASC')
else else
ids = ServiceTypeServicePlace.where(service_place_id: @currentProfessionalServicePlace.service_place.id).pluck(:service_type_id) ids = ServiceTypeServicePlace.where(service_place_id: @currentProfessionalServicePlace.service_place.id).pluck(:service_type_id)
@service_places_professionals = ServiceType.where(id: ids) @service_places_professionals = ServiceType.where(id: ids).order('description ASC')
end end
if session[:carrega_pagina] if session[:carrega_pagina]
......
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