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

<div class="row g-3 mb-4">
    <div class="col-md-4">
        <div class="card p-3 text-center">
            <div class="fs-4 fw-bold"><?php echo e($stats['en_attente']); ?></div>
            <div class="small text-muted">En attente</div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="card p-3 text-center">
            <div class="fs-4 fw-bold text-primary"><?php echo e($stats['en_cours']); ?></div>
            <div class="small text-muted">En cours</div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="card p-3 text-center">
            <div class="fs-4 fw-bold text-success"><?php echo e($stats['terminees']); ?></div>
            <div class="small text-muted">Terminees</div>
        </div>
    </div>
</div>

<div class="row g-3 mb-4">
    <div class="col-md-3 col-6">
        <a href="<?php echo e(route('partner.requests.create', 'prelevement')); ?>" class="card p-3 text-decoration-none text-dark h-100">
            <div class="fw-bold">Demande de prelevement</div>
            <div class="small text-muted">Planifier une collecte</div>
        </a>
    </div>
    <div class="col-md-3 col-6">
        <a href="<?php echo e(route('partner.requests.create', 'consommable')); ?>" class="card p-3 text-decoration-none text-dark h-100">
            <div class="fw-bold">Demande de consommable</div>
            <div class="small text-muted">Reapprovisionnement</div>
        </a>
    </div>
    <div class="col-md-3 col-6">
        <a href="<?php echo e(route('partner.requests.create', 'reclamation')); ?>" class="card p-3 text-decoration-none text-dark h-100">
            <div class="fw-bold">Reclamation</div>
            <div class="small text-muted">Signaler un probleme</div>
        </a>
    </div>
    <div class="col-md-3 col-6">
        <a href="<?php echo e(route('partner.requests.create', 'resultat')); ?>" class="card p-3 text-decoration-none text-dark h-100">
            <div class="fw-bold">Demande de resultats</div>
            <div class="small text-muted">Suivi patient</div>
        </a>
    </div>
</div>

<div class="card p-3">
    <h5 class="mb-3">Vos dernieres demandes</h5>
    <div class="table-responsive">
        <table class="table table-sm">
            <thead><tr><th>#</th><th>Type</th><th>Statut</th><th>Cree le</th></tr></thead>
            <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $recentRequests; $__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(\App\Models\ServiceRequest::types()[$r->type]); ?></td>
                    <td><span class="badge bg-secondary"><?php echo e(\App\Models\ServiceRequest::statuses()[$r->status]); ?></span></td>
                    <td><?php echo e($r->created_at->format('d/m/Y H:i')); ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="4" class="text-center text-muted">Aucune demande 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/partner/dashboard.blade.php ENDPATH**/ ?>