@extends('layouts.backoffice') @section('content')

Welcome to Nazzela Administration

The platform administration panel

spike-img
spike-img
{{ $dashboard['total_revenue'] }}

Total Revenue

{{ $dashboard['total_new_orders'] }}

Total New Orders

{{ $dashboard['total_orders'] }}

Total Store Orders

{{ $dashboard['total_customers'] }}

Total Customers

{{ $dashboard['total_barters'] }}

Total Barter Offers

{{ $dashboard['total_active_customer_items'] }}

Marketplace Items

{{ $dashboard['total_active_customer_services'] }}

Marketplace Services

@php // to be used in the "dashboard2.js" file to load the chart canvas $top_products_chart_JS = [ 'series' => '', 'labels' => '', 'colors' => '' ]; $customers_geolocation_chart_JS = [ 'series' => '', 'labels' => '' ]; $color_index = 0; $colors = ["var(--bs-success)", "#f8c076", "#fb977d", "var(--bs-primary)","#e7ecf0"]; @endphp
@foreach($dashboard['top_products'] as $product)

{{ $dashboard['top_product_quantity_by_id'][$product->id] }}

{{ $product->name }}

@php $top_products_chart_JS['series'] .= $dashboard['top_product_quantity_by_id'][$product->id].','; $top_products_chart_JS['labels'] .= '"'.$product->name.'",'; $top_products_chart_JS['colors'] .= '"'.$colors[$color_index++].'",'; @endphp @endforeach

Top-5 Geolocation Customers

@foreach($dashboard['customers_geolocation_details'] as $country=>$nb_customers) @php $customers_geolocation_chart_JS['series'] .= $nb_customers.','; $customers_geolocation_chart_JS['labels'] .= '"'.$country.'",'; @endphp @endforeach

Newly Onboarded Customers

@foreach($dashboard['customers_list'] as $customer) @endforeach
Customer Country Phone Status
spike-img
{{ $customer->first_name ? ($customer->first_name.' '.$customer->last_name) : ('No Name '.$customer->last_name) }}

{{ $customer->code }}

{{ getCountryNameByKey($customer->country) ?? 'Unknown' }}

{{ $customer->mobile ?? '-' }}

@php $status = "Unknown"; if($customer->status == 1){ $status = 'Available'; } elseif($customer->status == 0){ $status = 'InActive'; } elseif($customer->status == -10){ $status = 'Blocked'; } @endphp {!! $status !!}

Latest Orders

@foreach($dashboard['latest_orders'] as $order) @endforeach
Code Region Store Amount Status
spike-img
{{ $order->code }}

{{ $order->customer->first_name ? ($order->customer->first_name.' '.$order->customer->last_name) : ('No Name '.$order->customer->last_name) }}

{{ $order->region->name }}

{{ is_null($order->store_id) ? '-' : $order->store->name }}

{{ $order->total_amount }}

@php $status = "Unknown"; if($order->status == 1){ $status = 'Completed'; } elseif($order->status == 0){ $status = 'Pending'; } elseif($order->status == 2){ $status = 'Picked Up'; } @endphp {!! $status !!}
@endsection