@extends('layouts.app', ['title' => __('Orders')]) @section('content')
{{-- ================= LEFT SIDE (COL-XL-7) ================= --}}

{{-- HEADER --}}

{{ "#".$order->id_formated." - ".$order->created_at->locale(Config::get('app.locale'))->isoFormat('LLLL') }}

{{-- BODY --}}
@include('partials.flash') {{-- ===== Restaurant + Table/Client (SAME ROW) ===== --}}
{{-- Restaurant Info --}} @if ($order->restorant)
{{ __('Restaurant information') }}
{{ $order->restorant->name }}

{{ $order->restorant->address }}

{{ $order->restorant->phone }}

{{ $order->restorant->user->name }}, {{ $order->restorant->user->email }}

@endif {{-- Table / Client Info --}}
@if (config('app.isft') && $order->client)
{{ __('Client Information') }}
{{ $order->client->name }}

{{ $order->client->email }}

{{ $order->address->address ?? '' }}

{{ $order->client->phone ?? '' }}

@elseif ($order->table)
{{ __('Table Information') }}
{{ __('Table:') }} {{ $order->table->name }}
@if ($order->table->restoarea)

{{ __('Area:') }} {{ $order->table->restoarea->name }}

@endif
@endif
{{-- ================= RIGHT SIDE (COL-XL-5) ================= --}}
@if(config('app.isft')&&$order->restorant)
{{ __("Order tracking")}}
@if ($order->restorant)
@include('orders.partials.map',['order'=>$order])
@endif
@endif
@if ($order->client_id!=null&&$order->client_id!=$order->restorant->id)
@include('clients.profile',['client'=>$order->client])
@endif
{{ __("Status History")}}
@include('orders.partials.orderstatus')
@if(auth()->user()->hasAnyRole(['admin','owner','staff','driver'])) @foreach ($orderModules as $orderModule) @include($orderModule.'::card') @endforeach @endif @if(auth()->user()->hasRole('client')) @if($order->status->pluck('alias')->last() == "delivered"||$order->status->pluck('alias')->last() == "closed")
@include('orders.partials.rating',['order'=>$order]) @endif @endif