

<?php $__env->startSection('title', 'Item Suppliers'); ?>

<?php $__env->startSection('content'); ?>
<div class="page-content">
    <div class="row">
        <div class="col-md-12">
            <div class="page-title-box">
                <div class="page-title-right">
                    <ol class="breadcrumb m-0">
                        <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></li>
                        <li class="breadcrumb-item active">Item Suppliers</li>
                    </ol>
                </div>
                <h4 class="page-title">Item Suppliers</h4>
            </div>
        </div>
    </div>
    <?php if(session('success')): ?>
    <div class="alert alert-success alert-dismissible fade show" role="alert">
        <i class="fas fa-check-circle me-2"></i>
        <?php echo e(session('success')); ?>

        <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
    </div>
<?php endif; ?>

<?php if($errors->any()): ?>
    <div class="alert alert-danger alert-dismissible fade show" role="alert">
        <i class="fas fa-exclamation-triangle me-2"></i>
        <?php echo e($errors->first()); ?>

        <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
    </div>
<?php endif; ?>
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-header d-flex justify-content-between align-items-center">
                    <h4 class="header-title">Item Suppliers</h4>
                    <a href="<?php echo e(route('item-suppliers.create')); ?>" class="btn btn-primary">
                        <i class="fas fa-plus"></i> Add Supplier
                    </a>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table id="item-suppliers-table" class="table table-striped table-centered mb-0">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Item</th>
                                    <th>Supplier</th>
                                    <th>Primary</th>
                                    <th>Lead Time</th>
                                    <th>Min Order</th>
                                    <th>Last Price</th>
                                    <th>Actions</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('plugin-scripts'); ?>
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('plugin-styles'); ?>
<link href="https://cdn.datatables.net/1.11.5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<?php $__env->stopPush(); ?>

<?php $__env->startPush('scripts'); ?>
<script>
$(document).ready(function() {
    $('#item-suppliers-table').DataTable({
        processing: true,
        serverSide: false,
        ajax: '<?php echo e(route("item-suppliers.data")); ?>',
        columns: [
            {data: 'id', name: 'id'},
            {data: 'item_name', name: 'item_name'},
            {data: 'supplier_name', name: 'supplier_name'},
            {data: 'primary_badge', name: 'primary'},
            {data: 'lead_time', name: 'lead_time'},
            {data: 'min_order', name: 'min_order'},
            {data: 'last_price', name: 'last_price'},
            {data: 'actions', name: 'actions', orderable: false, searchable: false}
        ],
        order: [[0, 'desc']],
        pageLength: 25,
        language: {
            search: "Search:",
            lengthMenu: "Show _MENU_ entries per page",
            info: "Showing _START_ to _END_ of _TOTAL_ entries",
            infoEmpty: "Showing 0 to 0 of 0 entries",
            infoFiltered: "(filtered from _MAX_ total entries)",
            processing: "Processing...",
            emptyTable: "No item suppliers found"
        }
    });
});
</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\habibcables-ERP\resources\views\item_suppliers\index.blade.php ENDPATH**/ ?>