@extends('layouts.app') @section('title', 'Dashboard') @section('page', 'dashboard') @push('styles') @endpush @section('content')

Dashboard

Welcome back, {{ $userName }}!

Total Sales

{{ money($kpis['sales']['value']) }}

{{ $kpis['sales']['trend']['label'] }} {{ $trendCompareLabel }}

Total Orders

{{ number_format($kpis['orders']['value']) }}

{{ $kpis['orders']['trend']['label'] }} {{ $trendCompareLabel }}

Total Customers

{{ number_format($kpis['customers']['value']) }}

{{ $kpis['customers']['trend']['label'] }} {{ $trendCompareLabel }}

Gross Profit

{{ money($kpis['profit']['value']) }}

{{ $kpis['profit']['trend']['label'] }} {{ $trendCompareLabel }}

Sales Overview

Today

{{ money($summaryCards['today']) }}

Yesterday

{{ money($summaryCards['yesterday']) }}

This Week

{{ money($summaryCards['week']) }}

This Month

{{ money($summaryCards['month']) }}

Sales by Payment Method

@forelse ($paymentMix as $row)
{{ $row->label }} {{ money($row->revenue) }}
{{ number_format($row->share, 0) }}%
@empty

No payments in this period.

@endforelse

Top Products

View all
@forelse ($topProducts as $product)
@if ($product->image_url) @else @endif

{{ $product->product_name }}

Sold: {{ number_format((float) $product->total_qty, 0) }}

{{ money((float) $product->revenue) }}
@empty

No product sales yet.

@endforelse

Low Stock Alerts

Inventory
@forelse ($lowStock as $product)
@if ($product->imageUrl()) @else @endif

{{ $product->name }}

{{ $product->stock }} units left

{{ $product->stock }}
@empty

Stock levels look healthy.

@endforelse

Recent Orders

View all
@forelse ($recentSales as $sale)

{{ $sale->invoice_no ?: '#ORD-'.str_pad((string) $sale->id, 5, '0', STR_PAD_LEFT) }}

{{ $sale->customer?->name ?? 'Walk-in' }} ยท {{ money((float) $sale->total) }}

Paid {{ $sale->sale_date?->diffForHumans(short: true) }}
@empty

No recent orders.

@endforelse

Quick Actions

@endsection @push('scripts') @endpush