@extends('layouts.app') @section('title', __('app.dashboard')) @section('content')
@php $cards = [ ['label' => __('customers.customers'), 'value' => number_format($stats['customers']), 'icon' => 'bi-people', 'bg' => '#eef2ff', 'color' => '#5b3df5'], ['label' => __('sales.sales') . ' (' . __('app.this_month') . ')', 'value' => money($stats['sales_month']), 'icon' => 'bi-receipt', 'bg' => '#e6fcf7', 'color' => '#00c9a7'], ['label' => __('sales.profit') . ' (' . __('app.this_month') . ')', 'value' => money($stats['profit_month']), 'icon' => 'bi-graph-up-arrow', 'bg' => '#fff4e6', 'color' => '#f59f00'], ['label' => __('expenses.expenses') . ' (' . __('app.this_month') . ')', 'value' => money($stats['expenses_month']), 'icon' => 'bi-wallet2', 'bg' => '#ffe9ec', 'color' => '#e03131'], ]; @endphp @foreach($cards as $c)
{{ $c['label'] }}
{{ $c['value'] }}
@endforeach
{{ $stats['orders_active'] }}
{{ __('orders.orders') }}
{{ $stats['orders_ready'] }}
{{ __('orders.status.ready') }}
{{ $stats['orders_late'] }}
{{ __('orders.late_orders') }}
{{ __('reports.sales_report') }}
{{ __('reports.top_products') }}
@forelse($topItems as $item)
{{ $item->saleable->display_name ?? '—' }} {{ $item->qty }}
@empty

{{ __('app.no_data') }}

@endforelse
{{ __('frames.frames') }} — {{ __('reports.top_products') }}
@forelse($topFrames as $item)
{{ $item->saleable->display_name ?? '—' }} {{ $item->qty }}
@empty

{{ __('app.no_data') }}

@endforelse
{{ __('lenses.lenses') }} — {{ __('reports.top_products') }}
@forelse($topLenses as $item)
{{ $item->saleable->display_name ?? '—' }} {{ $item->qty }}
@empty

{{ __('app.no_data') }}

@endforelse
{{ __('inventory.low_stock_alert') }}
@forelse($lowFrames->concat($lowLenses) as $item)
{{ $item->display_name }} {{ $item->stockIn() }}
@empty

{{ __('app.no_data') }}

@endforelse
{{ __('orders.orders') }}
@forelse($currentOrders as $order) {{ $order->number }} — {{ $order->customer->name ?? '' }} {{ order_status_label($order->status) }} @empty

{{ __('app.no_data') }}

@endforelse
@endsection @push('scripts') @endpush