@extends('admin.layouts.app') @section('main_content')

{{ translate($title) }}

{{ translate('Order List') }}
@forelse($orders as $order) @empty @endforelse
{{ translate('Order ID') }} {{ translate('Qty') }} {{ translate('Time') }} {{ translate('Customer Info') }} {{ translate('Product Details') }} {{ translate('Amount') }} {{ translate('Delivery') }} {{ translate('Action') }}
{{ $order->order_id }} {{ $order->qty }}
{{ diff_for_humans($order->created_at) }}
{{ get_date_time($order->created_at) }}
@php $firstName = @$order->billingAddress ? @$order->billingAddress->first_name : @$order->billing_information->first_name ; $lastName = @$order->billingAddress ? @$order->billingAddress->last_name : @$order->billing_information->last_name ; $phone = @$order->billingAddress ? @$order->billingAddress->phone : @$order->billing_information->phone ; $email = @$order->billingAddress ? @$order->billingAddress->email : @$order->billing_information->email ; $city = @$order->billingAddress ? @$order->billingAddress->city->name : @$order->billing_information->city ; $country = @$order->billingAddress ? @$order->billingAddress->country->name : @$order->billing_information->country ; $zip = @$order->billingAddress ? @$order->billingAddress->zip : @$order->billing_information->zip ; $address = @$order->billingAddress ? @$order->billingAddress->address->address : @$order->billing_information->address ; @endphp {{ translate('Name') }}: {{ @$order->customer->name ?? @$firstName }}
{{ translate('Phone') }}: {{ @$order->customer->phone ?? @$phone }}
@if ($order->customer_id) {{ translate('Email') }} : {{ @$order->customer->email ?? 'N\A' }} @else {{ translate('Email') }} : {{ @$email ?? 'N\A' }} @endif
{{ translate('Country') }} : {{ @$country }}
{{ translate('City') }} : {{ @$city}}
{{ translate('Address') }} : {{ @$address }}
{{ translate('Shipping Method') }}: {{ @$order->shipping->name ?? 'N\A' }}
{{ short_amount($order->amount) }}
@if ($order->payment_status == App\Models\Order::UNPAID) {{ translate('Unpaid') }} @elseif($order->payment_status == App\Models\Order::PAID) {{ translate('Paid') }} @endif
@php echo order_status_badge($order->status) @endphp
@include('admin.partials.not_found')
{{ $orders->appends(request()->all())->links() }}
@endsection @push('script-push') @endpush