IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/0d956ad6296e0f37af9cb662d47d73a3b55aeff0.php

<?php $__env->startSection('content'); ?>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>Member List</strong></h2>
            </div>
            <div class="body">
               <?php echo Form::open(['method' => 'GET',  'action' => ['School\Library\MemberController@index'],'class' => 'form-horizontal']); ?>

                <div class="row clearfix">
                    <div class="col-sm-2 form-control-label required">
                        <label for="classname">Member Type</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                             <?php echo Form::select('type',['student'=>'Student','employee'=>'Staff'],null,['class' => 'form-control show-tick ms','required'=>'required']); ?>

                        </div>
                    </div>
                    <div class="col-sm-2">
                        <?php echo Form::submit('SHOW',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>

                        <?php echo Form::close(); ?>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php if(isset($type) && $type == 'student'): ?>
<?php if(count($members)>0): ?>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="body table-responsive">
                <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                    <thead>
                        <tr>
                            <th>Ec.No.</th>
                            <th>Name</th>
                            <th>Father</th>
                            <th>Mobile</th>
                            <th>DOB</th>
                            <th>Class</th>
                            <th>Section</th>
                            <th>Ban Member</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $members; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($var->ecNo); ?></td>
                            <td><?php echo e($var->firstName); ?> <?php echo e($var->middleName); ?> <?php echo e($var->lastName); ?></td>
                            <td><?php echo e($var->father_fname); ?> <?php echo e($var->father_lname); ?></td>
                            <td><?php echo e($var->father_mobile); ?></td>
                            <td><?php echo e($var->studentDob); ?></td>
                            <td><?php echo e($var->className); ?></td>
                            <td><?php echo e($var->sectionName); ?></td>
                            <td>
                                 <button class="btn btn-raised btn-danger waves-effect btn-round js-sweetalert" data-type="student" data-id="<?php echo e($var->idStudent); ?>" data-type="confirm">BAN</button>
                                <!--<a href="<?php echo e(url('school/members/student/'.$var->idStudent.'/ban')); ?>" class="btn btn-sm btn-danger">BAN</a>-->
                            </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php endif; ?>
<?php endif; ?>

<?php if(isset($type) && $type == 'employee'): ?>
<?php if(count($members)>0): ?>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="body table-responsive">
                <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                    <thead>
                        <tr>
                            <th>Ec.No.</th>
                            <th>Name</th>
                            <th>Mobile</th>
                            <th>Department</th>
                            <th>Designation</th>
                            <th>Ban Member</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $members; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($var->enrollmentNo); ?></td>
                            <td><?php echo e($var->firstName); ?> <?php echo e($var->middleName); ?> <?php echo e($var->lastName); ?></td>
                            <td><?php echo e($var->mobile); ?></td>
                            <td><?php echo e($var->departmentName); ?></td>
                            <td><?php echo e($var->designationName); ?></td>
                            <td>
                                <button class="btn btn-raised btn-danger waves-effect btn-round js-sweetalert" data-type="employee" data-id="<?php echo e($var->idEmployee); ?>" data-type="confirm">BAN</button>
                                <!--<a href="<?php echo e(url('school/members/employee/'.$var->idEmployee.'/ban')); ?>" class="btn btn-sm btn-danger">BAN</a>-->
                            </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php endif; ?>
<?php endif; ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(document).on('click', '.js-sweetalert', function (e) {
    $.ajaxSetup({
        headers: {
          'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });
    e.preventDefault();
    var id = $(this).data('id');
    var type = $(this).data('type');
    var remarks = '';
    swal({
            title: "Are you sure?",
            text: "Add Remarks!",
            type: "input",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "Yes, Ban it!",
            animation: "slide-from-top",
	    inputPlaceholder: "Enter Remarks here",
            closeOnConfirm: false
        },
        function(inputValue) {
			//added for prompt remarks input
			if (inputValue === false) return false;
			if (inputValue === "") {
				swal.showInputError("Please Add Your Remarks Here!"); return false
			}else{
			//end
			//console.log('here');
				$.ajax({
					type: "GET",
					url: "<?php echo e(url('/school/members/')); ?>" +"/"+type+ "/" +id+"/ban",
					 data: {id:id,type:type,remarks:inputValue}
				})
				.done(function(data) {
					swal({
						title: "Banned", 
						text: "Member has been banned successfully", 
						type: "success"
					},function() {
						location.reload();
					});
				})
				.error(function(data) {
				  swal("Oops", "We couldn't connect to the server!", "error");
				});
				return false;
			}
    });
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

Copyright © 2021 - 2025 IMMREX7