<%- include('_sidebar', { adminPath, currentPath: 'dashboard' }) %>

Dashboard

Ringkasan performa toko BuzzMart

Rp <%= stats.totalRevenue.toLocaleString('id-ID') %>
Total Revenue
<%= stats.totalOrders %>
Total Order
<%= stats.totalPaid %>
Order Lunas
<%= stats.totalPending %>
Pending
Revenue 7 Hari Terakhir
Top 5 Produk Terlaris
<%= totalProducts %>
Total Produk
<%= totalStock %>
Stok Key Tersedia
<% if (offlineProducts.length > 0) { %>
Produk Sedang Offline
<% offlineProducts.forEach(p => { %>
<%= p.name %> Ubah Status
<% }) %>
<% } %> <% if (lowStockProducts.length > 0) { %>
Stok Menipis (Total Semua Varian)
<% lowStockProducts.forEach(p => { %>
<%= p.name %> Tambah Stok
<% }) %>
<% } %>
Order Terbaru
<% if (recentOrders.length === 0) { %> <% } %> <% recentOrders.forEach(o => { %> <% }) %>
Order ID Produk Varian Customer Total Status
Belum ada order
<%= o.orderId %> <%= o.productName %> <%= o.variantLabel || '-' %> <%= o.customerName %> Rp <%= o.totalAmount.toLocaleString('id-ID') %> <% if (o.status === 'paid') { %>Paid <% } else if (o.status === 'pending' || o.status === 'processing') { %>Pending <% } else { %><%= o.status %><% } %>