@extends('backend.layouts.app') @section('content') @php CoreComponentRepository::instantiateShopRepository(); CoreComponentRepository::initializeCache(); @endphp

{{ translate('All Preorder Products') }}

@can('add_preorder_product') @endcan

{{ translate('All Preorder Products') }}
@php $activeClasss = 'p-3 m-2 text-white rounded-3 fs-12 bg-soft-dark'; $inActiveClasses = 'bg-white p-3 m-2 rounded-3 text-muted fs-12 fw-600'; @endphp {{ translate('All') }} {{ translate('In-house') }}({{ $inHouseProductCount }}) {{ translate('Seller’s') }}({{ $sellerProductCount }})
{{ translate('Published') }}({{ $publishedProductCount }}) {{ translate('Unpublished') }}({{ $unpublishedProductCount }}) {{ translate('Discounted') }}({{ $discountedProductCount }})
@can('delete_preorder_product') @endcan
@if (auth()->user()->can('product_delete')) @else @endif @if($type == 'seller' && get_setting('product_approve_by_admin')) @endif @foreach ($products as $key => $product) @if (auth()->user()->can('product_delete')) @else @endif @if($type == 'seller' && get_setting('product_approve_by_admin')) @endif @endforeach
#{{ translate('Image') }} {{ translate('Product details') }} {{ translate('Product details') }} {{ translate('Price') }} {{ translate('Discount') }} {{ translate('Availability') }} {{ translate('Orders') }} {{ translate('Status') }}{{ translate('Approval') }}{{ translate('Actions') }}
{{ $key + 1 + ($products->currentPage() - 1) * $products->perPage() }}
Image
{{ Str::limit($product?->getTranslation('product_name'), 50, ' ...') }}
{{ translate('Category') }} {{ $product->category?->name }}
{{ translate( $product->user->user_type != 'seller' ? 'In-house' : $product->user->shop->name) }} {{ translate('Product Created :') . $product->created_at->format('d.m.Y') }}
{{ translate('Min Purchase Qty') }} {{ $product->min_qty . ' ' . $product->unit }}
{{ translate('Refund') }} {{ $product->is_refundable ? 'Refundable' : 'Not Refundable' }}
{{ translate('Price') }} {{ $product->unit_price . ' / ' . $product->unit }} {{ translate('Fixed') }}
@if($product->is_prepayment)
{{ translate('Prepayment') }} {{ $product->preorder_prepayment?->prepayment_amount }} {{ translate('Needed') }}
@endif
@if($product->discount > 0)
-{{ $product->discount_type == 'flat' ? single_price($product->discount) : $product->discount.'%' }}
@endif
@if($product->is_available || $product->available_date != null)
@if($product->is_available) {{ translate('Available now') }} @elseif($product->available_date != null) {{ $product->available_date }} {{strtotime($product->available_date) > strtotime(date('d-m-Y')) ? translate('Approx') : translate('Available now') }} @endif
@endif
{{ translate('PreOrder') }} @if($product->is_prepayment) {{ $product->preorder->where('request_preorder_status',2)->whereIn('prepayment_confirm_status',[0,1])->count() }} @else {{ $product->preorder->where('request_preorder_status',2)->whereIn('final_order_status',[0, 1])->count() }} @endif
{{ translate('Final Order') }} {{ $product->preorder->where('final_order_status', 2)->count() }}
{{ translate('Publish') }}
{{ translate('Featured') }}
@can('edit_preorder_product') @endcan @can('delete_preorder_product') @if($product->preorder->count() == 0) @endif @endcan
{{ $products->appends(request()->input())->links() }}
@endsection @section('modal') @include('modals.delete_modal') @include('modals.bulk_delete_modal') @endsection @section('script') @endsection