Class: Admin::WeeklyTimeReportController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/admin/weekly_time_report_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



2
3
4
# File 'app/controllers/admin/weekly_time_report_controller.rb', line 2

def index
  redirect_to('/admin/weekly_time_report/' + Date.current.beginning_of_week.strftime("%F"))
end

#showObject



6
7
8
9
10
# File 'app/controllers/admin/weekly_time_report_controller.rb', line 6

def show
  redirect_unless_monday('/admin/weekly_time_report/', params[:id])
  @users = User.sort_by_name.select{|u| u.has_role?(:developer) && !u.locked }
  @weekly_hours_sum = ChartData.external_hours_for_chart(@users, :date => @start_date)
end