@extends('admin.templates.layout') @section('content')
@php $kpis = [ ['Total Orders', $stats['total_orders'], 'primary'], ['Active Shipments', $stats['active_shipments'], 'info'], ['Completed', $stats['completed'], 'success'], ['Cancelled', $stats['cancelled'], 'danger'], ]; @endphp @foreach($kpis as [$label, $v, $c])

{{ $label }}

{{ $v }}

@endforeach
Cargo Company Information
{{ $company->initials }}
{{ $company->company_name ?: $company->name }}

{{ $company->name }}

{!! account_status_badge($company->status) !!}

Account
User Code
{{ $company->user_code ?: '-' }}
Role
{{ config("global.user_roles.{$company->role}") ?: '-' }}
First Name
{{ $company->first_name ?: '-' }}
Last Name
{{ $company->last_name ?: '-' }}
Email
{{ $company->email ?: '-' }}
Phone
{{ ($company->dial_code || $company->phone) ? '+' . $company->dial_code . $company->phone : '-' }}
Social Login
{!! $company->is_social ? '' . e(ucfirst($company->social_type ?: 'social')) . '' : 'No' !!}
Registered
{{ web_date_in_timezone($company->created_at, 'M d, Y h:i A') }}

Business
Company
{{ $company->company_name ?: '-' }}

Location
City
{{ $company->city?->name ?: '-' }}
Country
{{ $company->country?->name ?: '-' }}

Approval
Approved
{!! $company->approved_at ? 'Yes' : 'No' !!}
Approved At
{{ $company->approved_at ? web_date_in_timezone($company->approved_at, 'M d, Y h:i A') : '-' }}
Rejected Reason
{{ $company->rejected_reason ?: '-' }}
{{-- Assigned Orders --}}
Assigned Orders
{{ $orders->count() }} shown
@forelse($orders as $o) @empty @endforelse
Reference Merchant Destination Qty Amount Status Date
{{ $o->order_reference }} {{ $o->merchant?->company_name ?: ($o->merchant?->name ?: '-') }} {{ $o->destination_city ?: '-' }} {{ $o->total_items_quantity ?: 0 }} {{ number_format((float) ($o->total_items_amount ?? 0), 2) }} {{ $o->currency ?: 'AED' }} {!! order_status_badge($o->status) !!} {{ web_date_in_timezone($o->created_at, 'M d, Y') }}
No orders assigned yet.
{{-- Warehouses --}}
Warehouses
{{ $warehouses->count() }} total
@forelse($warehouses as $w) @empty @endforelse
User Code Name Email Phone Status Registered
{{ $w->user_code ?: '-' }} {{ $w->name ?: '-' }} {{ $w->email ?: '-' }} {{ ($w->dial_code || $w->phone) ? '+' . $w->dial_code . $w->phone : '-' }} {!! account_status_badge($w->status) !!} {{ web_date_in_timezone($w->created_at, 'M d, Y') }}
No warehouses yet.
{{-- Recent Deliveries --}}
Recent Deliveries
{{ $deliveries->count() }} shown
@forelse($deliveries as $d) @empty @endforelse
Tracking # Order Transporter Qty Charges Status Date
{{ $d->tracking_number }} {{ $d->order->order_reference ?? '-' }} {{ $d->transporter?->company_name ?: ($d->transporter?->name ?: '-') }} {{ $d->quantity }} {{ number_format((float) $d->total_charges, 2) }} AED @php $info = config("global.transporter_delivery_statuses.{$d->status}") ?? ['text' => 'Unknown', 'class' => 'secondary']; @endphp {{ $info['text'] }} {{ web_date_in_timezone($d->created_at, 'M d, Y') }}
No deliveries yet.
@endsection