@extends('layouts.app') @section('content')
{{ __('Dashboard') }}
{{ __('This is a admin dashboard') }}.
@if (app()->environment('local')) @endif

{{ $totalCategories }}

{{ __('Total Categories') }}

{{ $totalProduct }}

{{ __('Total Products') }}

{{ $totalOrder }}

{{ __('Total Orders') }}

{{ $totalCustomer }}

{{ __('Total Customers') }}

{{ showCurrency($totalEarning) }}

{{ __('Total Earning') }}

{{ showCurrency($totalPending) }}

{{ __('Total Pending payment') }}

@hasPermission('admin.order.index')
{{ __('Order Analytics') }}
@php $icons = [ 'pending' => 'bi-clock', 'confirm' => 'bi-bag-check-fill', 'processing' => 'bi-arrow-repeat', 'pickup' => 'bi-bicycle', 'delivered' => 'bi-patch-check-fill', 'onTheWay' => 'bi-bicycle', 'cancelled' => 'bi-x-circle', ]; @endphp
@foreach ($orderStatuses as $status)
{{ __($status->value) }}
{{ ${Str::camel($status->value)} }}
@endforeach
@endhasPermission
{{ __('Orders Summary') }}

{{ __('latest 6th orders') }}

@foreach ($latestOrders as $order) @php $status = Str::ucfirst(str_replace(' ', '', $order->order_status->value)); @endphp @endforeach
{{ __('Order ID') }} {{ __('Item') }} {{ __('Date') }} {{ __('Status') }} {{ __('Action') }}
#{{ $order->prefix . $order->order_code }} {{ $order->products->count() }} {{ $order->created_at->format('d M, Y') }}
{{ $order->order_status->value }}
{{ __('User Overview') }}
{{ __('Top Customer') }}
@foreach ($topCustomers as $customer)

{{ Str::limit($customer->user?->name, 30, '...') }}

{{ __('Orders') }}: {{ $customer->orders_count }}

{{-- --}}
@endforeach
@endsection @push('scripts') @endpush