@props(['notifications', 'is_linkable' => false]) @forelse($notifications as $notification)
@php $user_type = auth()->user()->user_type; @endphp @if ($notification->type == 'App\Notifications\OrderNotification') {{ translate('Order code: ') }} @if ($is_linkable) @php if ($user_type == 'admin'){ $route = route('all_orders.show', encrypt($notification->data['order_id'])); } if ($user_type == 'seller'){ $route = route('seller.orders.show', encrypt($notification->data['order_id'])); } @endphp @endif {{ $notification->data['order_code'] }} @if ($is_linkable) @endif {{ translate(' has been ' . ucfirst(str_replace('_', ' ', $notification->data['status']))) }} @elseif ($notification->type == 'App\Notifications\ShopVerificationNotification') @if ($user_type == 'admin') @if ($is_linkable) @endif {{ $notification->data['name'] }}: @if ($is_linkable) @endif @else {{ translate('Your ') }} @endif {{ translate('verification request has been '.$notification->data['status']) }} @elseif ($notification->type == 'App\Notifications\ShopProductNotification') @php $product_id = $notification->data['id']; $product_type = $notification->data['type']; $product_name = $notification->data['name']; $lang = env('DEFAULT_LANGUAGE'); $route = $user_type == 'admin' ? ( $product_type == 'physical' ? route('products.seller.edit', ['id'=>$product_id, 'lang'=>$lang]) : route('digitalproducts.edit', ['id'=>$product_id, 'lang'=>$lang] )) : ( $product_type == 'physical' ? route('seller.products.edit', ['id'=>$product_id, 'lang'=>$lang]) : route('seller.digitalproducts.edit', ['id'=>$product_id, 'lang'=>$lang] )); @endphp {{ translate('Product : ') }} @if ($is_linkable) {{ $product_name }} @else {{ $product_name }} @endif {{ translate(' is').' '.$notification->data['status'] }} @elseif ($notification->type == 'App\Notifications\PayoutNotification') @php $route = $user_type == 'admin' ? ( $notification->data['status'] == 'pending' ? route('withdraw_requests_all') : route('sellers.payment_histories')) : ( $notification->data['status'] == 'pending' ? route('seller.money_withdraw_requests.index') : route('seller.payments.index')); @endphp {{ $user_type == 'admin' ? $notification->data['name'].': ' : translate('Your') }} @if ($is_linkable ) {{ translate('payment') }} @else {{ translate('payment') }} @endif {{ single_price($notification->data['payment_amount']).' '.translate('is').' '.translate($notification->data['status']) }} @endif
{{ date('F j Y, g:i a', strtotime($notification->created_at)) }}