@extends('backend.layouts.app') @section('content') @can('admin_dashboard')

{{ $total_customers }}

{{ translate('Total Customer') }}

{{ translate('Top Customers') }}

@foreach ($top_customers as $top_customer) @php $nameParts = array_filter(explode(' ', trim($top_customer->name))); $initials = strtoupper(substr($nameParts[array_key_first($nameParts)], 0, 1)); if (count($nameParts) > 1) { $initials .= strtoupper(substr(end($nameParts), 0, 1)); } $palette = ['#667eea','#f5576c','#11998e','#0093E9','#764ba2','#e04d27','#f5a623']; $bg = $palette[array_sum(array_map('ord', str_split($top_customer->name))) % count($palette)]; @endphp
{{ $initials }}
@endforeach

{{ $total_products }}

{{ translate('Total Products') }}

{{ translate('In-house Products') }}

{{ $total_inhouse_products }}

@if (env('ENABLE_SELLER') == true)

{{ translate('Sellers Products') }}

{{ $total_sellers_products }}

@endif

{{ $total_categories }}

{{ translate('Total Category') }}

@foreach ($top_categories as $key => $top_category)
@php $badge = 'badge-danger'; if ($key == 1) { $badge = 'badge-warning'; } if ($key == 2) { $badge = 'badge-primary'; } $lang = App::getLocale(); $category = App\Models\CategoryTranslation::where('category_id', $top_category->id) ->where('lang', $lang) ->first(); @endphp

{{ $category ? $category->name : translate('Not Found') }}

{{ single_price($top_category->total) }}

@endforeach

{{ $total_brands }}

{{ translate('Total Brands') }}

{{ translate('Top Brands') }}

@foreach ($top_brands as $key => $top_brand)
@php $badge = 'badge-success'; if ($key == 1) { $badge = 'badge-primary'; } if ($key == 2) { $badge = 'badge-info'; } $lang = App::getLocale(); $brand = App\Models\BrandTranslation::where('brand_id', $top_brand->id) ->where('lang', $lang) ->first(); @endphp

{{ $brand ? $brand->name : translate('Not Found') }}

{{ single_price($top_brand->total) }}

@endforeach

{{ number_format_short($total_sale) }}

{{ translate('Total Sales') }}

{{ translate('Sales this month') }}

{{ single_price($sale_this_month) }}

{{ translate('Sales Stat') }}

{{ translate('In-house Sales') }}

{{ single_price($admin_sale_this_month->total_sale) }}

@if (env('ENABLE_SELLER') == true)

{{ translate('Sellers Sales') }}

{{ single_price($seller_sale_this_month->total_sale) }}

@endif
@if (env('ENABLE_SELLER') == true)
@if (get_setting('vendor_system_activation') == 1)

{{ $total_sellers }}

{{ translate('Total Sellers') }}

@foreach ($status_wise_sellers as $key => $status_wise_seller)

@if ($status_wise_seller->verification_status == 1) {{ translate('Approved Sellers') }} @else {{ translate('Pending Seller') }} @endif

{{ $status_wise_seller->total }}

@endforeach

{{ translate('Top Sellers') }}

@foreach ($top_sellers as $top_seller) @php $sNameParts = array_filter(explode(' ', trim($top_seller->name))); $sInitials = strtoupper(substr($sNameParts[array_key_first($sNameParts)], 0, 1)); if (count($sNameParts) > 1) { $sInitials .= strtoupper(substr(end($sNameParts), 0, 1)); } $sPalette = ['#667eea','#f5576c','#11998e','#0093E9','#764ba2','#e04d27','#f5a623']; $sBg = $sPalette[array_sum(array_map('ord', str_split($top_seller->name))) % count($sPalette)]; @endphp
{{ $sInitials }}
@endforeach

@else @endif
@endif

{{ $total_order }}

{{ translate('Total Order') }}

{{ translate('All Orders') }}

{{ translate('Pending order') }}

{{ $total_pending_order }}

{{ translate('Order Placed') }}

{{ $total_placed_order }}

{{ translate('Confirmed Order') }}

{{ $total_confirmed_order }}

{{ translate('Processed Order') }}

{{ $total_picked_up_order }}

{{ translate('Order Shipped') }}

{{ $total_shipped_order }}

{{ translate('In-house Store') }}

{{ single_price($total_inhouse_sale) }}

{{ translate('Total Sales') }}

{{ translate('All In-house Orders') }}

{{ $total_inhouse_products }}

{{ translate('In-house product') }}

{{ number_format($inhouse_product_rating, 2) }}

{{ translate('Ratings') }}

{{ $total_inhouse_order }}

{{ translate('Total Orders') }}

@if (get_setting('vendor_system_activation') == 1)
@endif
@endcan @endsection @section('script') @include('backend.dashboard.dashboard_js') @endsection