IMMREX7
<?php $__env->startSection('content'); ?>
<!-- Advance Search start-->
<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' => 'POST', 'action' => ['School\StudentReportController@studentList'], 'class' => 'form-horizontal','id'=>'stdreport']); ?>-->
<div class="row clearfix">
<div class="col-sm-6">
<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">Session</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<?php echo Form::select('idFinancialYear', fys(), null, ['class' => 'form-control show-tick ms', 'id' => 'idFinancialYear']); ?>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname">Status</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<?php echo Form::select('isActive', ['Y' => 'Active', 'N' => 'Deactive'], null, ['class' => 'form-control show-tick ms', 'id' => 'isActive']); ?>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<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">Gender</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<?php echo Form::select('gender', ['' => 'Select', 'Male' => 'Male', 'Female' => 'Female'], null, ['class' => 'form-control show-tick ms', 'id' => 'gender']); ?>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname">Student Type</label>
</div>
<div class="col-sm-7">
<div class="form-group">
<?php echo Form::select('studentType', $categories, null, ['class' => 'form-control show-tick ms', 'id' => 'studentType']); ?>
</div>
</div>
</div>
</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', 'id' => 'filter']); ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--</div>-->
</div>
</div>
<!-- Advance Search End -->
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>List Of Students</strong></h2>
<a href="/school/studentlist?showall=true" style="float: right;" class="btn btn-raised btn-primary btn-round waves-effect">Show All Records</a>
</div>
<div class="body table-responsive">
<table class="table table-bordered table-striped table-hover dataTable" id='tableexp'>
<thead>
<tr>
<th>EC No.</th>
<th>Date</th>
<th>Name</th>
<th>Father Name</th>
<th>Admission No</th>
<th>Emergency Contact</th>
<th>Father Mobile</th>
<th>Mother Mobile</th>
<th>App Status</th>
<th>DOB</th>
<th>Gender</th>
<th>Class</th>
<th>Section</th>
<th>Student Status</th>
<th>Action</th>
<th>Place of Birth</th>
<th>Aadhaar No.</th>
<th>Religion</th>
<th>Student Category</th>
<!--<th>Student UID</th>-->
<th>Mother Tounge</th>
<!-- <th>Gr No.</th>
<th>Saral No.</th>-->
<th>Blood Group</th>
<th>Residential Address</th>
<th>City</th>
<th>Pincode</th>
<th>Landmark</th>
<th>State</th>
<th>Telephone</th>
<!-- <th>Last School Attended</th>
<th>Board</th>
<th>Percentage</th>
<th>Last School Address</th>
<th>Last School city</th>
<th>Last School Postal/zipcoode</th>
<th>Last School State</th>
<th>Last School Phone</th>
<th>Reason For Change</th> -->
<th>Contact Person</th>
<!--<th>Contact Person Address</th>-->
<th>Contact Person Relation</th>
<th>Contact Person Mobile</th>
<!--<th>Father Date Of Birth</th>-->
<th>Father Qualification</th>
<th>Father Occupation</th>
<th>Father Designation</th>
<!-- <th>Father Company</th>
<th>Father Work Location</th>
<th>Father Pan No.</th>
<th>Father Telephone</th>-->
<!--<th>Father Aadhar No</th>-->
<!--<th>Father Email</th>-->
<th>Mother Name</th>
<!--<th>Mother Date Of Birth</th>-->
<th>Mother Qualification</th>
<th>Mother Occupation</th>
<th>Mother Designation</th>
<!-- <th>Mother Company</th>
<th>Mother Work Location</th>
<th>Mother Pan No.</th>
<th>Mother Telephone</th>-->
<!--<th>Mother Aadhar No</th>-->
<!--<th>Mother Email</th>-->
<!-- <th>Food Facility Required?</th>
<th>Transport Facility Required?</th>
<th>Learning Disability?</th>-->
</tr>
</thead>
<?php if(isset($_GET['showall'])): ?>
<tbody id="studentTableBody">
<tr id="loader"><td colspan="37"><img src="<?php echo e(asset("dist/images/loading_light_green.gif")); ?>" height="50" style="margin-top:5px;"></td></tr>
</tbody>
<?php endif; ?>
<tfoot>
<tr>
<th>EC No.</th>
<th>Date</th>
<th>Name</th>
<th>Father Name</th>
<th>Admission No</th>
<th>Emergency Contact</th>
<th>Father Mobile</th>
<th>Mother Mobile</th>
<th>App Status</th>
<th>DOB</th>
<th>Gender</th>
<th>Class</th>
<th>Section</th>
<th>Student Status</th>
<th>Action</th>
<th>Place of Birth</th>
<th>Aadhaar No.</th>
<th>Religion</th>
<th>Student Category</th>
<!--<th>Student UID</th>-->
<th>Mother Tounge</th>
<!-- <th>Gr No.</th>
<th>Saral No.</th>-->
<th>Blood Group</th>
<th>Residential Address</th>
<th>City</th>
<th>Pincode</th>
<th>Landmark</th>
<th>State</th>
<th>Telephone</th>
<!-- <th>Last School Attended</th>
<th>Board</th>
<th>Percentage</th>
<th>Last School Address</th>
<th>Last School city</th>
<th>Last School Postal/zipcoode</th>
<th>Last School State</th>
<th>Last School Phone</th>
<th>Reason For Change</th> -->
<th>Contact Person</th>
<!--<th>Contact Person Address</th>-->
<th>Contact Person Relation</th>
<th>Contact Person Mobile</th>
<!--<th>Father Date Of Birth</th>-->
<th>Father Qualification</th>
<th>Father Occupation</th>
<th>Father Designation</th>
<!-- <th>Father Company</th>
<th>Father Work Location</th>
<th>Father Pan No.</th>
<th>Father Telephone</th>-->
<!--<th>Father Aadhar No</th>-->
<!--<th>Father Email</th>-->
<th>Mother Name</th>
<!--<th>Mother Date Of Birth</th>-->
<th>Mother Qualification</th>
<th>Mother Occupation</th>
<th>Mother Designation</th>
<!-- <th>Mother Company</th>
<th>Mother Work Location</th>
<th>Mother Pan No.</th>
<th>Mother Telephone</th>-->
<!--<th>Mother Aadhar No</th>-->
<!--<th>Mother Email</th>-->
<!-- <th>Food Facility Required?</th>
<th>Transport Facility Required?</th>
<th>Learning Disability?</th>-->
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(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>');
});
}
});
}
});
$(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');
swal({
title: "Are you sure?",
text: "Are You sure you want to delete this Student!",
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/admentries/')); ?>" +"/"+id,
data: {id:id}
})
.done(function(data) {
swal({
title: "Deleted",
text: "Student has been successfully deleted",
type: "success"
},function() {
location.reload();
});
})
.error(function(data) {
swal("Oops", "We couldn't connect to the server!", "error");
});
return false;
});
});
$(document).on('click', '.js-reset', function (e) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
e.preventDefault();
var id = $(this).data('id');
swal({
title: "Are you sure?",
text: "Are You sure you want to reset login credentials for this Student!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes",
closeOnConfirm: true
},
function() {
var url = "<?php echo e(url('/school/reset/password')); ?>"+'/'+id;
window.open( url,'_blank');
});
});
$(document).ready(function () {
<?php if(isset($_GET['showall'])): ?>
if ( $.fn.DataTable.isDataTable( '#tableexp' ) ) {
$('#tableexp').DataTable().destroy();
}
let lastStudentId = null;
let isLoading = false;
let hasMoreData = true;
let current = 0;
const studentTableBody = $('#studentTableBody');
$('#filter').click(function(){
var gender = $('#gender').val();
var isActive = $('#isActive').val();
var studentType = $('#studentType').val();
var idFinancialYear = $("#idFinancialYear").val();
var classes = [];
$("input:checkbox[name='classes[]']:checked").each(function () {
classes.push($(this).val());
});
console.log(classes);
var sections = [];
$("input:checkbox[name='sections[]']:checked").each(function () {
sections.push($(this).val());
});
if(gender != '' || isActive != '' || idFinancialYear != '' || studentType != '' || classes !='' || sections != '')
{
$('#tableexp').DataTable().destroy();
fill_datatable(classes ,sections,studentType,gender ,isActive ,idFinancialYear);
}
else
{
alert('Select At Least One Option');
$('#tableexp').DataTable().destroy();
fill_datatable();
}
});
const columnOrder = [
"ecNo", "admission", "name", "father_name", "admissionNo",
"contactPersonMobile", "father_mobile", "mother_mobile", "app_status",
"studentDob", "gender", "className", "sectionName", "studentstatus",
"action", "studentPob", "aadhaarNo", "religion", "studentType",
"motherTounge", "bloodGroup", "resAddress", "resCity", "resPincode",
"landmark", "resstate", "resTelephone", "contactPerson",
"contactPersonRelation","contactPersonMobile", "father_qualification", "father_occupation",
"father_designation", "mother_name", "mother_qualification",
"mother_occupation", "mother_designation"
];
function fill_datatable(classes = '', sections = '',studentType = '',gender = '',isActive = '',idFinancialYear = ''){
$.ajax({
url: '<?php echo e(url('school/student-list')); ?>?showall=true',
type: 'POST',
data: {
_token : "<?php echo e(csrf_token()); ?>",
current : current,
classes : classes,
sections : sections,
studentType : studentType,
gender : gender,
isActive : isActive,
idFinancialYear : idFinancialYear,
},
dataType: 'json',
success: function(response) {
$.each(response.data, function(index, item) {
const $row = $('<tr>');
$.each(columnOrder, function(i, colName) {
const cellData = item[colName] !== undefined ? item[colName] : '';
if(colName == 'studentstatus' || colName == 'action')
$row.append($('<td>').html(cellData));
else $row.append($('<td>').text(cellData));
});
studentTableBody.append($row);
});
if(response.draw > 0){
current = current + 60;
fill_datatable();
}else{
$('#loader').remove();
var datatable = $('#tableexp').DataTable({
"columnDefs": [
{
"targets": [3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],
"visible": false
}
],
dom: 'lBfrtip',
buttons: [
{
extend: 'csv', text: 'Export to Excel', title: 'Student List',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
}
}
],
scrollY: "500px",
scrollX: true,
scrollCollapse: true,
fixedColumns: {
left: 1
},
});
}
},
error: function(jqXHR, textStatus, errorThrown) {
console.error('AJAX Error:', textStatus, errorThrown);
}
});
}
fill_datatable();
<?php else: ?>
if ( $.fn.DataTable.isDataTable( '#tableexp' ) ) {
$('#tableexp').DataTable().destroy();
}
fill_datatable();
function fill_datatable(classes = '', sections = '',studentType = '',gender = '',isActive = '',idFinancialYear = ''){
//alert(classes);
var datatable = $('#tableexp').DataTable({
"columnDefs": [
{
"targets": [3,9,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],
"visible": false
}
],
dom: 'lBfrtip',
'lengthMenu': [[25,50,100,500], [25,50,100,500]],
buttons: [
{ extend: 'csv', text: 'Export to Excel',title:'Student List',
exportOptions: {
columns: [0,1,2,3,4,5,6,7,9, 10,11,12,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]
}
}
],
scrollY: "500px",
scrollX: true,
scrollCollapse: true,
fixedColumns: {
left: 1
},
"processing": true,
"serverSide": true,
// "deferLoading": 0, // here
"language": {
"processing": '<img src="<?php echo e(asset("dist/images/loading_light_green.gif")); ?>" height="50" style="margin-top:50px;">'
},
"ajax": {
url: "<?php echo e(url('school/student-list')); ?>",
dataType : "json",
type: "POST",
data:{
_token : "<?php echo e(csrf_token()); ?>",
classes : classes,
sections : sections,
studentType : studentType,
gender : gender,
isActive : isActive,
idFinancialYear : idFinancialYear,
},
},
initComplete: function(row, data) {
var count = data['recordsTotal'];
$('#total_record').text(count);
},
"columns": [
{ "data": "ecNo" },
{ "data": "admission" },
{ "data": "name" },
{ "data": "father_name" },
{ "data": "admissionNo" },
{ "data": "contactPersonMobile" },
{ "data": "father_mobile" },
{ "data": "mother_mobile" },
{ "data": "app_status" },
{ "data": "studentDob" },
{ "data": "gender" },
{ "data": "className" },
{ "data": "sectionName" },
{ "data": "studentstatus" },
{ "data": "action" },
{ "data": "studentPob" },
{ "data": "aadhaarNo" },
{ "data": "religion" },
{ "data": "studentType" },
// { "data": "studentUID" },
{ "data": "motherTounge" },
// { "data": "grNo" },
// { "data": "saralNo" },
{ "data": "bloodGroup" },
{ "data": "resAddress" },
{ "data": "resCity" },
{ "data": "resPincode" },
{ "data": "landmark" },
{ "data": "resstate" },
{ "data": "resTelephone" },
// { "data": "lastSchool" },
// { "data": "board" },
// { "data": "percentage" },
// { "data": "lastSchoolAddress" },
// { "data": "lastSchoolCity" },
// { "data": "lastSchoolPhone" },
// { "data": "lastSchoolPincode" },
// { "data": "lastschool_state" },
// { "data": "reasonForChange" },
{ "data": "contactPerson" },
// { "data": "contactPersonAddress" },
{ "data": "contactPersonRelation" },
{ "data": "contactPersonMobile" },
// { "data": "father_dob" },
{ "data": "father_qualification" },
{ "data": "father_occupation" },
{ "data": "father_designation" },
// { "data": "father_company" },
// { "data": "father_workloc" },
// { "data": "father_panno" },
// { "data": "father_telephone" },
// { "data": "father_aadhaar" },
// { "data": "father_email" },
{ "data": "mother_name" },
// { "data": "mother_dob" },
{ "data": "mother_qualification" },
{ "data": "mother_occupation" },
{ "data": "mother_designation" },
// { "data": "mother_company" },
// { "data": "mother_workloc" },
// { "data": "mother_panno" },
// { "data": "mother_telephone" },
// { "data": "mother_aadhaar" },
// { "data": "mother_email" },
// { "data": "food" },
// { "data": "transport" },
// { "data": "learningDisability" }
],
'searching' : true
});
}
$('#filter').click(function(){
var gender = $('#gender').val();
var isActive = $('#isActive').val();
var studentType = $('#studentType').val();
var idFinancialYear = $("#idFinancialYear").val();
var classes = [];
$("input:checkbox[name='classes[]']:checked").each(function () {
classes.push($(this).val());
});
console.log(classes);
var sections = [];
$("input:checkbox[name='sections[]']:checked").each(function () {
sections.push($(this).val());
});
if(gender != '' || isActive != '' || idFinancialYear != '' || studentType != '' || classes !='' || sections != '')
{
$('#tableexp').DataTable().destroy();
fill_datatable(classes ,sections,studentType,gender ,isActive ,idFinancialYear);
}
else
{
alert('Select At Least One Option');
$('#tableexp').DataTable().destroy();
fill_datatable();
}
});
<?php endif; ?>
});
function showRemarks(key){
$('#remarks'+key).show();
}
$('body').on('focus',".datepicker_recurring_start", function(){
$(this).datepicker({
autoclose: true,
autoWidth: false,
format: 'dd-mm-yyyy',
todayBtn:true,
todayHighlight:true,
orientation: 'auto'
});
});
function showDatepicker(key){
$('#datepicker'+key).datepicker({
autoclose: true,
autoWidth: false,
format: 'dd-mm-yyyy',
todayBtn:true,
todayHighlight:true,
orientation: 'auto'
});
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -