签到调整

courseware
cxt 5 years ago
parent 62609d4c5b
commit d0b8a4e0fc

@ -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

Loading…
Cancel
Save