             end_date: end.format('YYYY-MM-DD')
           AdminBookingService.query(params).then (bookings) ->
             b.resourceId = b.person_id for b in bookings
-            console.log bookings
             callback(bookings)
     ]
 

      calendar:
        editable: true
        # timezone: 'local'
        header:
          left: 'today,prev,next'
          center: 'title'

      $scope.getCompanyPromise().then (company) ->
        params = {company: company}
        AdminPersonService.query(params).then (people) ->
          $scope.people = _.sortBy people, 'name'
          p.title = p.name for p in $scope.people
          uiCalendarConfig.calendars.resourceCalendar.fullCalendar('refetchEvents')
          callback($scope.people)

    $scope.updateBooking = (booking, delta) ->
      booking.person_id = booking.resourceId
      booking.$put('self', {}, booking.getPostData()).then (response) =>
        new_booking = new BBModel.Admin.Booking(response)
        booking.person_id = new_booking.person_id
        booking.resourceId = booking.person_id
        booking.start = new_booking.start
        booking.end = new_booking.end
        uiCalendarConfig.calendars.resourceCalendar.fullCalendar('updateEvent', booking)


    $scope.editBooking = (booking) ->
      ModalForm.edit
