@extends('backEnd.master') @section('styles') @endsection @section('mainContent')

{{ __('common.summary') }}

@if(isModuleActive('MultiVendor')) @if(auth()->user()->role->type == 'superadmin' || auth()->user()->role->type == 'seller' || auth()->user()->role->type == 'admin') @endif @endif
@if (permissionCheck('widget_card')) @endif
@if (permissionCheck('widget_card'))
@if (app('dashboard_setup')->where('type', 'total_product_card')->first()->is_active && permissionCheck('widget_total_product')) @endif @if (app('dashboard_setup')->where('type', 'total_seller_card')->first()->is_active && permissionCheck('widget_total_seller') && isModuleActive('MultiVendor')) @endif @if (app('dashboard_setup')->where('type', 'total_customer_card')->first()->is_active && permissionCheck('widget_total_customer')) @endif @if (app('dashboard_setup')->where('type', 'visitor_card')->first()->is_active && permissionCheck('widget_visitor')) @endif @if (app('dashboard_setup')->where('type', 'total_order_card')->first()->is_active && permissionCheck('widget_total_order')) @endif @if (app('dashboard_setup')->where('type', 'total_pending_order_card')->first()->is_active && permissionCheck('widget_total_pending_order')) @endif @if (app('dashboard_setup')->where('type', 'total_completed_order_card')->first()->is_active && permissionCheck('widget_total_completed_order')) @endif @if (app('dashboard_setup')->where('type', 'total_sale_amount_card')->first()->is_active && permissionCheck('widget_total_sale'))

{{ __('dashboard.total_sale') }}

{{ single_price($total_sale) }}

@endif @if (app('dashboard_setup')->where('type', 'total_review_card')->first()->is_active && permissionCheck('widget_total_review'))

{{ __('dashboard.total_review') }}

{{ getNumberTranslate($total_review) }}

@endif @if (app('dashboard_setup')->where('type', 'total_revenue_card')->first()->is_active && permissionCheck('widget_total_revenue'))

{{ __('dashboard.today_sale_revenue') }}

{{ single_price($total_revenue) }}

@endif @if (app('dashboard_setup')->where('type', 'total_active_customer_card')->first()->is_active && permissionCheck('widget_active_customer')) @endif @if (app('dashboard_setup')->where('type', 'total_subscriber_card')->first()->is_active && permissionCheck('widget_total_subcriber'))

{{ __('dashboard.total_subscriber') }}

{{ getNumberTranslate($total_subscriber) }}

@endif
@endif @if(permissionCheck('dashboard_graph'))
@if (app('dashboard_setup')->where('type', 'product_graph')->first()->is_active && permissionCheck('dashboard_graph_products'))

{{ __('dashboard.products') }}

@endif @if (app('dashboard_setup')->where('type', 'order_summary_graph')->first()->is_active && permissionCheck('dashboard_graph_orders_summary'))

{{ __('dashboard.orders_summary') }}

@endif @if (app('dashboard_setup')->where('type', 'seller_graph')->first()->is_active && permissionCheck('dashboard_graph_sellers') && isModuleActive('MultiVendor'))

{{ __('dashboard.sellers') }}

@endif @if (app('dashboard_setup')->where('type', 'guest_vs_registered_order_graph')->first()->is_active && permissionCheck('dashboard_graph_gueast_authorize_order_today'))

{{ __('dashboard.guest_authorized_order_today') }}

@endif @if (app('dashboard_setup')->where('type', 'today_order_summary_graph')->first()->is_active && permissionCheck('dashboard_graph_today_order_summary'))

{{ __('dashboard.today_order_summary') }}

@endif
@if (app('business_settings')->where('type', 'google_analytics')->first()->status == 1 && permissionCheck('dashboard_graph_site_analytics'))

{{ __('dashboard.site_analytics') }}

@if (isset($total_page_visitor))

{{ __('dashboard.total_visitor') }}

{{ getNumberTranslate($total_page_visitor) }}

@endif @if (isset($total_page_views))

{{ __('dashboard.total_page_views') }}

{{ getNumberTranslate($total_page_views) }}

@endif @if (isset($total_new_visitor))

{{ __('dashboard.new_visitors') }}

{{ getNumberTranslate($total_new_visitor) }}

@endif @if (isset($total_old_views))

{{ __('dashboard.old_visitors') }}

{{ getNumberTranslate($total_old_views) }}

@endif @if (isset($total_in_session))

{{ __('dashboard.total_in_sessions') }}

{{getNumberTranslate( $total_in_session) }}

