IMMREX7

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

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

                <div class="row clearfix">
                    <div class="col-sm-2">
                    </div>
                    <div class="col-sm-2 form-control-label">
                        <label for="classname">Financial Year</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                           <?php echo Form::select('idFinancialYear',fys(),null,['class' => 'form-control show-tick ms']); ?>

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

                    </div>
                </div>
                <?php echo Form::close(); ?> 
                <br>
                <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                    <thead>
                        <tr>
                            <th>S.NO.</th>
                            <th>Name</th>
                            <th>EC No.</th>
                            <th>Form Date</th>
                            <th>To Date</th>
                            <th>Reason</th>
                            <th>Status</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 1; ?>
                        <?php $__currentLoopData = $leaves; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($i); ?></td>
                            <td><?php echo e($var->name); ?></td>
                            <td><?php echo e($var->ecNo); ?></td>
                            <td><?php echo e($var->fromDate); ?></td>
                            <td><?php echo e($var->toDate); ?></td>
                            <td><?php echo e($var->remarks); ?></td>
                            <td><?php echo e($var->status); ?></td>
                            <td>
                                <button class="btn btn-raised btn-info waves-effect btn-round js-sweetalertsendsms" data-id="<?php echo e($var->idHosteliteLeave); ?>" data-type="confirm">Send Sms</button>
                                <button class="btn btn-raised btn-danger waves-effect btn-round js-sweetalert" data-phone="<?php echo e($var->father_mobile); ?>" data-type="confirm">Call</button>
                            </td>
                        </tr>
                        <?php $i++; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?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 phone = $(this).data('phone');
    swal({
        title: "Phone No:",
        text: phone,
    });
});
$(document).on('click', '.js-sweetalertsendsms', 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: "Send SMS!",
            type: "input",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "Yes, Send!",
            animation: "slide-from-top",
	    inputPlaceholder: "Enter Message here",
            closeOnConfirm: false
        },
        function(inputValue) {
			//added for prompt remarks input
			if (inputValue === false) return false;
			if (inputValue === "") {
				swal.showInputError("Please Add Your Message Here!"); return false
			}else{
			//end
			//console.log('here');
				$.ajax({
					type: "GET",
					url: "<?php echo e(url('/school/hostel-leaves/')); ?>" + "/" +id+"/sendsms",
					 data: {id:id,remarks:inputValue}
				})
				.done(function(data) {
					swal({
						title: "Sent", 
						text: "SMS has been sent 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