
<?php $__env->startSection('title', 'OMS Clients'); ?>
<?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 Clients</h4>
        <a href="<?php echo e(route('oms_clients.create')); ?>" class="btn btn-primary btn-sm">Add New Client</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="">
                        <tr>
                            <th>তারিখ</th>
                            <th>ভোক্তার তথ্য</th>
                            <th>NID</th>
                            <th>ডিলার তথ্য</th>
                            <th>পণ্য</th>
                            <th class="text-end">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $clients; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $client): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td><?php echo e(\Carbon\Carbon::parse($client->date)->format('d-m-Y')); ?></td>
                            <td>
                                <strong><?php echo e($client->client_name); ?></strong><br>
                                <small >পিতা/স্বামী: <?php echo e($client->guardian_name); ?></small><br>
                                <small >ঠিকানা: <?php echo e($client->address ?? 'N/A'); ?></small>
                            </td>
                            <td>
                                <span>NID: <?php echo e($client->nid_number); ?></span><br>
                                <small class="text-muted">Mob: <?php echo e($client->mobile_number ?? 'N/A'); ?></small>
                            </td>
                            <td>
                                <strong><?php echo e($client->dealer->dealer_name ?? 'N/A'); ?></strong><br>
                                <small >বিক্রয় কেন্দ্র: <?php echo e($client->sale_point); ?> (W-<?php echo e($client->word_no); ?>)</small>
                            </td>
                            <td><span class="badge bg-info text-dark"><?php echo e($client->product_name ?? 'N/A'); ?></span></td>
                            <td class="text-end">
                                <a href="<?php echo e(route('oms_clients.print', $client->id)); ?>" target="_blank" class="btn btn-sm btn-dark">Print QR</a>
                                <a href="<?php echo e(route('oms_clients.edit', $client->id)); ?>" class="btn btn-sm btn-warning text-white">Edit</a>
                                <form action="<?php echo e(route('oms_clients.destroy', $client->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="6" class="text-center text-muted py-4">No clients 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_clients\index.blade.php ENDPATH**/ ?>