buttons in table footer

This commit is contained in:
2025-07-11 20:26:02 +03:00
parent d72cf0a0b3
commit d986fdf232
46 changed files with 1828 additions and 1720 deletions
+23
View File
@@ -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