def view_disapproved(self): scheduled_bookings = scheduled_bookings = [b.doc for b in gelAllBookingsWithBookingState(holly_couch, [-10])] return dict(scheduled_bookings=scheduled_bookings, workflow_map=workflow_map, result_title='Disapproved bookings', activity_map=getActivityTitleMap(holly_couch), booking_date_map=getBookingDayInfoMap(holly_couch), user_name_map=getUserNameMap(holly_couch), slot_map=getSchemaSlotActivityMap(holly_couch, 'day_schema.1'), workflow_submenu=workflow_submenu)
def view_unscheduled(self): unscheduled_bookings = [b.doc for b in getAllUnscheduledBookings(holly_couch)] return dict(unscheduled_bookings=unscheduled_bookings, workflow_map=workflow_map, result_title='Unscheduled bookings', activity_map=getActivityTitleMap(holly_couch), booking_date_map=getBookingDayInfoMap(holly_couch), user_name_map=getUserNameMap(holly_couch), slot_map=getSchemaSlotActivityMap(holly_couch, 'day_schema.1'), workflow_submenu=workflow_submenu)
def overview(self): """Show an overview of all bookings""" scheduled_bookings = [b.doc for b in getAllScheduledBookings(holly_couch)] unscheduled_bookings = [b.doc for b in getAllUnscheduledBookings(holly_couch)] #...I need a map from booking_day_id to booking day date and from [booking_day_i, slot_id] to time. # actually, I do thin couch could create such a view, it's just going to be very messy # TODO: in the future we cant use a hard coded day schema, we will need one map for each day schema that exists. return dict(scheduled_bookings=scheduled_bookings, unscheduled_bookings=unscheduled_bookings, workflow_map=workflow_map, activity_map=getActivityTitleMap(holly_couch), booking_date_map=getBookingDayInfoMap(holly_couch), user_name_map=getUserNameMap(holly_couch), slot_map=getSchemaSlotActivityMap(holly_couch, 'day_schema.1'), workflow_submenu=workflow_submenu)