@extends('layouts.app') @section('title', 'E-commerce Overview') @section('content')
{{-- Header Section --}}

E-commerce Dashboard

Ringkasan penjualan, inventaris, dan performa toko Anda hari ini.

Laporan Bulanan Tambah Produk
{{-- Stats Grid: Enhanced with Custom Background & Layered Effects --}}
@php $ecomStats = [ [ 'label' => 'Total Penjualan', 'value' => 'Rp 142.8M', 'growth' => '+15.4%', 'icon' => 'ti-shopping-bag', 'bg' => 'from-indigo-600/20 via-indigo-600/5 to-transparent', 'color' => 'indigo', ], [ 'label' => 'Pesanan Baru', 'value' => '856', 'growth' => '+42', 'icon' => 'ti-package', 'bg' => 'from-sky-500/20 via-sky-500/5 to-transparent', 'color' => 'sky', ], [ 'label' => 'Produk Terjual', 'value' => '2,410', 'growth' => '+12%', 'icon' => 'ti-box', 'bg' => 'from-emerald-500/20 via-emerald-500/5 to-transparent', 'color' => 'emerald', ], [ 'label' => 'Rata-rata Keranjang', 'value' => 'Rp 165k', 'growth' => '-2.4%', 'icon' => 'ti-shopping-cart-discount', 'bg' => 'from-rose-500/20 via-rose-500/5 to-transparent', 'color' => 'rose', ], ]; @endphp @foreach ($ecomStats as $stat)
{{ str_replace(['+', '-'], '', $stat['growth']) }}

{{ $stat['label'] }}

{{ $stat['value'] }}

@endforeach
{{-- Revenue Chart --}}
{{-- Top Selling Products --}}
@foreach ([['name' => 'Nike Air Max 270', 'sales' => '412', 'stock' => '12', 'price' => 'Rp 2.1M', 'img' => 'https://images.unsplash.com/photo-1542291026-7eec264c27ff?q=80&w=200'], ['name' => 'Apple Watch Series 7', 'sales' => '325', 'stock' => '0', 'price' => 'Rp 5.4M', 'img' => 'https://images.unsplash.com/photo-1546868871-7041f2a55e12?q=80&w=200'], ['name' => 'Sony WH-1000XM4', 'sales' => '210', 'stock' => '45', 'price' => 'Rp 3.8M', 'img' => 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?q=80&w=200'], ['name' => 'Logitech G Pro X', 'sales' => '185', 'stock' => '28', 'price' => 'Rp 1.2M', 'img' => 'https://images.unsplash.com/photo-1527864550417-7fd91fc51a46?q=80&w=200']] as $product)
@if ($product['stock'] == 0)
Habis
@endif

{{ $product['name'] }}

{{ $product['sales'] }} Terjual • Stok: {{ $product['stock'] }}

{{ $product['price'] }}

@endforeach
Kelola Inventaris
{{-- Transaction Table --}}
@foreach ([['id' => '#ORD-7721', 'user' => 'Rizky Pratama', 'status' => 'Selesai', 'color' => 'emerald', 'total' => 'Rp 2.450.000'], ['id' => '#ORD-7722', 'user' => 'Dewi Anggraini', 'status' => 'Dikirim', 'color' => 'indigo', 'total' => 'Rp 890.000'], ['id' => '#ORD-7723', 'user' => 'Budi Santoso', 'status' => 'Proses', 'color' => 'amber', 'total' => 'Rp 1.120.000'], ['id' => '#ORD-7724', 'user' => 'Siti Aminah', 'status' => 'Dibatalkan', 'color' => 'rose', 'total' => 'Rp 450.000']] as $order) @endforeach
ID Pesanan Pelanggan Status Total
{{ $order['id'] }} {{ $order['user'] }} @php $statusVariantMap = [ 'Selesai' => 'success', 'Dikirim' => 'info', 'Proses' => 'warning', 'Dibatalkan' => 'danger', ]; @endphp @php $variant = $statusVariantMap[$order['status']] ?? 'gray'; @endphp {{ $order['status'] }} {{ $order['total'] }}
@endsection @push('scripts') @endpush