|
|
@ -284,20 +284,23 @@ class RoomShiftList(ShiftList):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CheckinList(LoginRequiredMixin, ListView):
|
|
|
|
class CheckinList(LoginRequiredMixin, ListView):
|
|
|
|
template_name = "checkin_list.html"
|
|
|
|
|
|
|
|
model = Shift
|
|
|
|
model = Shift
|
|
|
|
title = "Ankommende Helfer:innen"
|
|
|
|
paginate_by = 30
|
|
|
|
|
|
|
|
template_name = "checkin_list.html"
|
|
|
|
|
|
|
|
title = "Ankommende Helfer*innen"
|
|
|
|
|
|
|
|
|
|
|
|
def get_queryset(self):
|
|
|
|
def get_queryset(self):
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
ShiftRegistration.objects.select_related("helper", "shift")
|
|
|
|
ShiftRegistration.objects.select_related("helper", "shift")
|
|
|
|
.prefetch_related("shift__event__calendar")
|
|
|
|
.prefetch_related("shift__event__calendar")
|
|
|
|
.filter(shift__deleted=False, state=ShiftRegistration.RegState.REGISTERED)
|
|
|
|
.filter(shift__deleted=False, state=ShiftRegistration.RegState.REGISTERED)
|
|
|
|
.order_by("shift__start_at")[:30]
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs):
|
|
|
|
def get_context_data(self, **kwargs):
|
|
|
|
context = super().get_context_data(**kwargs)
|
|
|
|
context = super().get_context_data(**kwargs)
|
|
|
|
|
|
|
|
context["page_range"] = context["paginator"].get_elided_page_range(
|
|
|
|
|
|
|
|
context["page_obj"].number
|
|
|
|
|
|
|
|
)
|
|
|
|
context["title"] = self.title
|
|
|
|
context["title"] = self.title
|
|
|
|
return context
|
|
|
|
return context
|
|
|
|
|
|
|
|
|
|
|
|