@endif
@endif @endif
@if (app('dashboard_setup')->where('type', 'top_ten_product')->first()->is_active && permissionCheck('dashboard_top_ten_product'))

{{ __('dashboard.top_10_product') }}

@foreach($top_ten_products as $key => $product) @endforeach
{{__('common.sl')}} {{__('common.name')}} {{ __('common.brand') }} {{ __('common.total_sale') }}
{{getNumberTranslate($key + 1)}} {{$product->product->product_name}} {{$product->product->brand->name}} {{getNumberTranslate($product->total_sale)}}
@endif @if (app('dashboard_setup')->where('type', 'top_ten_seller')->first()->is_active && permissionCheck('dashboard_top_ten_seller') && isModuleActive('MultiVendor'))

{{ __('dashboard.top_10_seller') }}

@foreach($top_ten_sellers as $key => $top_ten_seller) @endforeach
{{__('common.sl')}} {{__('common.name')}} {{ __('common.shop') }}
{{getNumberTranslate($key+1)}} @if ($top_ten_seller->user->slug) {{$top_ten_seller->user->first_name}} {{$top_ten_seller->user->last_name}} @else {{$top_ten_seller->user->first_name}} {{$top_ten_seller->user->last_name}} @endif @if ($top_ten_seller->user->slug) {{$top_ten_seller->seller_shop_display_name}} @else {{$top_ten_seller->seller_shop_display_name}} @endif
@endif @if (app('dashboard_setup')->where('type', 'category_wise_product_qty')->first()->is_active && permissionCheck('dashboard_category_wise_product_qty'))

{{ __('dashboard.category_wise_product_qty') }}

@foreach($categories as $key => $category) @endforeach
{{__('common.sl')}} {{ __('common.category_name') }} {{ __('common.product_qty') }}
{{getNumberTranslate($key+1)}} {{$category->name}} {{getNumberTranslate(count($category->products))}}
@if ($categoriesTotal > 10) @endif
@endif @if (app('dashboard_setup')->where('type', 'category_wise_sale')->first()->is_active && permissionCheck('dashboard_category_wise_product_sale'))

{{ __('dashboard.category_wise_product_sale') }}

@foreach($topSaleCategories as $key => $topSaleCategory) @endforeach
{{__('common.sl')}} {{ __('common.category_name') }} {{ __('common.no_of_sale') }}
{{getNumberTranslate($key+1)}} {{$topSaleCategory->name}} {{getNumberTranslate($topSaleCategory->total_sale)}}
@if ($categoriesTotal > 10) @endif
@endif @if (app('dashboard_setup')->where('type', 'coupon_wise_sale')->first()->is_active && permissionCheck('dashboard_coupon_wise_sale'))

{{ __('dashboard.coupon_wise_sale') }}

@foreach($coupon_wise_sales as $key => $coupon) @endforeach
{{__('common.sl')}} {{ __('common.type') }} {{ __('common.coupon') }} {{ __('common.total_discount') }} {{ __('common.num_of_uses') }}
{{getNumberTranslate($key+1)}} @if ($coupon->coupon_type == 1) {{__('marketing.product_base')}} @elseif ($coupon->coupon_type == 2) {{__('marketing.order_base')}} @else {{__('marketing.free_shipping')}} @endif {{$coupon->coupon_code}} {{getNumberTranslate($coupon->coupon_uses->sum('discount_amount'))}} {{@getNumberTranslate($coupon->coupon_uses->count())}}
@if (count($total_coupon) > 10) @endif
@endif @if (app('dashboard_setup')->where('type', 'new_customers')->first()->is_active && permissionCheck('dashboard_new_customers'))

{{ __('dashboard.new_customers') }}

@foreach($new_customers as $key => $customer) @endforeach
{{__('common.sl')}} {{ __('common.name') }} {{ __('common.email') }} {{ __('common.action') }}
{{getNumberTranslate($key+1)}} {{$customer->first_name}} {{ $customer->last_name }} {{getNumberTranslate($customer->email)}} {{__('common.details')}}
@endif @if (app('dashboard_setup')->where('type', 'recently_added_products')->first()->is_active && permissionCheck('dashboard_recently_added_products'))

{{ __('dashboard.recently_added_products') }}

@foreach($recently_added_products as $key => $product) @endforeach
{{__('common.sl')}} {{__('common.name')}} {{ __('common.brand') }} {{ __('common.total_sale') }}
{{getNumberTranslate($key + 1)}} {{$product->product->product_name}} {{$product->product->brand->name}} {{getNumberTranslate($product->total_sale)}}
@endif @if (app('dashboard_setup')->where('type', 'top_refferer')->first()->is_active && permissionCheck('dashboard_top_refferers'))

