This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from backoffice.mixins import BackofficeAccessMixin
|
||||
|
||||
SECTIONS = [
|
||||
{'label': 'Productos', 'url_name': 'backoffice:product_list'},
|
||||
{'label': 'Pedidos', 'url_name': 'backoffice:order_list'},
|
||||
{'label': 'Pagos', 'url_name': 'backoffice:payment_list'},
|
||||
{'label': 'Clientes', 'url_name': 'backoffice:customer_list'},
|
||||
{'label': 'Proveedores', 'url_name': 'backoffice:provider_list'},
|
||||
{'label': 'Impuestos', 'url_name': 'backoffice:tax_list'},
|
||||
{'label': 'Marca y ajustes', 'url_name': 'backoffice:brand_settings'},
|
||||
]
|
||||
|
||||
|
||||
class DashboardView(BackofficeAccessMixin, TemplateView):
|
||||
template_name = 'backoffice/dashboard.html'
|
||||
section = 'dashboard'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['sections'] = SECTIONS
|
||||
return context
|
||||
Reference in New Issue
Block a user