app/controllers/pages_controller.rb
# Page used to rapidly search for information about groups, services, and employees. If user is
# not logged in, will redirect them to login page. If user is logged in, will display information
# related to their first group (provided they have one). 
Page used to rapidly search for information about groups, services, and employees. If user is
not logged in, will redirect them to login page. If user is logged in, will display information
related to their first group (provided they have one).
Page used to rapidly search for information about groups services and employees . If user is not logged in will redirect them to login page . If user is logged in will display information related to their first group ( provided they have one ) .
def home
    if @current_user.groups.first
      data_array = []
      @data_title_1 = t(:full_time_employees)
      @data_title_2 = t(:employee_headcount)
      @group = @current_user.groups.first
      @services = @group.services(@year)
      @employees = @group.employees.order(:last_name, :first_name)
      @graph_title = t(:allocations_for_group) + @group.name
      @x_axis_title = t(:service)
      @employee_headcount = @group.employees.length
      @full_time_employees = @group.get_total_service_allocation(@year, @allocation_precision)
      @group.services(@year).each do |service|
        data_array << service.total_allocation_within_group(@group, @year, @allocation_precision)
      end
      @data_to_graph = data_array.to_json
    end
  end
def home if @current_user . groups . first data_array = [ ] @data_title_1 = t ( :full_time_employees ) @data_title_2 = t ( :employee_headcount ) @group = @current_user . groups . first @services = @group . services ( @year ) @employees = @group . employees . order ( :last_name , :first_name ) @graph_title = t ( :allocations_for_group ) + @group . name @x_axis_title = t ( :service ) @employee_headcount = @group . employees . length @full_time_employees = @group . get_total_service_allocation ( @year , @allocation_precision ) @group . services ( @year ) . each do | service | data_array << service . total_allocation_within_group ( @group , @year , @allocation_precision ) end @data_to_graph = data_array . to_json end end
Page used to rapidly search for information about groups, services, and employees.
Page used to rapidly search for information about groups services and employees .