@extends('admin/layout') @section('title') {{ labels('admin_labels.home', 'Home') }} @endsection @php use App\Services\MediaService; use App\Services\OrderService; @endphp @section('content') @include('Chatify::layouts.headLinks')

{{ labels('admin_labels.dashboard', 'Dashboard') }}

{{ labels('admin_labels.drive_success_for_you_and_your_sellers', 'Drive Success For You and Your Sellers') }}

{{-- chat and ticket --}}

{{ labels('admin_labels.new_messages', 'New Messages') }}

{{-- orders , categories and sellers --}}

{{ labels('admin_labels.orders_overview', 'Orders Overview') }}

{{ labels('admin_labels.received', 'Received') }}

{{ app(OrderService::class)->ordersCount('received', '', '', $store_id) }}

@php $currentRecivedOrder = app(OrderService::class)->ordersCount('received', '', '', $store_id); $maxValue = app(OrderService::class)->ordersCount('', '', '', $store_id); if ($currentRecivedOrder > 0 && $maxValue > 0) { $recivedOrderWidth = ($currentRecivedOrder / $maxValue) * 100; } else { $recivedOrderWidth = 0; } @endphp

{{ labels('admin_labels.processed', 'Processed') }}

{{ app(OrderService::class)->ordersCount('processed', '', '', $store_id) }}

@php $currentProcessedOrder = app(OrderService::class)->ordersCount('processed', '', '', $store_id); $maxValue = app(OrderService::class)->ordersCount('', '', '', $store_id); if ($currentProcessedOrder > 0 && $maxValue > 0) { $processedOrderWidth = ($currentProcessedOrder / $maxValue) * 100; } else { $processedOrderWidth = 0; } @endphp

{{ labels('admin_labels.shipped', 'Shipped') }}

{{ app(OrderService::class)->ordersCount('shipped', '', '', $store_id) }}

@php $currentShippedOrder = app(OrderService::class)->ordersCount('shipped', '', '', $store_id); $maxValue = app(OrderService::class)->ordersCount('', '', '', $store_id); if ($currentShippedOrder > 0 && $maxValue > 0) { $shippedOrderWidth = ($currentShippedOrder / $maxValue) * 100; } else { $shippedOrderWidth = 0; } @endphp

{{ labels('admin_labels.delivered', 'Delivered') }}

{{ app(OrderService::class)->ordersCount('delivered', '', '', $store_id) }}

@php $currentDeliveredOrder = app(OrderService::class)->ordersCount('delivered', '', '', $store_id); $maxValue = app(OrderService::class)->ordersCount('', '', '', $store_id); if ($currentDeliveredOrder > 0 && $maxValue > 0) { $deliveredOrderWidth = ($currentDeliveredOrder / $maxValue) * 100; } else { $deliveredOrderWidth = 0; } @endphp

{{ labels('admin_labels.cancelled', 'Cancelled') }}

{{ app(OrderService::class)->ordersCount('cancelled', '', '', $store_id) }}

@php $currentRecivedOrder = app(OrderService::class)->ordersCount('cancelled', '', '', $store_id); $maxValue = app(OrderService::class)->ordersCount('', '', '', $store_id); if ($currentRecivedOrder > 0 && $maxValue > 0) { $cancelledOrderWidth = ($currentRecivedOrder / $maxValue) * 100; } else { $cancelledOrderWidth = 0; } @endphp

{{ labels('admin_labels.returned', 'Returned') }}

{{ app(OrderService::class)->ordersCount('returned', '', '', $store_id) }}

@php $currentRecivedOrder = app(OrderService::class)->ordersCount('returned', '', '', $store_id); $maxValue = app(OrderService::class)->ordersCount('', '', '', $store_id); if ($currentRecivedOrder > 0 && $maxValue > 0) { $returnedOrderWidth = ($currentRecivedOrder / $maxValue) * 100; } else { $returnedOrderWidth = 0; } @endphp

{{ labels('admin_labels.customer_statistics', 'Customer Statistics') }}

{{ labels('admin_labels.recent_tickets', 'Recent Tickets') }}

{{ labels('admin_labels.view_all', 'View All') }}
{{ labels('admin_labels.ticket_type', 'Ticket Type') }} {{ labels('admin_labels.subject', 'Subject') }} {{ labels('admin_labels.status', 'Status') }} {{ labels('admin_labels.date_created', 'Date Created') }}

{{ labels('admin_labels.top_sellers', 'Top Sellers') }}

@forelse ($top_sellers as $item)
{{ $item['store_name'] }}

{{ $item['seller_name'] }}

{{ $item['store_name'] }}

{{ $item['total_sales'] }}

{{ $item['total_commission'] }} Sales


@empty

No data found

@endforelse
{{-- recent orders --}}

{{ labels('admin_labels.recent_orders', 'Recent Orders') }}

{{ labels('admin_labels.order_id', 'Order ID') }} {{ labels('admin_labels.user_name', 'User Name') }} {{ labels('admin_labels.payment_method', 'Payment Method') }} {{ labels('admin_labels.active_status', 'Active Status') }} {{ labels('admin_labels.order_date', 'Order Date') }} {{ labels('admin_labels.total', 'Total') }}() {{ labels('admin_labels.action', 'Action') }}
@include('Chatify::layouts.modals') @include('Chatify::layouts.footerLinks') @endsection