IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/resources/views/schools/students/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/resources/views/schools/students/stdreport.blade_17december.php

@extends('schools.school_layout')
@section('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">
                                    {!! 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;">
                                                            @foreach($classes as $key=>$value)
                                                            <div class="checkbox-inline" style="padding-left:10px;padding-top:5px;">
                                                                <input type="checkbox" name="classes[]" value="{{$key}}" class="class_ids">
                                                                <label>{{$value}}</label>
                                                            </div>
                                                            @endforeach
                                                        </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">
                                                        {!! 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">
                                                        {!! 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">
                                                        {!! 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">
                                                        {!! 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">
                                            {!! Form::submit('Search',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}
                                            {!! 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>
            </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>Name</th>
                            <th>Father Name</th>
                            <th>Admission No</th>
                            <th>Contact No.</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 Mobile</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 Mobile</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>
                    <tfoot>
                        <tr>
                            <th>EC No.</th>
                            <th>Name</th>
                            <th>Father Name</th>
                            <th>Admission No</th>
                            <th>Contact No.</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 Mobile</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 Mobile</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>
@stop
@section('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: "{{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: "{{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).ready(function () {
    var regex = /[?&]([^=#]+)=([^&#]*)/g,
    
    url = window.location.href,
    
    urlParams ={},
    additional = /\+/g, // Regex for replacing additional symbol with a space
    search = /([^&=]+)=?([^&]*)/g,
    decode = function (s) 
              { return decodeURIComponent(s.replace(additional, " ")); },
    query,
    match;
    var classes = [];
    var sections = [];
    if (url){
        if(url.split("?").length>0){
            query = url.split("?")[1];
         }
         while (match = search.exec(query)){
           urlParams[decode(match[1])] = decode(match[2]);
           classes.push(urlParams['classes[]']);
           sections.push(urlParams['sections[]']);
         }
    }
    //console.log(classes);
$('#stdreport').on('submit',function(e){
    $.ajaxSetup({
        header:$('meta[name="_token"]').attr('content')
    });

    });
    $('#tableexp').DataTable({
      "columnDefs": [
            {
                "targets": [3,6,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],
                "visible": false
            }
        ],
        dom: 'lBfrtip',
        'lengthMenu': [[25,50,100,-1], [25,50,100, "All"]],
        buttons: [
            { extend: 'csv', text: 'Export to Excel',title:'Student List',
                exportOptions: {
                    columns: [0,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]
                }
            }
            
        ],
        "processing": true,
        "serverSide": true,
        "language": {
                "processing": '<img src="{{ asset("dist/images/loading_light_green.gif")}}" height="50" style="margin-top:50px;">'
        },
        "ajax": {
                "url": "{{ url('school/student-list') }}",
                "dataType": "json",
                "type": "POST",
                "data": function (d) {
                    d._token = "{{csrf_token()}}",
                    d.classes = classes;
                    d.sections = sections;
                   // d.idScheme =urlParams['idScheme'];
                    d.studentType = $("#studentType").val();
                    d.gender = $("#gender").val();
                    d.isActive = $("#isActive").val();
                    d.idFinancialYear = $("#idFinancialYear").val();
                },
            },
            initComplete: function(row, data) {
                var count = data['recordsTotal'];
                $('#total_record').text(count);
            },
            "columns": [
                { "data": "ecNo" },
                { "data": "name" },
                { "data": "father_name" },
                { "data": "admissionNo" },
                { "data": "contactPersonMobile" },
                { "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_mobile" },
//                { "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_mobile" },
//                { "data": "mother_aadhaar" },
//                { "data": "mother_email" },
//                { "data": "food" },
//                { "data": "transport" },
//                { "data": "learningDisability" }
            ],          
            'searching'   : true
    });
});
function showRemarks(key){
    $('#remarks'+key).show();
}
function showDatepicker(key){
    $('#datepicker'+key).datepicker({
      autoclose: true,
      autoWidth: false,
      format: 'dd-mm-yyyy',
      todayBtn:true,
      todayHighlight:true,
      orientation: 'auto'
    });
}
</script>
@stop

Copyright © 2021 - 2025 IMMREX7