
<?php $__env->startSection('content'); ?>
    <!-- begin::main content -->
    <main class="main-content">
        <div class="container">
            <!-- begin::page header -->
            <div class="page-header">
                <h3 class="text-capitalize"><?php echo e($pagetitle); ?></h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                            <a href="<?php echo e(asset('dashboard')); ?>"><?php echo e(__('message.dashboard')); ?></a>
                        </li>
                        <li class="breadcrumb-item active" aria-current="page">list</li>
                    </ol>
                </nav>
            </div>
            <!-- end::page header -->
            <?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
            <?php if($errors->any()): ?>
                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php echo e($error); ?>

                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <?php endif; ?>
            <div class="card">
                <div class="card-header">
                    <form method="GET" action="<?php echo e(asset('session')); ?>">
                        <div class="row">
                            <div class="col-md-2">
                                <select class="form-control select2" id="entry" name="entry">
                                    <option value="" disabled selected>25</option>
                                    <option value="50" <?php
                                    if (isset($_GET['entry'])) {
                                        if ($_GET['entry'] == '50') {
                                            echo 'selected';
                                        }
                                    }
                                    ?>>50</option>
                                    <option value="100" <?php
                                    if (isset($_GET['entry'])) {
                                        if ($_GET['entry'] == '100') {
                                            echo 'selected';
                                        }
                                    }
                                    ?>>100</option>
                                    <option value="1000" <?php
                                    if (isset($_GET['entry'])) {
                                        if ($_GET['entry'] == '1000') {
                                            echo 'selected';
                                        }
                                    }
                                    ?>>1000</option>
                                    <option value="5000" <?php
                                    if (isset($_GET['entry'])) {
                                        if ($_GET['entry'] == '5000') {
                                            echo 'selected';
                                        }
                                    }
                                    ?>>5000</option>
                                </select>
                            </div>
                            <div class="col-md-4">
                                <input type="text" id="search" name="search" class="form-control"
                                    value="<?php echo e(Request::has('search') ? Request::get('search') : ''); ?>"
                                    placeholder="Search by Type...">
                            </div>
                            <div class="col-md-6">
                                
                                <button type="submit" class="btn btn-success">
                                    <i class="fa fa-search fa-lg"></i></button>
                                
                                <a href="<?php echo e(asset('session')); ?>" class="btn btn-primary text-white"><i
                                        class="fa fa-recycle fa-lg"></i></a>
                                <?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('add-session')){ ?>
                                
                                <a href="<?php echo e(route('session.add')); ?>" class="btn btn-info text-white"> <i
                                        class="fa fa-plus fa-lg"></i></a>
                                <?php } ?>
                                <?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('delete-session')){ ?>
                                
                                <a data-link="<?php echo e(asset('session/delete-all')); ?>" href="javascript:;"
                                    class="delete-multiple btn btn-danger text-white pull-right">
                                    <i class="fa fa-trash-o fa-lg"></i></a>
                                <?php } ?>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="card-body">
                    <?php if(isset($sessions)): ?>
                        <div class="table-responsive">
                            <table id="students" class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <th>
                                            <input type="checkbox" class="checkAll" id="checkAll">
                                        </th>
                                        <th><?php echo e(__('message.session')); ?></th>
                                        <th> <?php echo e(__('message.defaultsession')); ?></th>
                                        <th><?php echo e(__('message.action')); ?></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php if(!empty($sessions)): ?>
                                        <?php $__currentLoopData = $sessions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $session): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td>
                                                    <input class="multiple_ids" type="checkbox" value="<?php echo e($session->id); ?>"
                                                        name="multiple_ids[]">
                                                </td>
                                                <td>
                                                    <span class="font-size-13"><?php echo e($session->session); ?></span>
                                                </td>
                                                <td>
                                                    <span class="font-size-13"><?php echo e($session->set_default); ?></span>
                                                </td>
                                                <td>
                                                    
                                                    <div class="dropdown">
                                                        <button class="btn btn-sm btn-dark dropdown-toggle" type="button"
                                                            data-toggle="dropdown">
                                                            <?php echo e(__('message.action')); ?>

                                                        </button>
                                                        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                                                            <?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('view-session')){ ?>
                                                            <a class="dropdown-item"
                                                                href="<?php echo e(route('session.show', $session->id)); ?>"><?php echo e(__('message.view')); ?></a>
                                                            <?php } ?>
                                                            <?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('edit-session')){ ?>
                                                            <a class="dropdown-item"
                                                                href="<?php echo e(route('session.edit', $session->id)); ?>"><?php echo e(__('message.edit')); ?></a>
                                                            <?php } ?>
                                                            <?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('delete-session')){ ?>
                                                            <a class="dropdown-item delete-confirm"
                                                                link="<?php echo e(route('session.destroy', $session->id)); ?>"
                                                                href="javascript:;"><?php echo e(__('message.delete')); ?></a>
                                                            <?php } ?>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php else: ?>
                                        <h1>No Record Found!!</h1>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                        
                        <div class="pagination-block">
                            <?php echo e($sessions->appends(request()->query())->links('includes.paginationlinks')); ?>

                            <label>Showing total <?php echo $sessions->total(); ?> results</label>
                        </div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </main>
    <!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
    <script src="<?php echo e(asset('public/admin/vendors/dataTable/jquery.dataTables.min.js')); ?>"></script>
    <script src="<?php echo e(asset('public/admin/vendors/dataTable/dataTables.bootstrap4.min.js')); ?>"></script>
    <script src="<?php echo e(asset('public/admin/vendors/dataTable/dataTables.responsive.min.js')); ?>"></script>
    <script>
        // Get Section
        $("#class").on('change', function() {
            var URL = "<?php echo e(asset('admission/get-section/')); ?>" + "/" + $(this).val();
            $.ajax({
                type: "GET",
                url: URL,
                dataType: "JSON",
                success: function(data) {
                    $("#section").empty();
                    $("#section").select2({
                        data: data
                    });
                    $("#section").val("<?php echo e(Request::get('section')); ?>").trigger('change');
                }
            });
        });
    </script>
    <?php if(!empty(Request::get('type'))): ?>
        <script>
            $("#type").val("<?php echo e(Request::get('type')); ?>").trigger('change');
        </script>
    <?php endif; ?>
    <!-- end::dataTable -->
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\xampp\htdocs\school_saas_erp\resources\views/session/list.blade.php ENDPATH**/ ?>