generated from westfarn/web_django_template
Add a shop sales dashboard with 30-day charts.
Portal Retail gets a Sales page for paid/fulfilled volume, daily bars, and top products so the storefront can show performance without a third-party analytics tool. Closes #3
This commit is contained in:
@@ -34,6 +34,7 @@ from shop.services import (
|
||||
store_product_stl,
|
||||
sync_product_colors,
|
||||
)
|
||||
from shop.stats import sales_dashboard
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -344,6 +345,11 @@ def portal_stock_adjust(request, pk):
|
||||
return redirect("shop_portal:product_edit", pk=product.pk)
|
||||
|
||||
|
||||
@login_required
|
||||
def portal_sales(request):
|
||||
return render(request, "shop/portal/sales.html", sales_dashboard())
|
||||
|
||||
|
||||
@login_required
|
||||
def portal_order_list(request):
|
||||
orders = Order.objects.all()[:200]
|
||||
|
||||
Reference in New Issue
Block a user