buttons in table footer
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from booking.models import Booking
|
||||
from containers.models import Container
|
||||
from preinfo.models import Preinfo
|
||||
|
||||
|
||||
class EmployeeDashboardView(TemplateView):
|
||||
template_name = 'employee-dashboard-content.html'
|
||||
extra_context = {
|
||||
'title': 'Employee Dashboard',
|
||||
'description': 'This is the depot employee dashboard page.',
|
||||
}
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
containers = Container.objects.filter(expedited=False).count()
|
||||
preinfos = Preinfo.objects.filter(received=False).count()
|
||||
bookings = Booking.objects.filter(status='active').count()
|
||||
context['containers'] = containers
|
||||
context['preinfos'] = preinfos
|
||||
context['bookings'] = bookings
|
||||
return context
|
||||
Reference in New Issue
Block a user