File manager - Edit - /var/www/payraty/inventory_main/storage/framework/views/f1fd9705266f53361d66938e0b5a98567ffa59c0.php
Back
<?php $__env->startSection('content'); ?> <div class="page-title-box"> <div class="row align-items-center"> <div class="col-sm-6"> <ol class="d-flex align-items-center p-0 m-0" style="list-style: none;"> <li class="me-2"> <a href="#" class="text-decoration-none ic-javascriptVoid"><?php echo e(__('custom.product')); ?></a> <span class="mx-1">/</span> </li> <li class="text-primary"><?php echo e(__('custom.product_list')); ?></li> </ol> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="card mt-2 import-box"> <div class="card-header import-header"> <h5><?php echo e(__('Upload Products')); ?></h5> <p class="text-muted"><?php echo e(__('Supported file types: CSV & XLSX.')); ?></p> </div> <div class="card-body"> <?php echo e(Form::open(['route' => ['admin.products.upload'], 'method' => 'POST', 'enctype' => 'multipart/form-data'])); ?> <div class="row align-items-center"> <div class="col-md-8"> <div class="form-group"> <?php echo e(Form::label('file', __('Choose File'), ['class' => 'form-label'])); ?> <?php echo e(Form::file('product', [ 'class' => 'form-control', 'accept' => '.csv, .xlsx', ])); ?> </div> </div> <div class="col-md-4 text-end import-button-box"> <button type="submit" class="btn btn-primary import-button"> <?php echo e(__('Upload')); ?> </button> </div> </div> <?php echo e(Form::close()); ?> <div class="mt-3"> <a href="https://payraty-files.s3.eu-west-2.amazonaws.com/uploads/6836ae16a78bf.xlsx" class="text-primary"> <?php echo e(__('Download Sample File')); ?> </a> </div> </div> </div> </div> </div> <div class="p-4 rounded" style="background: #F0F2F5; margin-bottom: 25px;"> <div class="d-sm-flex justify-content-between"> <div> <h3 class="h5 text-dark font-weight-semibold">Today's Products</h3> <div class="mt-2"> <h3 class="h6 text-muted">Product Summary</h3> </div> </div> <div class="d-sm-flex justify-content-end align-items-center gap-3 mt-3 mt-lg-0"> <a href="<?php echo e(route('admin.products.create')); ?>" data-size="xl" data-url="" data-ajax-popup="true" data-toggle="tooltip" title="<?php echo e(__('Create')); ?>" data-title="<?php echo e(__('Create Product & Service')); ?>" class="btn btn-outline-dark d-flex align-items-center mr-3"> <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M12 5V19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M5 12H19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span class="ms-2">Create Product</span> </a> <button id="export-btn" class="btn btn-outline-dark d-flex align-items-center"> <svg width="18" height="18" viewBox="0 0 18 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M6.5325 5.78267L8.25 4.05767V11.2502C8.25 11.4491 8.32902 11.6398 8.46967 11.7805C8.61032 11.9211 8.80109 12.0002 9 12.0002C9.19891 12.0002 9.38968 11.9211 9.53033 11.7805C9.67098 11.6398 9.75 11.4491 9.75 11.2502V4.05767L11.4675 5.78267C11.5372 5.85296 11.6202 5.90876 11.7116 5.94684C11.803 5.98491 11.901 6.00452 12 6.00452C12.099 6.00452 12.197 5.98491 12.2884 5.94684C12.3798 5.90876 12.4628 5.85296 12.5325 5.78267C12.6028 5.71294 12.6586 5.62999 12.6967 5.5386C12.7347 5.4472 12.7543 5.34918 12.7543 5.25017C12.7543 5.15116 12.7347 5.05313 12.6967 4.96173C12.6586 4.87034 12.6028 4.78739 12.5325 4.71767L9.5325 1.71767C9.46117 1.64939 9.37706 1.59586 9.285 1.56017C9.1024 1.48515 8.8976 1.48515 8.715 1.56017C8.62294 1.59586 8.53883 1.64939 8.4675 1.71767L5.4675 4.71767C5.39757 4.7876 5.3421 4.87061 5.30426 4.96198C5.26641 5.05335 5.24693 5.15127 5.24693 5.25017C5.24693 5.34906 5.26641 5.44699 5.30426 5.53835C5.3421 5.62972 5.39757 5.71274 5.4675 5.78267C5.53743 5.8526 5.62045 5.90807 5.71181 5.94591C5.80318 5.98376 5.90111 6.00323 6 6.00323C6.09889 6.00323 6.19682 5.98376 6.28819 5.94591C6.37955 5.90807 6.46257 5.8526 6.5325 5.78267ZM15.75 10.5002C15.5511 10.5002 15.3603 10.5792 15.2197 10.7198C15.079 10.8605 15 11.0513 15 11.2502V14.2502C15 14.4491 14.921 14.6398 14.7803 14.7805C14.6397 14.9212 14.4489 15.0002 14.25 15.0002H3.75C3.55109 15.0002 3.36032 14.9212 3.21967 14.7805C3.07902 14.6398 3 14.4491 3 14.2502V11.2502C3 11.0513 2.92098 10.8605 2.78033 10.7198C2.63968 10.5792 2.44891 10.5002 2.25 10.5002C2.05109 10.5002 1.86032 10.5792 1.71967 10.7198C1.57902 10.8605 1.5 11.0513 1.5 11.2502V14.2502C1.5 14.8469 1.73705 15.4192 2.15901 15.8412C2.58097 16.2631 3.15326 16.5002 3.75 16.5002H14.25C14.8467 16.5002 15.419 16.2631 15.841 15.8412C16.2629 15.4192 16.5 14.8469 16.5 14.2502V11.2502C16.5 11.0513 16.421 10.8605 16.2803 10.7198C16.1397 10.5792 15.9489 10.5002 15.75 10.5002Z" fill="currentColor" /> </svg> <span class="ms-2">Export</span> </button> </div> </div> <div id="export-dropdown" class="text-right hidden"> <hr> <button type="button" data-div-name="section-to-print-products" style="padding-bottom: 100px;" class="btn btn-warning btn-sm section-print-btn"> <i class="fa fa-print"></i> <?php echo e(__('custom.print')); ?></button> <a href="<?php echo e(route('admin.products.export.index', ['type' => 'pdf'])); ?>" class="btn btn-pdf btn-sm"> <i class="fa fa-file-pdf"></i> <?php echo e(__('custom.pdf')); ?></a> <a href="<?php echo e(route('admin.products.export.index', ['type' => 'csv'])); ?>" class="btn btn-success btn-sm"> <i class="fa fa-file-csv"></i> <?php echo e(__('custom.csv')); ?></a> <a href="<?php echo e(route('admin.products.export.index', ['type' => 'excel'])); ?>" class="btn btn-excel btn-sm"> <i class="fa fa-file-csv"></i> <?php echo e(__('custom.excel')); ?></a> </div> <div class="mt-4"> <div class="row g-4"> <div class="col-sm-12 col-md-4"> <a href="" class="card border-0 bg-white shadow-sm text-decoration-none"> <div class="card-body d-flex flex-column justify-content-between p-4"> <div class="d-flex align-items-center text-sm text-muted"> <span class="p-2 blue-color rounded-circle"> <img src="<?php echo e(asset('images/svg/product.svg')); ?>" class="w-4 h-4" alt="Employee Icon" /> </span> </div> <dl class="mt-3"> <dt class="h2 text-primary font-weight-bold"> <?php echo e($totalProducts); ?> </dt> <dd class="mt-2 text-muted fw-semibold">Total Product</dd> </dl> </div> </a> </div> <div class="col-sm-12 col-md-4"> <a href="" class="card border-0 bg-white shadow-sm text-decoration-none"> <div class="card-body d-flex flex-column justify-content-between p-4"> <div class="d-flex align-items-center text-sm text-muted"> <span class="p-2 orange-color rounded-circle"> <img src="<?php echo e(asset('images/svg/sales.svg')); ?>" class="w-4 h-4" alt="Employee Icon" /> </span> </div> <dl class="mt-3"> <dt class="h2 orange-text font-weight-bold"> <?php echo e($totalCategories); ?> </dt> <dd class="mt-2 text-muted fw-semibold">Product Categories</dd> </dl> </div> </a> </div> <div class="col-sm-12 col-md-4"> <a href="" class="card border-0 bg-white shadow-sm text-decoration-none"> <div class="card-body d-flex flex-column justify-content-between p-4"> <div class="d-flex align-items-center text-sm text-muted"> <span class="p-2 green-color rounded-circle"> <img src="<?php echo e(asset('images/svg/customer.svg')); ?>" class="w-4 h-4" alt="Employee Icon" /> </span> </div> <dl class="mt-3"> <dt class="h2 green-text font-weight-bold"> <?php echo e($totalBrands); ?> </dt> <dd class="mt-2 text-muted fw-semibold">Brands</dd> </dl> </div> </a> </div> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-body"> <div class="header-container_b"> <!-- All Employees Header --> <div class="header-title"> <h5>List Of Products</h5> </div> <!-- Search Input with Icon --> <div class="search-container"> <form action="/admin/products"> <div class="input-group"> <span class="input-group-text"> <i class="fas fa-search"></i> </span> <input name="search" value="<?php echo e(request('search') ?? ''); ?>" type="search" class="form-control" placeholder="Search by name..." /> <button class="btn btn-primary">Search</button> </div> </form> </div> </div> <div id="section-to-print-products" class="table-responsive"> <table class="table" style="border-collapse: collapse;"> <thead style="background: #F8F9FD;"> <tr class="table-row"> <th><?php echo e(__('S/N')); ?></th> <th><?php echo e(__('Name')); ?></th> <th><?php echo e(__('Thumb')); ?></th> <th><?php echo e(__('SKU')); ?></th> <th><?php echo e(__('Category')); ?></th> <th><?php echo e(__('Price')); ?></th> <th><?php echo e(__('Stock Quantity')); ?></th> <th><?php echo e(__('Variant')); ?></th> <th><?php echo e(__('Status')); ?></th> <th><?php echo e(__('Action')); ?></th> </tr> </thead> <tbody> <?php if($products->isEmpty()): ?> <tr> <td colspan="10" class="text-center"> <img src="<?php echo e(asset('/images/no-data.png')); ?>" alt="No Data" style="max-width: 350px; margin-bottom: 50px; margin-top: 150px;"> <p><?php echo e(__('Oops, no products yet.')); ?></p> </td> </tr> <?php else: ?> <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e(0); ?><?php echo e($loop->iteration); ?></td> <td><?php echo e($product->name); ?></td> <td> <img src="<?php echo e(Storage::url('products/' . $product->thumb)); ?>" alt="" class="img-thumbnail" style="width: 50px; height: 50px; object-fit: cover;" onerror="this.onerror=null;this.src='<?php echo e(asset('images/default.png')); ?>';"> </td> <td><?php echo e($product->sku ?? '-'); ?></td> <td><?php echo e(optional($product->category)->name ?? '-'); ?></td> <td><?php echo e(currencySymbol() . makeCurrencyFormat($product->price)); ?></td> <td><?php echo e($product->stock == null ? 0 : $product->stock); ?></td> <td> <p> <?php echo e($product->is_variant == 0 ? 'No' : 'Yes'); ?> </p> </td> <td> <p class="<?php echo e($product->status == 'active' ? 'verified' : 'unverified'); ?>"> <?php echo e($product->status == 'active' ? 'Active' : 'Inactive'); ?> </p> </td> <td> <div class="custom-dropdown-b"> <i class="fa-solid fa-ellipsis" onclick="toggleDropdown(event)"></i> <div class="dropdown-menu-b"> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="<?php echo e(route('admin.products.show', $product->id)); ?>"> <i class="fas fa-eye"></i> Show </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="<?php echo e(route('admin.products.edit', $product->id)); ?>"> <i class="mdi mdi-square-edit-outline"></i> Edit </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="<?php echo e(route('admin.product-stocks.edit', $product->id)); ?>"> <i class="mdi mdi-format-list-bulleted"></i> Stock And Price </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b update-stock" data-id="<?php echo e($product->id); ?>" href="#"> <i class="mdi mdi-stack-exchange"></i> Update Stock </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="<?php echo e(route('admin.products.barcode.download', $product->id)); ?>"> <i class="mdi mdi-download"></i> Download Barcode </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="<?php echo e(route('admin.products.transfer.page', $product->id)); ?>"> <i class="fa fa-undo-alt"></i> Transfer Product </a> </div> <div class="dropdown-item-column-b"> <form class="form-delete-button" action="<?php echo e(route('admin.products.destroy', $product->id)); ?>" id="delete-form-<?php echo e($product->id); ?>" method="post"> <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?> <a style="cursor:pointer;width:100%" class="dropdown-item-b button-delete" onclick="event.preventDefault(); document.getElementById('delete-form-<?php echo e($product->id); ?>').submit();"> <i class="mdi mdi-trash-can-outline"></i> Delete </a> </form> </div> </div> </div> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </tbody> </table> <!-- Pagination Links --> <div class="d-flex justify-content-end mt-3"> <?php echo e($products->links('pagination::bootstrap-4')); ?> </div> </div> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('script'); ?> <script> document.addEventListener("DOMContentLoaded", function () { document.getElementById("export-btn").addEventListener("click", function () { let dropdown = document.getElementById("export-dropdown"); dropdown.classList.toggle("hidden"); }); }); //Filter Functionality const filterDropdown = document.querySelector('.custom-dropdown .dropdown-content'); const filterItems = filterDropdown.querySelectorAll('a'); const productRows = document.querySelectorAll('tbody tr'); filterItems.forEach(item => { item.addEventListener('click', function (e) { e.preventDefault(); const filterValue = this.getAttribute('data-value'); // Update button text to show selected filter const filterBtn = document.querySelector('.dropdown-btn'); filterBtn.innerHTML = `<i class="fas fa-filter"></i> ${this.textContent}`; // Make AJAX request to get filtered data fetch(`/admin/products-filter?period=${filterValue}`, { method: 'GET', headers: { 'X-Requested-With': 'XMLHttpRequest', 'Accept': 'application/json', } }) .then(response => response.json()) .then(data => { console.log(data); const tbody = document.querySelector('tbody'); tbody.innerHTML = ''; // Clear existing rows if (data.products.data.length === 0) { tbody.innerHTML = ` <tr> <td colspan="10" class="text-center"> <img src="/images/no-data.png" alt="No Data" style="max-width: 350px; margin-bottom: 50px; margin-top: 150px;"> <p>Oops, no products found for this period.</p> </td> </tr> `; return; } // Populate table with filtered data data.products.data.forEach((product, index) => { const row = ` <tr> <td>0${index + 1}</td> <td>${product.name}</td> <td> <img src="/storage/products/${product.thumb}" alt="" class="img-thumbnail" style="width: 50px; height: 50px; object-fit: cover;" onerror="this.onerror=null;this.src='/images/default.png';"> </td> <td>${product.sku}</td> <td>${product.category.name}</td> <td>${product.price}</td> <td>${product.stock || 0}</td> <td> <p>${product.is_variant == 0 ? 'No' : 'Yes'}</p> </td> <td> <p class="${product.status == 'active' ? 'verified' : 'unverified'}"> ${product.status == 'active' ? 'Active' : 'Inactive'} </p> </td> <<<<<<< HEAD <td> <div class="custom-dropdown-b"> <i class="fa-solid fa-ellipsis" onclick="toggleDropdown(event)"></i> <div class="dropdown-menu-b"> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="/admin/products/${product.id}"> <i class="fas fa-eye"></i> Show </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="/admin/products/${product.id}/edit"> <i class="mdi mdi-square-edit-outline"></i> Edit </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="/admin/product-stocks/${product.id}/edit"> <i class="mdi mdi-format-list-bulleted"></i> Stock And Price </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b update-stock" data-id="${product.id}" href="#"> <i class="mdi mdi-stack-exchange"></i> Update Stock </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="/admin/products/barcode/${product.id}/download"> <i class="mdi mdi-download"></i> Download Barcode </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="/admin/products/transfer/${product.id}"> <i class="fa fa-undo-alt"></i> Transfer Product </a> </div> <div class="dropdown-item-column-b"> <form class="form-delete-button" action="/admin/products/${product.id}" id="delete-form-${product.id}" method="post"> <input type="hidden" name="_token" value="${document.querySelector('meta[name="csrf-token"]').content}"> <input type="hidden" name="_method" value="DELETE"> <a style="cursor:pointer;width:100%" class="dropdown-item-b button-delete" ======= <td> <div class="custom-dropdown-b"> <i class="fa-solid fa-ellipsis" onclick="toggleDropdown(event)"></i> <div class="dropdown-menu-b"> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="/admin/products/${product.id}"> <i class="fas fa-eye"></i> Show </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="/admin/products/${product.id}/edit"> <i class="mdi mdi-square-edit-outline"></i> Edit </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="/admin/product-stocks/${product.id}/edit"> <i class="mdi mdi-format-list-bulleted"></i> Stock And Price </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b update-stock" data-id="${product.id}" href="#"> <i class="mdi mdi-stack-exchange"></i> Update Stock </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="admin/product/barcode/${product.id}"> <i class="mdi mdi-download"></i> Download Barcode </a> </div> <div class="dropdown-item-column-b"> <a class="dropdown-item-b" href="admin/product-transfer/${product.id}"> <i class="fa fa-undo-alt"></i> Transfer Product </a> </div> <div class="dropdown-item-column-b"> >>>>>>> d2f7a35f02d89c0444b1b652f18ba41746a29668 onclick="event.preventDefault(); document.getElementById('delete-form-${product.id}').submit();"> <i class="mdi mdi-trash-can-outline"></i> Delete </a> </form> </div> </div> </div> </td> </tr> `; tbody.insertAdjacentHTML('beforeend', row); }); }) .catch(error => { console.error('Error:', error); }); }); }); </script> <?php $__env->stopPush(); ?> <style> </style> <?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/payraty/inventory_main/resources/views/admin/products/index.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings