IMMREX7

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

<?php $__env->startSection('content'); ?>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>Student Strength</strong></h2>
            </div>
            <div class="body table-responsive">

                <?php echo Form::open(['method' => 'GET',  'action' => ['School\ClassPromotionController@stdStrength'], 'class' => 'form-horizontal']); ?>

               <div class="row clearfix">
                    <div class="col-sm-1 form-control-label">
                        <label for="classname">Class</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                            <?php echo Form::select('idClass',$classes,null,['class' => 'form-control show-tick ms select2']); ?>

                        </div>
                        <span id='classerror'></span>
                    </div>
                    <div class="col-sm-1 form-control-label">
                        <label for="classname">Section</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                            <select name='idSection' id="idSection" class="form-control show-tick ms"></select>
                        </div>
                        <span id='sectionerror'></span>
                    </div>
                   <div class="col-sm-2">
                        <?php echo Form::submit('SHOW',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>

                        <?php echo Form::close(); ?>

                   </div>
                </div>
                <table class="table table-bordered table-striped table-hover dataTable js-exportable" id="table-1">
                    <thead>
                        <tr>
                            <th>Class</th>
                            <th>Section</th>
                            <th>Girls</th>
                            <th>Boys</th>
                            <th>Total</th>
                        </tr>
                    </thead>
                    <?php $gt = 0;?>
                    <?php $bt = 0;?>
                    <?php $cn = '' ?>
                    <tbody>
                        <?php $__currentLoopData = $students; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php if(strcmp($cn,$value->className)!=0): ?>
                                <?php if($gt+$bt > 0 && $cn != ''): ?>
                                <tr>
                                    <td><?php echo e($cn); ?></td>
                                    <th>Total:</th>
                                    <th><?php echo e($gt); ?></th>
                                    <th><?php echo e($bt); ?></th>
                                    <th><?php echo e($gt+$bt); ?></th>
                                </tr>
                                <?php $gt = 0;
                                $bt = 0; ?>
                                 <?php endif; ?>
                            <?php endif; ?>
                        <tr>
                             
                            <td><?php echo e($value->className); ?></td>
                            <td><?php echo e($value->sectionName ?: 'not set'); ?> (<strong><?php echo e($value->studentType); ?></strong>)</td>
                            <td><?php echo e($value->girls); ?></td>
                            <td><?php echo e($value->boys); ?></td>
                            <td><?php echo e($value->girls+$value->boys); ?></td>
                        </tr>
                            <?php $gt += intval($value->girls); ?>
                            <?php $bt += intval($value->boys); ?>
                            <?php $cn = $value->className; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        
                        <?php if($gt+$bt > 0 && $cn != ''): ?>
                        <tr>
                            <td><?php echo e($cn); ?></td>
                            <th>Total:</th>
                            <th><?php echo e($gt); ?></th>
                            <th><?php echo e($bt); ?></th>
                            <th><?php echo e($gt+$bt); ?></th>
                        </tr>
                        
                        <?php $gt = 0;
                        $bt = 0; ?>
                        <?php endif; ?>
                    </tbody>
                    <tfoot>
                        <tr>
                            <th></th>
                            <th>Total Strength:</th>
                            <th><?php echo e($totals['girls']); ?></th>
                            <th><?php echo e($totals['boys']); ?></th>
                            <th><?php echo e($totals['total']); ?></th>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
<script>
    $('select[name="idClass"]').on('change', function() {
        var classID = $(this).val();
        if(classID) {
            $.ajax({
                url: "<?php echo e(url('/school/class')); ?>"+'/' +classID + "/sections",
                type: "GET",
                dataType: "json",
                success:function(data) {
                    $('select[name="idSection"]').empty();
                    $('select[name="idSection"]').append('<option value="">--- Select ---</option>');
                    $.each(data, function(key, value) {
                        $('select[name="idSection"]').append('<option value="'+ key +'">'+ value +'</option>');
                    });
                }
            });
        }else{
            $('select[name="idSection"]').empty();
        }
});
  $(document).ready(function () {
    function sortTable(){
        var class_name = '';
        var cur_class = '';
        var first_row = '';
        var rows = [];
        var rwcnt=0;
        var cnt = 0;
        var td_rows;
        $('#table-1 tbody tr').each(function(index, row){
          cur_class = $('td:first',row).text();
          if(class_name != cur_class) {
            if(cnt > 0){
              $(first_row).children().first().attr("rowspan", cnt);
              rows = [];
              cnt = 0;
            }
            class_name = cur_class;
            first_row = row;
          }
          
          if(row != first_row) {
              $(row).children().first().remove();
          }
          
          rows[cnt] = row;
          cnt++;
          
        });
        
        if(cnt > 0){
          $(first_row).children().first().attr("rowspan", cnt);
          rows = [];
          cnt = 0;
        }
    }
    sortTable();  
    
    $(document).on("click", "ul.pagination li" , function() {
      //sortTable();
     });
  });
  
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

Copyright © 2021 - 2025 IMMREX7