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/inactive_students.blade.php

@extends('schools.school_layout')
@section('content')
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>List Of Inactive Students</strong></h2>
            </div>
            <div class="body table-responsive">
                {!! Form::open(['method' => 'GET',  'action' => ['School\StudentController@inactiveStudents'], '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">
                           {!! Form::select('idFinancialYear',fys(),null,['class' => 'form-control show-tick ms']) !!}
                        </div>
                    </div>
                    <div class="col-sm-2">
                        {!! Form::submit('Search',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}
                    </div>
                </div>
                {!! Form::close() !!} 
                <br>
                <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>Contact No.</th>
                            <th>Deactivation Date</th>
                            <th>Remarks</th>
                            <th>DOB</th>
                            <th>Gender</th>
                            <th>Class</th>
                            <th>Section</th>
                            <th>Password</th>
                            <th>Student Status</th>
                            <th>Action</th>
                            <th>Admission No</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>Contact Person</th>
                            <th>Contact Person Address</th>
                            <th>Contact Person Relation</th>
                           
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 1; ?>
                        @foreach($students as $value)
                        <tr>
                            <th scope="row">{{$i}}</th>
                            <td> <img src="{{ asset('storage/schools/'.$value->idSchool.'/students/'.$value->photo)}}" height="60"></td>
                            <td>{{$value->ecNo}}</td>
                            <td>{{$value->firstName}} {{$value->middleName}} {{$value->lastName}}</td>
                            <td>{{$value->father_fname}} {{$value->father_lname}}</td>
                            <td>{{$value->contactPersonMobile}}</td>
                            <td>{{$value->deactivationDate}}</td>
                            <td>{{$value->remarks}}</td>
                            <td>{{$value->studentDob}}</td>
                            <td>{{$value->gender}}</td>
                            @if(isset($value->classM->className))
                            <td>{{$value->classM->className}}</td>
                            @else<td></td>@endif
                            @if(isset($value->section->sectionName))
                            <td>{{$value->section->sectionName}}</td>
                            @else<td></td>@endif
                            <td></td>
                            <td style="width:300px;">
                                {!! Form::open(['url' => 'school/stdstatusupdate', 'class' => 'form-horizontal']) !!}
                                <input type="hidden" name='idStudent' value="{{$value->idStudent}}">
                                {!! Form::select('isActive',['Y'=>'ACTIVE','N'=>'NOT-ACTIVE'],$value->isActive,['class' => 'form-control show-tick ms','style'=>'background-color: #fff','onchange'=>'showRemarks('.$value->idStudent.')']) !!}
                                    <span id='remarks{{$value->idStudent}}' style="display:none;">
                                          <input type="text" name='remarks' class="form-control" style="background-color: #fff;" placeholder="Enter Remarks">
                                           <button class="btn btn-sm btn-success">Update</button>
                                
                                          </span>
                                {!! Form::close() !!}
                                </td>
                            <td>
                                 <a class="btn btn-info btn-sm" href="{{url('/school/admentries/'.$value->idStudent)}}">View</a>
                                 <a class="btn btn-primary btn-sm" href="{{url('/school/admentries/'.$value->idStudent.'/edit')}}">Edit</a>
                                 <button class="btn btn-danger btn-sm js-sweetalert" data-id="{{$value->idStudent}}" data-type="confirm">DELETE</button>
                            
                            </td>
                            <td>{{$value->admissionNo}}</td>
                            <td>{{$value->studentPob}}</td>
                            <td>{{$value->aadhaarNo}}</td>
                            <td>{{$value->religion}}</td>
                            <td>{{$value->studentType}}</td>
                            <td>{{$value->studentUID}}</td>
                            <td>{{$value->motherTounge}}</td>
                            <td>{{$value->grNo}}</td>
                            <td>{{$value->saralNo}}</td>
                            <td>{{$value->bloodGroup}}</td>
                            <td>{{$value->resAddress}}</td>
                            <td>{{$value->resCity}}</td>
                            <td>{{$value->resPincode}}</td>
                            <td>{{$value->landmark}}</td>
                            <td>{{$value->state->stateName}}</td>
                            <td>{{$value->contactPerson}}</td>
                            <td>{{$value->contactPersonAddress}}</td>
                            <td>{{$value->contactPersonRelation}}</td>
                        </tr>
                        <?php $i++; ?>
                        @endforeach
                    </tbody>
                </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;
    });
});
$(function () {
    $('#tableexp').DataTable({
      "columnDefs": [
            {
                "targets": [15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],
                "visible": false
            }
        ],
        dom: 'Bfrtip',
         scrollY:        "500px",
        scrollX:        true,
        scrollCollapse: true,
        fixedColumns:   {
            left: 1
        },
        buttons: [
            { extend: 'csv', text: 'Export to Excel',title:'Student List',
                exportOptions: {
                    columns: [0,1,2,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]
                }}
            
        ]
    });
});

function showRemarks(key){
    $('#remarks'+key).show();
}

</script>
@stop

Copyright © 2021 - 2025 IMMREX7