@extends("layouts.admin.app") @section("page-title") {{__("Dashboard")}} @endSection @section("page-nav-title")
{{__("Orders")}}
{{__("All Orders")}}
{{__("Dashboard")}}
{{__("Orders")}}
@endsection @section("css-links")
getLocale() . "/pages/orders.css")}}"> @endsection @section("content") @include("includes.dialog")
{{__("Order Details")}} #{{$order->id}}
status == "-1") yellow @else green @endif">{{$order->getStatusText()}}
@if(in_array((int)$order->status, [-1, 1]))
@include("admin.order.parts.forms.assign_technician")
@endif @if($order->activation == "0")
$order->id])}}" class="btn btn-primary">{{__("Activation")}}
@endif
@if(in_array((int)$order->status, [-1, 1, 2, 4]))
$order->id])}}" method="POST"> @csrf
{{__("Cancel")}}
@endif @if(in_array((int)$order->status, [2, 4]))
$order->id, "type" => "cancel-assign"])}}" method="POST"> @csrf
{{__("Cancel Assign")}}
@endif
{{__('General Information')}}
{{__('Full Name')}}
{{$order->user->full_name}}
{{__('Phone Number')}}
{{$order->user->client ? $order->user->client->phone_number : ($order->user->institution ? $order->user->institution->phone_number : Null)}}
{{__('Created')}}
{{ date("Y-m-d h:i A", strtotime($order->created_at))}}
{{--
--}} {{--
--}} {{--
{{__('Image')}}
--}} {{--
--}} {{--
@if($notes->getFirstMediaFile())
@endif
--}} {{--
--}}
{{__('Date Time')}}
{{ $order->order_day }} | {{date("h:i A", strtotime($order->order_time))}}
{{__('Order Location From')}}
{{__("View With Map")}}
{{$order->order_location_beck_up_name}}
{{__('Location')}}
×
order_location_beck_up_latitude}},{{$order->order_location_beck_up_longitude}}">
{{__('Order Location To')}}
{{__("View With Map")}}
{{$order->order_location_drop_of_name}}
{{__('Location')}}
×
order_location_drop_of_latitude}},{{$order->order_location_drop_of_longitude}}">
@if($order->type == "n")
{{__('Number of service required')}}
{{count($order->orderServices)}}
@endif
{{__('Payment Method')}}
{{$order->paymentMethod->name}}
@if(in_array($order->status, [1, 2, 3, 4]))
{{__("Driver")}}
{{$order->acceptOrder()->technician->full_name}}
@elseif(in_array($order->status, [0]))
{{__("Driver")}}
{{$order->canceled->user->full_name}}
@endif @if($order->status == 3)
@if($order->rating && $order->rating->number_rating != 0)
{{__('Driver rating')}}
@if(in_array($order->rating->number_rating, [1,2,3]))
{{$order->rating->reason}}
@endif @else
{{__('Driver rating')}}
{{__("There's No Rating")}}
@endif
@endif
@if($order->attachment)
{{__("Attachments")}}
{{__("Certificate of origin")}}
url}}" width="80">
url}}" download="" class="btn btn-primary">{{__('Download')}}
{{__("Packing list")}}
url}}" width="80">
url}}" download="" class="btn btn-primary">{{__('Download')}}
{{__("Customs broker authorization")}}
url}}" width="80">
url}}" download="" class="btn btn-primary">{{__('Download')}}
{{__("Invoice certified by the chamber of commerce")}}
url}}" width="80">
url}}" download="" class="btn btn-primary">{{__('Download')}}
@endif @if($order->type == "n")
{{__("Services")}}
@php $different = []; @endphp @foreach($order->orderServices as $orderService) @php $different[] = $orderService->service_id; @endphp
{{$orderService->service->full_name}}
@if($orderService->properties->isNotEmpty())
{{__("Properties")}}
@foreach($orderService->properties as $property)
{{$property->property->name}}
{{$property->value_type == "f" || ($property->value_type == "v" && $property->property->type == "TF") ? $property->getValue() : ($property->getValue() ? __("Yes") : __("No"))}}
@endforeach
@endif @if($orderService->questions->isNotEmpty())
{{__('Questions')}}
@foreach($orderService->questions as $question)
{{$question->question->text}}
{{__('Answer')}}: {{$question->answer ? __("Yes") : __("No")}} @if($question->note)
Note: {{$question->note}} @endif
@endforeach
@endif @if($orderService->image)
{{__("Images")}}
{{__("Order Image")}}
@endif
@endforeach @if($order->invoice) @foreach($order->invoice->services as $orderService) @if(!in_array($orderService->service_id, $different))
{{$orderService->service->full_name}}
@endif @endforeach @endif
@else
{{__("Services")}}
{{__("Shipment Back Services")}}
{{__("City")}}
{{__("City From")}}
{{$order->refer->from_type == "c" ? $order->refer->cityFrom->getNameFromAttribute() : $order->refer->cityFrom->name}}
{{__("City To")}}
{{$order->refer->from_type == "c" ? $order->refer->cityFrom->getNameToAttribute() : $order->refer->cityFrom->name}}
{{__("Properties")}}
{{__("Shipment type")}}
{{$order->refer->type}}
{{__("Shipment weight")}}
{{$order->refer->weight}}
@endif @if($order->invoice)
@include("admin.order.parts.invoice", ["invoice" => $order->invoice])
@endif @if($order->status == 0)
@include("admin.order.parts.cancel_info", ["canceled" => $order->canceled])
@endif
@endsection @section("scripts") @endsection