

<?php $__env->startSection('content'); ?>

<div class="container-xxl flex-grow-1 container-p-y">
   <div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <h4 class="header-title mt-0 mb-1">Cek Produk Bangjeff</h4>
                <div id="loadingSpinnerBangjeff" class="text-center">
                    <div class="spinner-border text-primary" role="status">
                        <span class="visually-hidden">Loading...</span>
                    </div>
                </div>
                <div class="table-responsive d-none" id="bangjeffTableContainer">
                    <?php if(isset($error)): ?>
                        <p><?php echo e($error); ?></p>
                    <?php elseif(count($products['data']) > 0): ?>
                    <table class="table table-dark table-bordered table-striped m-0">
                        <thead>
                            <tr>
                                <th>Code</th>
                                <th>Name</th>
                                <th>Active</th>
                                <th>Inputs</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $products['data']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($product['code']); ?></td>
                                <td><?php echo e($product['name']); ?></td>
                                <td><?php echo e($product['isActive'] ? 'Yes' : 'No'); ?></td>
                                <td>
                                    <?php $__currentLoopData = $product['inputs']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $input): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php echo e($input['name']); ?> (<?php echo e($input['type']); ?>) <br>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                    <?php else: ?>
                    <p>No products available.</p>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</div>

</div>
<script>
$(document).ready(function() {
    // Simulate a delay for demonstration purposes
    setTimeout(function() {
        $('#loadingSpinnerBangjeff').addClass('d-none');
        $('#bangjeffTableContainer').removeClass('d-none');
    }, 500); // Adjust the delay as needed
});
</script>

<script type="text/javascript">
    $(document).ready(function(){
        $('.table').DataTable();
    });
   
</script>


<?php $__env->stopSection(); ?>

<?php echo $__env->make('main-admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u870822285/domains/tokovouchergame.com/public_html/project/resources/views/components/admin/bangjeff/products.blade.php ENDPATH**/ ?>