Class: Admin::UnenteredTimeReportController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
# File 'app/controllers/admin/unentered_time_report_controller.rb', line 3

def index
  redirect_to("/admin/unentered_time_report/#{Date.current.beginning_of_week.to_s}")
end

#load_work_unitsObject



13
14
15
# File 'app/controllers/admin/unentered_time_report_controller.rb', line 13

def load_work_units
  @work_units = current_user.work_units_between(@start_date, @start_date + 6.days)
end

#showObject



7
8
9
10
11
# File 'app/controllers/admin/unentered_time_report_controller.rb', line 7

def show
  redirect_unless_monday('/admin/unentered_time_report/', params[:id])
  @week_dates = build_week_hash_for(Date.parse(params[:id]))
  @users = User.unlocked.developers.uniq
end