 
<?php $__env->startSection('title', 'OMS Dealers'); ?>
<?php $__env->startSection('page_content'); ?>
<div class="container-fluid py-4">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <h4>OMS Dealers</h4>
        <a href="<?php echo e(route('oms_dealers.create')); ?>" class="btn btn-primary btn-sm">Add New Dealer</a>
    </div>

    <?php if(session('success')): ?>
        <div class="alert alert-success alert-dismissible fade show" role="alert">
            <?php echo e(session('success')); ?>

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

    <div class="card shadow-sm">
        <div class="card-body p-0">
            <div class="table-responsive">
                <table class="table table-hover table-striped mb-0 align-middle">
                    <thead class="table-light">
                        <tr>
                            <th>নংঃ</th>
                            <th>ছবি</th>
                            <th>বিক্রয় কেন্দ্র</th>
                            <th>ডিলারের নাম</th>
                            <th>মোবাইল</th>
                            <th>প্রতিষ্ঠান</th>
                            <th class="text-end">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $dealers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dealer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td><?php echo e($loop->iteration); ?></td>
                            <td>
                                <?php if($dealer->image): ?>
                                    <img src="<?php echo e(asset('uploads/dealer_image/'.$dealer->image)); ?>" alt="img" class="rounded" style="width: 40px; height: 40px; object-fit: cover;">
                                <?php else: ?>
                                    <span class="badge bg-secondary">No Image</span>
                                <?php endif; ?>
                            </td>
                            <td><?php echo e($dealer->sale_point); ?></td>
                            <td><?php echo e($dealer->dealer_name); ?><br><small class="text-dark">ওয়ার্ড নং: <?php echo e($dealer->word_number); ?></small></td>
                            <td><?php echo e($dealer->mobile_number); ?></td>
                            <td><?php echo e($dealer->institute_name); ?></td>
                            <td class="text-end">
                                <a href="<?php echo e(route('oms_dealers.print', $dealer->id)); ?>" target="_blank" class="btn btn-sm btn-info text-white">Print QR</a>
                                <a href="<?php echo e(route('oms_dealers.edit', $dealer->id)); ?>" class="btn btn-sm btn-warning text-white">Edit</a>
                                <form action="<?php echo e(route('oms_dealers.destroy', $dealer->id)); ?>" method="POST" class="d-inline" onsubmit="return confirm('Are you sure?');">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="btn btn-sm btn-danger">Delete</button>
                                </form>
                            </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="7" class="text-center text-muted py-4">No dealers found.</td>
                        </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('dashboard', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\User\Herd\dcfood_management\resources\views\pages\oms_dealers\index.blade.php ENDPATH**/ ?>