diff --git a/app/routes/vendor_pages.py b/app/routes/vendor_pages.py index c4390797..a0969c8a 100644 --- a/app/routes/vendor_pages.py +++ b/app/routes/vendor_pages.py @@ -353,6 +353,33 @@ async def vendor_letzshop_page( ) +# ============================================================================ +# INVOICES +# ============================================================================ + + +@router.get( + "/{vendor_code}/invoices", response_class=HTMLResponse, include_in_schema=False +) +async def vendor_invoices_page( + request: Request, + vendor_code: str = Path(..., description="Vendor code"), + current_user: User = Depends(get_current_vendor_from_cookie_or_header), +): + """ + Render invoices management page. + JavaScript loads invoices via API. + """ + return templates.TemplateResponse( + "vendor/invoices.html", + { + "request": request, + "user": current_user, + "vendor_code": vendor_code, + }, + ) + + # ============================================================================ # TEAM MANAGEMENT # ============================================================================ diff --git a/app/templates/vendor/invoices.html b/app/templates/vendor/invoices.html new file mode 100644 index 00000000..410edcd6 --- /dev/null +++ b/app/templates/vendor/invoices.html @@ -0,0 +1,602 @@ +{# app/templates/vendor/invoices.html #} +{% extends "vendor/base.html" %} + +{% block title %}Invoices{% endblock %} + +{% block alpine_data %}vendorInvoices(){% endblock %} + +{% block extra_scripts %} + +{% endblock %} + +{% block content %} + +
+ Create and manage invoices for your orders +
+Error
+ +Invoice Settings Required
+Configure your company details and invoice preferences before creating invoices.
+ +Total Invoices
+ +Draft
+ +Issued
+ +Paid
+ +| Invoice # | +Customer | +Date | +Amount | +Status | +Actions | +
|---|---|---|---|---|---|
|
+
+ Loading invoices... + |
+ |||||
|
+
+ No invoices yet +Click "Create Invoice" to generate your first invoice +Configure invoice settings first to get started + |
+ |||||
|
+
+
+
+
+
+
+ |
+ + + | ++ + | ++ + | ++ + | +
+
+
+
+
+
+
+ |
+
+ Configure your company details and preferences for invoice generation. +
+ + +