<?php $__env->startSection('content'); ?>
<div class="container">
    <h2>Admin Dashboard</h2>
</div>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('content'); ?>
<div class="container">
    <h2>Dealer Dashboard</h2>

    <div class="row mb-4">
        <div class="col">Allocated: <strong><?php echo e($totalAllocated); ?></strong></div>
        <div class="col">Activated: <strong><?php echo e($activated); ?></strong></div>
        <div class="col">Pending: <strong><?php echo e($pending); ?></strong></div>
    </div>

    <h4>City-wise Activations</h4>
    <canvas id="cityChart"></canvas>
</div>

<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
new Chart(document.getElementById('cityChart'), {
    type: 'bar',
    data: {
        labels: <?php echo json_encode($cityWise->pluck('city'), 15, 512) ?>,
        datasets: [{
            label: 'Activations',
            data: <?php echo json_encode($cityWise->pluck('total'), 15, 512) ?>
        }]
    }
});
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/soumadeep/Desktop/imei-saas/resources/views/dashboard/dealer.blade.php ENDPATH**/ ?>