{{ __('dashboard.top_refferers') }}

@foreach($top_refferers as $key => $top_refferer) @endforeach
{{__('common.sl')}} {{__('common.name')}} {{ __('common.count') }}
{{getNumberTranslate($key + 1)}} {{$top_refferer->user->first_name}} {{getNumberTranslate($top_refferer->total_used)}}
@endif @if (app('dashboard_setup')->where('type', 'latest_order')->first()->is_active && permissionCheck('dashboard_latest_order'))

{{ __('dashboard.latest_order') }}

@foreach($latest_orders as $key => $order) @endforeach
{{__('common.order_id')}} {{__('common.total_amount')}} {{__('order.order_status')}} {{__('common.action')}}
{{getNumberTranslate($order->order_number)}} {{single_price($order->grand_total)}} @if ($order->is_confirmed == 1 && $order->is_completed == 1 )
{{__('common.completed')}}
@elseif ($order->is_confirmed == 1 && $order->is_cancelled == 0)
{{__('common.confirmed')}}
@elseif ($order->is_confirmed == 2 && $order->is_cancelled == 0)
{{__('common.declined')}}
@elseif($order->is_cancelled == 1)
{{__('common.cancelled')}}
@else
{{__('common.pending')}}
@endif
{{__('common.details')}}
@endif @if (app('dashboard_setup')->where('type', 'latest_search_keyword')->first()->is_active && permissionCheck('dashboard_latest_search_keyword'))

{{ __('dashboard.latest_search_keyword') }}

@foreach($latest_search_keywords as $key => $keyword) @endforeach
{{__('common.sl')}} {{__('common.keyword')}}
{{getNumberTranslate( $key+1 )}} {{ $keyword->keyword }}
@endif @if (app('dashboard_setup')->where('type', 'appealed_dispute')->first()->is_active && permissionCheck('dashboard_appealed_disputed'))

{{ __('dashboard.appealed_disputed') }}

{{ __('dashboard.top_customers') }}

@php $user_list = \App\Models\User::whereIn('id', $top_disputed_customer->pluck('customer_id'))->get(['id','first_name']); @endphp @foreach ($top_disputed_customer as $key => $d_customer) @endforeach
{{__('common.sl')}} {{__('common.name')}} {{__('common.amount')}}
{{ getNumberTranslate($key + 1) }} {{ @$user_list->where('id', @$d_customer->customer_id)->first()->first_name }} {{ single_price($d_customer->total) }}
@if(isModuleActive('MultiVendor'))

{{ __('dashboard.top_sellers') }}

@php $user_list = \App\Models\User::whereIn('id', $top_disputed_sellers->pluck('seller_id'))->get(['id','first_name']); @endphp @foreach ($top_disputed_sellers as $key => $d_seller) @php $seller_info = $user_list->where('id', $d_seller->seller_id)->first(); @endphp @endforeach
{{__('common.sl')}} {{__('common.name')}} {{__('common.amount')}}
{{ getNumberTranslate($key + 1) }} {{ $seller_info->first_name }} {{ single_price($seller_info->SellerRefundedAmounts) }}
@endif
@endif @if (app('dashboard_setup')->where('type', 'reviews')->first()->is_active && permissionCheck('dashboard_recent_reviews'))

{{ __('dashboard.recent_reviews') }}

{{ __('dashboard.product_reviews') }}

@php $product_reviews = \Modules\Review\Entities\ProductReview::orderBy('id','desc')->get()->take(10); @endphp @foreach ($product_reviews as $key => $review) @endforeach
{{__('common.sl')}} {{__('product.product_name')}} {{__('review.rating')}} {{__('review.customer_feedback')}}
{{ getNumberTranslate($key + 1) }} @if($review->product)

{{($review->type == 'product')?$review->product->product_name:$review->giftcard->name}}

@endif

{{ \Str::substr($review->review, 0, 100) }}

{{ __('dashboard.seller_reviews') }}

@if(isModuleActive('MultiVendor')) @endif @php $seller_reviews = \Modules\Review\Entities\SellerReview::orderBy('id','desc')->get()->take(10); @endphp @foreach ($seller_reviews as $key => $review) @if(isModuleActive('MultiVendor')) @endif @endforeach
{{__('common.sl')}}{{__('common.seller')}}{{__('review.rating')}} {{__('review.customer_feedback')}}
{{ getNumberTranslate($key + 1) }}{{ $review->seller->first_name }}

{{ \Str::substr($review->review, 0, 100) }}

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