@extends('layouts.admin.app') @section('title', translate('Food_Campaign_Preview')) @section('content')
image
{{ translate('messages.campaign_starts_from') }} : {{ \App\CentralLogics\Helpers::date_format($campaign->start_date) }} {{ translate('messages.campaign_ends_at') }} : {{ \App\CentralLogics\Helpers::date_format($campaign->end_date) }} {{ translate('messages.available_time_starts') }} : {{ \App\CentralLogics\Helpers::time_format($campaign->start_time) }} {{ translate('messages.available_time_ends') }} : {{ \App\CentralLogics\Helpers::time_format($campaign->end_time) }}
{{ translate('restaurant_info') }} @if ($campaign->restaurant) image

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

@else {{ translate('messages.restaurant_deleted') }} @endif
{{ translate('food_information') }}
@if ($productWiseTax) @endif @if ($productWiseTax) @endif

{{ translate('short_description') }}

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

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

{{ translate('addons') }}

{{ translate('Tax/Vat') }}

{{ $campaign['description'] }}

{{ translate('messages.price') }} : {{ \App\CentralLogics\Helpers::format_currency($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) @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 @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 @forelse ($campaign?->taxVats?->pluck('tax.name', 'tax.tax_rate')->toArray() as $key => $tax) {{ $tax }} : ({{ $key }}%)
@empty {{ translate('messages.N/A') }} @endforelse
{{ translate('campaign_restaurant_list') }} {{ count($orders) }}
@foreach ($orders as $key => $order) @endforeach
{{ translate('sl') }} {{ translate('messages.order') }} {{ translate('messages.date') }} {{ translate('messages.customer') }} {{ translate('messages.vendor') }} {{ translate('messages.payment_status') }} {{ translate('messages.total') }} {{ translate('messages.order_status') }}
{{ $key + 1 }} {{ $order->order['id'] }} {{ Carbon\Carbon::parse($order['created_at'])->locale(app()->getLocale())->translatedFormat('d M Y') }} @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') {{ $order?->order_type == 'dine_in' ? translate('messages.Completed') : translate('messages.delivered') }} @else {{ str_replace('_', ' ', $order->order['order_status']) }} @endif
@if(count($orders) === 0)
public
{{translate('no_data_found')}}
@endif
{!! $orders->links() !!}
@endsection @push('script_2') @endpush