|
|
@ -134,7 +134,7 @@ class Weapps::AttendancesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
a_start_time = "#{@attendance.attendance_date} #{@attendance.start_time}".to_time
|
|
|
|
a_start_time = "#{@attendance.attendance_date} #{@attendance.start_time}".to_time
|
|
|
|
if a_start_time > Time.now
|
|
|
|
if a_start_time > Time.now
|
|
|
|
@attendance.update!(end_time: Time.current, start_time: Time.current)
|
|
|
|
@attendance.update!(end_time: Time.current, start_time: Time.current, attendance_date: Date.current)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@attendance.update!(end_time: Time.current)
|
|
|
|
@attendance.update!(end_time: Time.current)
|
|
|
|
end
|
|
|
|
end
|
|
|
|