PCqiandao
cxt 5 years ago
parent 30082cc012
commit ba2e65b086

@ -34,7 +34,10 @@ class AttendancesController < ApplicationController
@normal_count = @course.course_member_attendances.where(course_member_id: member&.id, course_attendance_id: attendance_ids, attendance_status: "NORMAL").size
@leave_count = @course.course_member_attendances.where(course_member_id: member&.id, course_attendance_id: attendance_ids, attendance_status: "LEAVE").size
@absence_count = @course.course_member_attendances.where(course_member_id: member&.id, course_attendance_id: attendance_ids, attendance_status: "ABSENCE").size
else
@attendances = @attendances.where("attendance_date = '#{current_date}' and start_time <= '#{current_end_time}' and end_time > '#{current_end_time}'")
end
end
@attendances_count = @attendances.size

Loading…
Cancel
Save