IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<!--<div class="card">-->
<div class="body">
<button class="btn btn-raised btn-warning btn-round waves-effect" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">Advance Search</button>
<div class="collapse" id="collapseExample">
<div class="well">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Advance Search</strong></h2>
</div>
<div class="body">
<?php echo Form::open(['method' => 'GET', 'action' => ['School\VirtualViewController@index'], 'class' => 'form-horizontal']); ?>
<div class="row clearfix">
<div class="col-sm-4">
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname">Class</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<div style="border:1px solid #ccc; width:250px; height: 150px; overflow-y: scroll;">
<?php $__currentLoopData = $classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="checkbox-inline" style="padding-left:10px;padding-top:5px;">
<input type="checkbox" name="classes[]" value="<?php echo e($key); ?>" class="class_ids">
<label><?php echo e($value); ?></label>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname">From Date</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<?php echo Form::text('fromDate',null,['class' => 'form-control datepicker']); ?>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname">Section</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<div id="idSection" style="border:1px solid #ccc; width:250px; height: 150px; overflow-y: scroll;">
</div>
<!--<select name='idSection' id="idSection" class="form-control show-tick ms"></select>-->
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname">To Date</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<?php echo Form::text('toDate',null,['class' => 'form-control datepicker']); ?>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
</div>
</div>
<div class="row clearfix">
<div class="col-sm-8 offset-sm-2">
<?php echo Form::submit('Search',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--</div>-->
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>View Confirmation</strong></h2>
<a href="/school/virtual-view/create" class="btn btn-raised btn-primary btn-round waves-effect" style="float: right;">Download Photos</a>
</div>
<div class="body table-responsive">
<?php if(\Session::has('error')): ?>
<div class="alert alert-danger">
<ul>
<li><?php echo \Session::get('error'); ?></li>
</ul>
</div>
<?php endif; ?>
<table class="table table-bordered table-striped table-hover dataTable" id="tableexp">
<thead>
<tr>
<th>S No.</th>
<th>Photo</th>
<th>Ec No</th>
<th>Name</th>
<th>Father Name</th>
<th>Grade</th>
<th>DIV</th>
<th>DOB</th>
<th>Contact</th>
<th>Contact 2</th>
<th>Full Address</th>
<th>Verified (Parents)</th>
<th>Date</th>
<th>Verified (Teacher)</th>
<th>Date</th>
<th>Action</th>
<th>File</th>
</tr>
</thead>
<tbody>
<?php $k =0;?>
<?php $__currentLoopData = $virtualCard; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $detail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php $k++;?>
<tr id="#row<?php echo e($k); ?>">
<td><?php echo e($k); ?></td>
<?php
$student = \App\AdmEntry::select('ecNo')->where('idStudent', '=', $detail->idStudent)->first();
?>
<td><?php echo e($detail->photo); ?></td>
<td><?php if($student != null): ?> <?php echo e($student->ecNo); ?> <?php endif; ?></td>
<td><?php echo e($detail->studentName); ?></td>
<td><?php echo e($detail->parentName); ?></td>
<td><?php echo e($detail->className); ?></td>
<td><?php echo e($detail->sectionName); ?></td>
<td><?php if(isset($detail->student_dob)): ?>
<?php
$dob = "";
try{
$dob = Carbon\Carbon::parse($detail->student_dob)->format('d-m-Y');
}catch(\Exception $e){}
?>
<?php echo e($dob); ?>
<?php endif; ?></td>
<td><?php echo e($detail->contactNo); ?></td>
<td><?php echo e($detail->contact_alternative); ?></td>
<td><?php echo e($detail->address); ?></td>
<?php if($detail->isVerified == 'Y'): ?>
<td>YES</td>
<?php else: ?>
<td>No</td>
<?php endif; ?>
<?php if(isset($detail->parentDate)): ?>
<td><?php echo e(Carbon\Carbon::parse($detail->parentDate)->format('d-m-Y')); ?></td>
<?php else: ?>
<td></td>
<?php endif; ?>
<?php if($detail->isChecked == 'Y'): ?>
<?php $employeename = '';
if($detail->firstName != null)
$employeename = $employeename.trim($detail->firstName).' ';
if($detail->middleName != null)
$employeename = $employeename.trim($detail->middleName).' ';
if($detail->lastName != null)
$employeename = $employeename.trim($detail->lastName).' ';
?>
<td>YES | <?php echo e($employeename); ?></td>
<?php else: ?>
<td>No</td>
<?php endif; ?>
<?php if(isset($detail->verificationDate)): ?>
<td><?php echo e(Carbon\Carbon::parse($detail->verificationDate)->format('d-m-Y')); ?></td>
<?php else: ?>
<td></td>
<?php endif; ?>
<td>
<a href="<?php echo e(url('/school/virtual-view').'/'.$detail->id.'/edit'); ?>" class="btn btn-sm btn-warning waves-effect waves-float waves-red" target="_blank"><i class="zmdi zmdi-edit"></i></a>
<a href="#" class="btn btn-sm btn-danger waves-effect waves-float waves-red js-sweetalert" data-id="<?php echo e($detail->id); ?>" data-type="confirm"><i class="zmdi zmdi-delete"></i></a></td>
<td><?php echo e($student->ecNo); ?>-<?php echo e($detail->photo); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
var table ;
$(document).on('click', '.class_ids', function(){
//var checkAll = this.checked;
var classIds = [];
$("input:checkbox[name='classes[]']:checked").each(function () {
classIds.push($(this).val());
});
if (classIds.length > 0) {
$.ajax({
url: "<?php echo e(url('/school/schclass')); ?>"+'/' +classIds + "/sections",
type: "GET",
dataType: "json",
success:function(data) {
$('#idSection').empty();
$('#idSection').append('<div class="checkbox-inline" style="padding-left:10px;padding-top:5px;"><input type="checkbox" class="select-all" id="selectall"><label><strong>Select All</label></strong></div>');
$.each(data, function(key, value) {
$('#idSection').append('<div class="checkbox-inline" style="padding-left:10px;"><input type="checkbox" name="sections[]" value="'+key+'" class="sectionclass"><label>'+value+'</label></div>');
});
}
});
}
});
$(function () {
table = $('#tableexp').DataTable({
dom: 'Bfrtip',
scrollY: "500px",
scrollX: true,
scrollCollapse: true,
fixedColumns: {
left: 1
},
columnDefs : [
//hide the second & fourth column
{ 'visible': false, 'targets': [7,9,10,16] }
],
drawCallback: function( settings ) {
var api = this.api();
var myData = api.rows( {page:'current'} ).data();
console.log(myData);
for (var i = 0; i < myData.length; i++) {
var input = myData[i][1];
if(!input.includes("img")){
myData[i][1] = '<img src="https://online-login.online/storage/schools/'+<?php echo Auth::guard('school')->user()->idSchool; ?>+'/students/'+ input+'" height="60"/>';
$('#tableexp').DataTable().row(myData[i][0] - 1).data( myData[i] ).draw();
}
}
},
buttons: [
{ extend: 'csv', footer: true, text: 'Export to Excel',title:'Card View Report',
exportOptions: {
columns: [2,3,4,5,6,7,8,9,10,11,16],
format: {
body: function (data, row, column, node ) {
if(column === 2 )
return "\0" + data ;
else if( column === 5 )
return data.replace( '<br>', '\r\n');
else return data;
}
}
}}
]
});
});
$(document).on('click', '.select-all', function(){
var checkAll = this.checked;
if(checkAll === true){
$('.sectionclass').each(function () {
this.checked = checkAll;
});
}else{
$('.sectionclass').each(function () {
this.checked = checkAll;
});
}
});
$(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 deleteRow = $(this);
swal({
title: "Are you sure?",
text: "Are You sure you want to delete this virtual card !",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: true
},
function() {
// console.log('here');
$.ajax({
type: "DELETE",
url: "<?php echo e(url('/school/virtual-view/')); ?>" +"/"+id,
data: {id:id}
})
.done(function(data) {
swal({
title: "Deleted",
text: "Virtual card has been successfully deleted",
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 -