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
+14
View File
@@ -0,0 +1,14 @@
from django.shortcuts import render
from django.views.generic import TemplateView
class BarrierDashboardView(TemplateView):
template_name = 'barrier/barrier-dashboard.html'
extra_context = {
'title': 'Client Dashboard',
'description': 'This is the client dashboard page.',
}
def get(self, request, *args, **kwargs):
return render(request, self.template_name, self.extra_context)
+13
View File
@@ -0,0 +1,13 @@
from django.shortcuts import render
from django.views.generic import TemplateView
class ClientDashboardView(TemplateView):
template_name = 'client-dashboard-content.html'
extra_context = {
'title': 'Client Dashboard',
'description': 'This is the client dashboard page.',
}
def get(self, request, *args, **kwargs):
return render(request, self.template_name, self.extra_context)
+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
+1 -33
View File
@@ -39,43 +39,11 @@ class DashboardRedirectView(RedirectView):
return reverse_lazy('index')
class ClientDashboardView(TemplateView):
template_name = 'client-dashboard-content.html'
extra_context = {
'title': 'Client Dashboard',
'description': 'This is the client dashboard page.',
}
def get(self, request, *args, **kwargs):
return render(request, self.template_name, self.extra_context)
class BarrierDashboardView(TemplateView):
template_name = 'barrier/barrier-dashboard.html'
extra_context = {
'title': 'Client Dashboard',
'description': 'This is the client dashboard page.',
}
def get(self, request, *args, **kwargs):
return render(request, self.template_name, self.extra_context)
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
# class ClientPreinfoView(TemplateView):
# template_name = 'client-preinfo-content.html'