<?php $__env->startSection('title', 'Mes demandes'); ?>
<?php $__env->startSection('content'); ?>
<h3 class="mb-4">Mes demandes</h3>

<div class="card p-3">
    <div class="table-responsive">
        <table class="table align-middle">
            <thead>
                <tr>
                    <th>#</th><th>Partenaire</th><th>Type</th><th>Statut</th><th>Urgence</th><th></th>
                </tr>
            </thead>
            <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $requests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $r): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr class="<?php echo e($r->status === 'ecart' ? 'table-danger' : ''); ?>">
                    <td><?php echo e($r->id); ?></td>
                    <td><?php echo e($r->partner->name); ?></td>
                    <td><?php echo e(\App\Models\ServiceRequest::types()[$r->type]); ?></td>
                    <td><span class="badge <?php echo e($r->status === 'ecart' ? 'badge-ecart' : 'bg-secondary'); ?>"><?php echo e(\App\Models\ServiceRequest::statuses()[$r->status]); ?></span></td>
                    <td><?php echo e($r->urgency === 'urgent' ? '🔴' : '-'); ?></td>
                    <td><a href="<?php echo e(route('courier.requests.show', $r)); ?>" class="btn btn-sm btn-outline-primary">Ouvrir</a></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="6" class="text-center text-muted">Aucune demande.</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
    <?php echo e($requests->links()); ?>

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

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/smartch/capara/resources/views/courier/requests/index.blade.php ENDPATH**/ ?>