

<?php $__env->startSection('content'); ?>

<div class="card">
    <div class="card-body">

        <?php if($message = Session::get('success')): ?>
        <div class="alert border-0 bg-light-success alert-dismissible fade show py-2">
            <div class="d-flex align-items-center">
                <div class="fs-3 text-success"><i class="bi bi-check-circle-fill"></i>
                </div>
                <div class="ms-3">
                    <div class="text-success"><?php echo e($message); ?></div>
                </div>
            </div>
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
        <?php endif; ?>

        <?php if($message = Session::get('fail')): ?>
        <div class="alert border-0 bg-light-danger alert-dismissible fade show py-2">
            <div class="d-flex align-items-center">
                <div class="fs-3 text-danger"><i class="bi bi-x-circle-fill"></i>
                </div>
                <div class="ms-3">
                    <div class="text-danger">
                        <?php echo e($message); ?>

                    </div>
                </div>
            </div>
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
        <?php endif; ?>

        <h6 class="mb-0 text-uppercase">View users by <label class="text-danger"> <?php echo e($package); ?> </label> package</h6>
        <hr />

        <div class="table-responsive">
        <!-- data-page-length='20' id="example2" class="table table-striped table-bordered" -->
            <table id="example" class="display" style="width:100%"  >
                <thead class="table-secondary">
                    <tr>
                        <th>Sl No</th>
                        <th>Use Name</th>
                        <th>Client Name</th>
                        <th>Package</th>
                        <th>Area</th>
                        <th>Location</th>
                        <th>From</th>
                        <th>To</th>
                        <th>Expire Within</th>

                    </tr>
                </thead>
                <tbody>
                    <?php

use App\Http\Controllers\GeneralController;
use App\Http\Controllers\MainAcontroller;

 $num = 1; ?>
                    <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $client): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($num); ?></td>

                        <td><?php echo e($client->Name); ?> </td>
                        <td><?php echo e($client->ClientName); ?> - <label class="text-danger"><?php echo e($client->userid); ?></label> </td>
                        <td><?php echo e($package); ?></td>
                        <td><?php echo e($client->Area); ?></td>
                        <td><?php echo e($client->Location); ?></td>
                       
                        <?php if( MainAcontroller::getFromDateForTrial($client->id) != '01-01-1970' ): ?>
                        <td>  <label class="text-success"> <?php echo MainAcontroller::getFromDateForTrial($client->id) ?> </label> </td>
                        <?php else: ?>
                        <td>  <label class="text-danger"> Not Found </label> </td>
                        <?php endif; ?>
                        
                        <?php if( MainAcontroller::getToDateForTrial($client->id) != '01-01-1970' ): ?>
                        <td> <label class="text-info"> <?php echo MainAcontroller::getToDateForTrial($client->id) ?></label> </td>
                        <?php else: ?>
                        <td>  <label class="text-danger"> Not Found </label> </td>
                        <?php endif; ?>
                     
                        <?php if($client->per_to != null || $client->per_to != '' ): ?>
                        <td>
                            <?php if( GeneralController::daysleft($client->per_to) == 'Date is Expired' ): ?>
                            <a>
                                <span class="badge bg-danger"> <?php echo GeneralController::daysleft(MainAcontroller::getToDateForTrial($client->id)) ?> </span>
                            </a>
                            <?php else: ?>
                            <a>
                                <span class="badge bg-success"> <?php echo GeneralController::daysleft(MainAcontroller::getToDateForTrial($client->id)) ?> </span>
                            </a>
                            <?php endif; ?>


                        </td>
                        <?php else: ?>
                        <td> <label class="text-danger">Not Found</label> </td>
                        <?php endif; ?>

                        

                    
                      
                    </tr>
                    <?php $num++; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                </tbody>
            </table>
        </div>
    </div>
</div>

<script>
    $(document).ready(function() {
        $(".clickToView").click(function() {


            $('#modalClientDetails').modal('show');

        });
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('Admin.Layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/digitronicsindia/public_html/aswas/resources/views/Admin/viewusersbypackage.blade.php ENDPATH**/ ?>