<?php $__env->startSection('title', 'Tableau de bord coursier'); ?>
<?php $__env->startSection('content'); ?>
<h3 class="mb-4">Bonjour, <?php echo e(auth()->user()->name); ?></h3>

<div class="row g-3 mb-4">
    <div class="col-md-6">
        <div class="card p-3 text-center">
            <div class="fs-4 fw-bold"><?php echo e($stats['a_traiter']); ?></div>
            <div class="small text-muted">A traiter</div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="card p-3 text-center">
            <div class="fs-4 fw-bold text-success"><?php echo e($stats['collectees_aujourdhui']); ?></div>
            <div class="small text-muted">Collectees aujourd'hui</div>
        </div>
    </div>
</div>

<div class="card p-3">
    <h5 class="mb-3">Votre tournee du jour</h5>
    <div class="table-responsive">
        <table class="table align-middle">
            <thead><tr><th>#</th><th>Partenaire</th><th>Type</th><th>Urgence</th><th></th></tr></thead>
            <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $todayRequests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $r): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td><?php echo e($r->id); ?></td>
                    <td><?php echo e($r->partner->name); ?><br><span class="small text-muted"><?php echo e($r->partner->address); ?></span></td>
                    <td><?php echo e(\App\Models\ServiceRequest::types()[$r->type]); ?></td>
                    <td><?php echo e($r->urgency === 'urgent' ? '🔴 Urgent' : 'Normal'); ?></td>
                    <td><a href="<?php echo e(route('courier.requests.show', $r)); ?>" class="btn btn-sm btn-primary">Traiter</a></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="5" class="text-center text-muted">Aucune demande assignee pour le moment.</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</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/dashboard.blade.php ENDPATH**/ ?>