관리-도구
편집 파일: a94ebc642dfaf99d3afc4008a4ed793e.php
<?php $__env->startSection('title', translate('product_List')); ?> <?php $__env->startSection('content'); ?> <div class="content container-fluid"> <div class="mb-3"> <h2 class="h1 mb-0 text-capitalize d-flex align-items-center gap-2"> <img src="<?php echo e(dynamicAsset(path: 'public/assets/new/back-end/img/inhouse-product-list.png')); ?>" alt=""> <?php if($type == 'in_house'): ?> <?php echo e(translate('in_House_Product_List')); ?> <?php elseif($type == 'seller'): ?> <?php echo e(translate('vendor_Product_List')); ?> <?php endif; ?> <span class="badge text-dark bg-body-secondary fw-semibold rounded-50"><?php echo e($products->total()); ?></span> </h2> </div> <div class="row mt-20"> <div class="col-md-12"> <div class="card"> <div class="px-3 py-4"> <div class="d-flex flex-wrap justify-content-between align-items-center gap-3"> <div class="min-w-300 min-w-100-mobile"> <form action="<?php echo e(url()->current()); ?>" method="get"> <input type="hidden" value="<?php echo e(request('request_status')); ?>" name="request_status"> <input type="hidden" value="<?php echo e(request('status')); ?>" name="status"> <div class="input-group"> <input id="datatableSearch_" type="search" name="searchValue" class="form-control" placeholder="<?php echo e(translate('search_by_Product_Name')); ?>" aria-label="Search orders" value="<?php echo e(request('searchValue')); ?>"> <div class="input-group-append search-submit"> <button type="submit"> <i class="fi fi-rr-search"></i> </button> </div> </div> </form> </div> <div class="d-flex flex-wrap gap-3 justify-content-lg-end"> <div class="dropdown"> <a type="button" class="btn btn-outline-primary" href="<?php echo e(route('admin.products.export-excel', [ 'type' => request('type'), 'request_status' => request('request_status'), 'searchValue' => request('searchValue'), 'seller_id' => request('seller_id'), 'filter_sort_by' => request('filter_sort_by'), 'filter_product_types' => request('filter_product_types'), 'product_status' => request('product_status'), 'filter_brand_ids' => request('filter_brand_ids'), 'filter_category_ids' => request('filter_category_ids'), ])); ?>"> <i class="fi fi-sr-inbox-in"></i> <span class="fs-12"><?php echo e(translate('export')); ?></span> </a> </div> <div class="position-relative"> <buton type="btn" class="btn btn-primary" data-bs-toggle="offcanvas" data-bs-target="#offcanvasProductFilter"> <i class="fi fi-sr-settings-sliders d-flex"></i> <?php echo e(translate('Filter')); ?> </buton> <?php if(!empty(request('filter_sort_by')) || !empty(request('filter_product_types')) || !empty(request('product_status')) || !empty(request('filter_shop_ids')) || !empty(request('filter_brand_ids')) || !empty(request('filter_category_ids'))): ?> <div class="position-absolute top-n1 inset-inline-end-n1 btn-circle bg-danger border border-white border-2" style="--size: 12px;"></div> <?php endif; ?> </div> <?php if($type == 'in_house'): ?> <a href="<?php echo e(route('admin.products.add')); ?>" class="btn btn-primary"> <i class="fi fi-sr-add"></i> <span class="text"><?php echo e(translate('Add_New_Product')); ?></span> </a> <?php endif; ?> </div> </div> </div> <div class="table-responsive"> <table id="datatable" class="table table-hover table-borderless table-thead-bordered align-middle"> <thead class="text-capitalize"> <tr> <th><?php echo e(translate('SL')); ?></th> <th><?php echo e(translate('product Name')); ?></th> <th class="text-center"><?php echo e(translate('product Type')); ?></th> <th class="text-center"><?php echo e(translate('unit_price')); ?></th> <th class="text-center"><?php echo e(translate('stock')); ?></th> <?php if($productWiseTax): ?> <th class="text-center"><?php echo e(translate('Vat/Tax')); ?></th> <?php endif; ?> <th> <div class="d-flex justify-content-center"> <div> <div class="d-flex gap-2"> <span><?php echo e(translate('show_as_featured')); ?> </span> <span class="tooltip-icon" data-bs-toggle="tooltip" data-bs-placement="top" aria-label="<?php echo e(translate('Highlight_this_product_on_the_homepage_by_marking_it_as_featured')); ?>" data-bs-title="<?php echo e(translate('Highlight_this_product_on_the_homepage_by_marking_it_as_featured')); ?>"> <i class="fi fi-sr-info"></i> </span> </div> <div><?php echo e(translate('on_homepage')); ?></div> </div> </div> </th> <th class="text-center"><?php echo e(translate('status')); ?> </th> <th class="text-center"><?php echo e(translate('action')); ?></th> </tr> </thead> <tbody> <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <th scope="row"><?php echo e($products->firstItem() + $key); ?></th> <td> <a href="<?php echo e(route('admin.products.view', ['addedBy' => $product['added_by'] == 'seller' ? 'vendor' : 'in-house', 'id' => $product['id']])); ?>" class="media align-items-center gap-2"> <img src="<?php echo e(getStorageImages(path: $product->thumbnail_full_url, type: 'backend-product')); ?>" class="avatar border object-fit-cover" alt=""> <div> <div class="d-flex gap-2 align-items-center lh-1 w-max-content text-wrap line-1 max-w-300 min-w-130 text-dark text-hover-primary"> <div class="media-body text-dark line-1 text-hover-primary" data-bs-toggle="tooltip" title="<?php echo e($product['name']); ?>"> <?php echo e(Str::limit($product['name'], 20)); ?> </div> <?php if($product?->clearanceSale): ?> <span class="text-secondary" data-bs-toggle="tooltip" title="<?php echo e(translate('Clearance_Sale')); ?>"> <i class="fi fi-sr-bahai"></i> </span> <?php endif; ?> </div> <div class="d-flex gap-2 align-items-center lh-1 mt-2"> <div class="text-body"> <?php echo e(translate('Id')); ?> # <?php echo e($product['id']); ?> </div> </div> </div> </a> </td> <td class="text-center"> <?php echo e(translate(str_replace('_', ' ', $product['product_type']))); ?> </td> <td class="text-center"> <?php echo e(setCurrencySymbol(amount: usdToDefaultCurrency(amount: $product['unit_price']), currencyCode: getCurrencyCode())); ?> </td> <td> <div class="d-flex justify-content-center gap-2 align-items-center lh-1"> <?php if($product['product_type'] === 'physical'): ?> <span><?php echo e($product->current_stock); ?></span> <?php if($product->current_stock <= 0): ?> <span class="text-danger-dark fs-18" data-bs-toggle="tooltip" title="<?php echo e(translate('Out_of_Stock')); ?>"> <i class="fi fi-sr-exclamation"></i> </span> <?php elseif($product->current_stock <= 20): ?> <span class="text-warning-dark fs-18" data-bs-toggle="tooltip" title="<?php echo e(translate('Low_Stock')); ?>"> <i class="fi fi-sr-exclamation"></i> </span> <?php endif; ?> <?php else: ?> <span>-</span> <?php endif; ?> </div> </td> <?php if($productWiseTax): ?> <td class="text-center"> <span class=""> <?php $__empty_1 = true; $__currentLoopData = $product?->taxVats; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $taxVat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <span><?php echo e($taxVat?->tax?->name); ?> : <span class="font-bold"> (<?php echo e($taxVat?->tax?->tax_rate); ?>%) </span> </span> <br> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <span><?php echo e(translate('N/A')); ?></span> <?php endif; ?> </span> </td> <?php endif; ?> <?php $isDisabled = request()->has('request_status') && request('request_status') === '0' || request('request_status') === '2'; ?> <td class="text-center"> <div class="" data-bs-toggle="<?php echo e($isDisabled ? 'tooltip' : ''); ?>" title="<?php echo e($isDisabled ? translate('Non approved products cannot be featured') : ''); ?>"> <input type="checkbox" class="product-status-checkbox form-check-input checkbox--input checkbox--input_lg" data-id="<?php echo e($product['id']); ?>" data-action="<?php echo e(route('admin.products.featured-status')); ?>" <?php echo e($product['featured'] == 1 ? 'checked' : ''); ?> <?php echo e($isDisabled ? 'disabled' : ''); ?>> </div> </td> <td class="text-center"> <form action="<?php echo e(route('admin.products.status-update')); ?>" method="post" id="product-status<?php echo e($product['id']); ?>-form" class="admin-product-status-form"> <?php echo csrf_field(); ?> <input type="hidden" name="id" value="<?php echo e($product['id']); ?>"> <label class="switcher mx-auto" for="products-status-update-<?php echo e($product['id']); ?>"> <input class="switcher_input custom-modal-plugin" type="checkbox" value="1" name="status" id="products-status-update-<?php echo e($product['id']); ?>" <?php echo e($product['status'] == 1 ? 'checked' : ''); ?> data-modal-type="input-change-form" data-modal-form="#product-status<?php echo e($product['id']); ?>-form" data-on-image="<?php echo e(dynamicAsset(path: 'public/assets/new/back-end/img/modal/product-status-on.png')); ?>" data-off-image="<?php echo e(dynamicAsset(path: 'public/assets/new/back-end/img/modal/product-status-off.png')); ?>" data-on-title="<?php echo e(translate('Want_to_Turn_ON') . ' ' . str_replace("'", '`', $product['name']) . ' ' . translate('status')); ?>" data-off-title="<?php echo e(translate('Want_to_Turn_OFF') . ' ' . str_replace("'", '`', $product['name']) . ' ' . translate('status')); ?>" data-on-message="<p><?php echo e(translate('if_enabled_this_product_will_be_available_on_the_website_and_customer_app')); ?></p>" data-off-message="<p><?php echo e(translate('if_disabled_this_product_will_be_hidden_from_the_website_and_customer_app')); ?></p>"> <span class="switcher_control"></span> </label> </form> </td> <td> <div class="d-flex justify-content-center gap-2"> <a class="btn top01 btn-outline-warning btn-outline-warning-dark icon-btn" title="<?php echo e(translate('barcode')); ?>" href="<?php echo e(route('admin.products.barcode', [$product['id']])); ?>"> <i class="fi fi-sr-barcode"></i> </a> <a class="btn btn-outline-success top01 btn-outline-success-dark icon-btn" title="View" href="<?php echo e(route('admin.products.view', ['addedBy' => $product['added_by'] == 'seller' ? 'vendor' : 'in-house', 'id' => $product['id']])); ?>"> <i class="fi fi-sr-eye"></i> </a> <a class="btn btn-outline-info top01 icon-btn" title="<?php echo e(translate('edit')); ?>" href="<?php echo e(route('admin.products.update', [$product['id']])); ?>"> <i class="fi fi-sr-pencil"></i> </a> <span class="btn btn-outline-danger top01 icon-btn delete-data" title="<?php echo e(translate('delete')); ?>" data-id="product-<?php echo e($product['id']); ?>"> <i class="fi fi-rr-trash"></i> </span> </div> <form action="<?php echo e(route('admin.products.delete', [$product['id']])); ?>" method="post" id="product-<?php echo e($product['id']); ?>"> <?php echo csrf_field(); ?> <?php echo method_field('delete'); ?> </form> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> <div class="table-responsive mt-4"> <div class="px-4 d-flex justify-content-lg-end"> <?php echo e($products->links()); ?> </div> </div> <?php if(count($products) == 0): ?> <?php echo $__env->make( 'layouts.admin.partials._empty-state', ['text' => 'no_product_found'], ['image' => 'default'] , array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> <?php endif; ?> </div> </div> </div> </div> <span id="message-select-word" data-text="<?php echo e(translate('select')); ?>"></span> <?php echo $__env->make('admin-views.product.partials.offcanvas._filter-offcanvas', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.admin.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/slnssare/public_html/resources/views/admin-views/product/list.blade.php ENDPATH**/ ?>