@extends('layout') @section('h4-page', __('Customer')) @section('contents')
@if (session('success')) @endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
{{-- info & summery --}}
logo

{{ __('Account Name') }} : {{ @$main->fullname() ?? '-' }}

{{ __('Date of Birth') }} : {{ @$main->birthday ? date('d-m-Y', strtotime(@$main->birthday ?? '-')) : '' }}

{{ __('Tel') }} : {{ @$main->tel ?? '-' }}

{{ __('Email') }} : {{ @$main->email ?? '-' }}

{{ __('Create Date') }} : {{ date('d-m-Y', strtotime(@$main->created_at ?? '-')) }}

{{ __('Address') }}
@foreach (@$main->address as $key => $item)

{{ @$item->fullname }} | {{ @$item->phone }}

{{ @$item->fullAddress() }}

@endforeach
logo

{{ number_format(@$count) }}

{{ __('Total Order') }}

logo

฿ {{ number_format(@$sum, 2) }}

{{ __('Total Sale') }}

{{-- search --}}
  • {{-- --}}
{{-- Order --}}
@forelse (@$orders as $key => $item) @empty @endforelse
# {{ __('OrderNo') }} {{ __('OrderDate') }} {{ __('RiderName') }} {{ __('Priority') }} {{ __('Status') }} {{ __('Total') }} {{ __('Action') }}
{{ $orders->currentPage() > 1 ? $orders->perPage() * $orders->currentPage() - $orders->perPage() + $key + 1 : $key + 1 }} {{ $item->no }} {{ $item->date }} @if ( $item->status_booking == App\Enums\OrderStatusEnums::PICKUP || $item->status_booking == App\Enums\OrderStatusEnums::PROCESSING) {{ $item?->rider?->fullname() ?? '' }} @elseif ( $item->status_booking == App\Enums\OrderStatusEnums::SHIPPING || $item->status_booking == App\Enums\OrderStatusEnums::DELIVERY || $item->status_booking == App\Enums\OrderStatusEnums::SUCCESS) {{ $item?->riderSend?->fullname() ?? '' }} @endif {{ $item->getPriority() }} {{ $item->getStatus() }} {{ number_format($item->total_price, 2) }}
{{ __('NoDataFound') }}
{{ @$orders->appends(request()->except('page'))->links('pagination::bootstrap-5') }}
@endsection @section('scripts') @endsection