@extends('layouts.admin.app') @section('title',translate('Item Campaign Preview')) @push('css_or_js') @endpush @section('content')
Image Description
{{translate('messages.campaign')}} {{translate('messages.starts')}} {{translate('messages.from')}} : {{$campaign->start_date->format('Y-M-d')}} {{translate('messages.campaign')}} {{translate('messages.ends')}} {{translate('messages.at')}} : {{$campaign->end_date->format('Y-M-d')}} {{translate('messages.available')}} {{translate('messages.time')}} {{translate('messages.starts')}} : {{$campaign->start_time->format(config('timeformat'))}} {{translate('messages.available')}} {{translate('messages.time')}} {{translate('messages.ends')}} : {{$campaign->end_time->format(config('timeformat'))}}
{{translate('restaurant_info')}} @if($campaign->restaurant) Image Description

{{$campaign->restaurant['name']}}

@else {{translate('messages.restaurant')}} {{translate('messages.deleted')}} @endif
{{translate('food_information')}}

{{translate('short_description')}}

{{translate('messages.price')}}

{{translate('messages.variations')}}

{{translate('addons')}}

{{$campaign['description']}}

{{translate('messages.price')}} : {{\App\CentralLogics\Helpers::format_currency($campaign['price'])}} {{translate('messages.tax')}} : {{\App\CentralLogics\Helpers::format_currency(\App\CentralLogics\Helpers::tax_calculate($campaign,$campaign['price']))}} {{translate('messages.discount')}} : {{\App\CentralLogics\Helpers::format_currency(\App\CentralLogics\Helpers::discount_calculate($campaign,$campaign['price']))}}
{{-- @foreach(json_decode($campaign['variations'],true) as $variation) {{$variation['type']}} : {{\App\CentralLogics\Helpers::format_currency($variation['price'])}} @endforeach --}} @foreach(json_decode($campaign->variations,true) as $variation) @if(isset($variation["price"])) {{ translate('please_update_the_food_variations.') }} @break @else {{$variation['name']}} - @if ($variation['type'] == 'multi') {{ translate('messages.multiple_select') }} @elseif($variation['type'] =='single') {{ translate('messages.single_select') }} @endif {{-- {{\App\CentralLogics\Helpers::format_currency($variation['price'])}} --}} @if ($variation['required'] == 'on') - ({{ translate('messages.required') }}) @endif @if ($variation['min'] != 0 && $variation['max'] != 0) ({{ translate('messages.Min_select') }}: {{ $variation['min'] }} - {{ translate('messages.Max_select') }}: {{ $variation['max'] }}) @endif @if (isset($variation['values'])) @foreach ($variation['values'] as $value)     {{ $value['label']}} : {{\App\CentralLogics\Helpers::format_currency( $value['optionPrice'])}} @endforeach @endif @endif @endforeach @foreach(\App\Models\AddOn::withOutGlobalScope(App\Scopes\RestaurantScope::class)->whereIn('id',json_decode($campaign['add_ons'],true))->get() as $addon) {{$addon['name']}} : {{\App\CentralLogics\Helpers::format_currency($addon['price'])}} @endforeach
@php($orders = $campaign->orderdetails()->paginate(config('default_pagination')))
{{translate('campaign_restaurant_list')}} {{ count($orders) }}
{{translate('messages.export')}}
@foreach($orders as $key=>$order) @endforeach
SL {{translate('messages.order')}} {{translate('messages.date')}} {{translate('messages.customer')}} {{translate('messages.vendor')}} {{translate('messages.payment')}} {{translate('messages.status')}} {{translate('messages.total')}} {{translate('messages.order')}} {{translate('messages.status')}}
{{$key+1}} {{$order->order['id']}} {{date('d M Y',strtotime($order->order['created_at']))}} @if($order->order->customer) {{$order->order->customer['f_name'].' '.$order->order->customer['l_name']}} @else @endif @if($order->order->payment_status=='paid') {{translate('messages.paid')}} @else {{translate('messages.unpaid')}} @endif {{\App\CentralLogics\Helpers::format_currency($order->order['order_amount'])}} @if($order->order['order_status']=='pending') {{translate('messages.pending')}} @elseif($order->order['order_status']=='confirmed') {{translate('messages.confirmed')}} @elseif($order->order['order_status']=='processing') {{translate('messages.processing')}} @elseif($order->order['order_status']=='out_for_delivery') {{translate('messages.out_for_delivery')}} @elseif($order->order['order_status']=='delivered') {{translate('messages.delivered')}} @else {{str_replace('_',' ',$order->order['order_status'])}} @endif
{!! $orders->links() !!}
@endsection @push('script_2') @endpush