Class: HrLite::AttendanceController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- HrLite::AttendanceController
- Defined in:
- app/controllers/hr_lite/attendance_controller.rb
Overview
Employee self-service punch surface. Always operates on hr_current_user — there is no user param, so punching for someone else is structurally impossible.
Instance Method Summary collapse
Instance Method Details
#check_in ⇒ Object
13 14 15 |
# File 'app/controllers/hr_lite/attendance_controller.rb', line 13 def check_in punch(:check_in) end |
#check_out ⇒ Object
17 18 19 |
# File 'app/controllers/hr_lite/attendance_controller.rb', line 17 def check_out punch(:check_out) end |
#show ⇒ Object
6 7 8 9 10 11 |
# File 'app/controllers/hr_lite/attendance_controller.rb', line 6 def show @month = parse_month_param(params[:month]) @record = AttendanceRecord.find_by(user_id: hr_current_user.id, date: Date.current) @day_status = DayStatus.new(user: hr_current_user, range: @month.beginning_of_month..@month.end_of_month) @counts = @day_status.counts end |