<?php $__env->startSection('content'); ?>
<div id="vue-admin-user">
<div class="main-panel">
    <div class="content">
            <div class="panel-header">
                <div class="page-inner py-5 text-white"  style="background:#313232">
                    <div class="d-flex align-items-left align-items-md-center flex-column flex-md-row">
                        <div><div class="page-header">
                            <h4 class="page-title text-white">Dashboard</h4>
                            <ul class="breadcrumbs">
                                    <li class="nav-home">
                                        <a class="text-white" href="#">
                                            <i class="flaticon-home"></i>
                                        </a>
                                    </li>
                                </ul>
                        </div>
                        </div>
                        
                    </div>
                </div>
            <div class="page-category">
                <div class="page-inner mt--5">
                <div class="row mt--2">
				<div class="col-md-4">
					<div class="card full-height">
						<div class="card-body">
							<div class="card-title">Account Statistics</div>
							<div class="card-category">Account Current Status</div>
							<div class="d-flex flex-wrap justify-content-around pb-2 pt-4">
								<ol>
									<li>Groups: <strong><?php echo e(count($groups)); ?></strong></li>
									<li>Contacts: <strong><?php echo e(count($contacts)); ?></strong></li>
									</ol>
							</div>
						</div>
					</div>
				</div>
				
			 
				<div class="col-md-4">
					<div class="card">
						<div class="card-header">
							<div class="card-head-row">
								<div class="card-title">Recent Sent Bundles</div>
							</div>
						</div>
						<div class="card-body">
						<table class="table table-hover">
							<thead>
								<tr>
								<th>Date</th>
								<th>Data Credited</th>
								</tr>
							</thead>
							<tbody>
							   <?php $__currentLoopData = $expenditure_recent; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $recent): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<tr>
									<td><?php echo e($recent->date_time); ?> </td>
									<td><b><?php echo e(substr($recent->sms, 32, 6)); ?></b> </td>
								</tr>
							   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
								
															
							</tbody>
							</table>
						</div>
					</div>
				</div>

				<div class="col-md-4">
					<div class="card">
						<div class="card-header">
							<div class="card-head-row">
								<div class="card-title">Recent Account Topups</div>
							</div>
						</div>
						<div class="card-body">
						<table class="table table-hover">
							<thead>
								<tr>
									<th>Date</th>
									<th>Amount</th>
								</tr>
							</thead>
							<tbody>
							<?php $__currentLoopData = $topups_recent; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $topup): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<tr>
									<td><?php echo e($topup->topup_time); ?> </td>
									<td>Ksh.<b><?php echo e($topup->credit_amount); ?></b> </td>
								</tr>
							   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
							</tbody>
							</table>
						</div>
					</div>
				</div>
				


				<div class="row mt--2">
                            <div class="col-md-12">
                                <div class="card full-height">
                                    <div class="card-body">
                                        <div class="card-body">Bundles statistics
                                      <?php echo $__env->make('warrantviews.partials.filter-warrantysummary', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

                                            <div class="text-right mb-3 border-bottom pb-1">
                                                <div class="card-title pull-left"></div>

                                                <a class="btn btn-success btn-border btn-round btn-sm" data-toggle="collapse" data-target="#filter-sentsms">
                                                    <i class="fas fa-filter"></i> Filter
                                                </a>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-12">
                                                <div class="card-category">Total  Bundles Sent</div>
                               
                                            </div>
                                            <div class="col-md-12">
                                                <div class="card-category"></div>

                                            
                                                <div class="row py-6">
                                                    <div class="col-md-4 d-flex flex-column justify-content-around">
                                                        <div>
                                                     
                                                            <h6 class="fw-bold">Total Bundles in MBs. <?php echo e($bundlesinMBs); ?></h6>
                                                     
                                                            <h6 class="fw-bold">Total Bundles in GBs. <?php echo e($bundlesinGBs); ?></h6>
                                             
                                                            <h6 class="fw-bold"> Total Bundles. <?php echo e($bundlescountall); ?></h6>
														
                                                        </div>
                                                    </div>
                                                    <div class="col-md-8">
                                                        <div style="width:100%;">

                                                            <div id="chart">
                                                            <?php echo $chart1->container(); ?>

                                                            </div>
                                              
                                                        </div>
                                                    </div>


													











													
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>	
                        </div>


						<div class="col-md-12">
    <div class="col-md-8 col-md-offset-2">
    	<div class="col-xl-6">
    		<div class="card">
    			<div class="card-body">
    			
    			</div>
    		</div>
    	</div>
    </div>	
</div>


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




	
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

<script type="text/javascript">

  var visitor = <?php echo $visitor; ?>;

  console.log(visitor);

  google.charts.load('current', {'packages':['corechart']});

  google.charts.setOnLoadCallback(drawChart);

  function drawChart() {

	var data = google.visualization.arrayToDataTable(visitor);

	var options = {

	  title: 'Data Bundles Topup',

	  curveType: 'function',

	  legend: { position: 'bottom' }

	};

	var chart = new google.visualization.LineChart(document.getElementById('linechart'));

	chart.draw(data, options);

  }

</script>
<?php echo $__env->make('bundleviews.layouts.user', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\xamp99\htdocs\Accounts\resources\views/bundleviews/user-dashboard.blade.php ENDPATH**/ ?>