 
   checkedIn: {}
   people: {}
+
+  load: (attendance_records) ->
+    for person_id, data of attendance_records
+      @people[person_id]?.load(data)
 
   render: ->
     $('.checkin-select-person').click(@selectPerson).each (i, elm) =>


  personCheckedIn: (id, times) =>
    @checkedIn[id] = times
    if times.length > 0
      $('.checkin-print').show().find('.tag-count').text(@tagCount())
    else
      $('.checkin-print').find('.tag-count').text(@tagCount())
      $('.checkin-print').hide() if @tagCount() == 0

  tagCount: =>
    Object.keys(@checkedIn).length

  print: (e) =>
    e.preventDefault()

    @elm.find('.checkin-open').on 'click', @openTime
    @elm.find('.checkin-change').on 'click', @clearClassAndOpenTime
    @

  load: (data) =>
    for attendance_record in data
      @elm.find(".checkin-select-class[data-group-id='#{attendance_record.group_id}']")
        .click()

  show: =>
    @elm.show()
