IMMREX7

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

<?php $__env->startSection('content'); ?>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>View Timetable</strong></h2>
            </div>
            <div class="body table-responsive">
                <?php echo Form::open(['method' => 'GET',  'action' => ['Teacher\ViewOnlyController@viewTimetable'], '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']); ?>

                            <?php if($errors->has('idClass')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('idClass')); ?></strong>
                            </label>
                            <?php endif; ?>
                        </div>
                    </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 id='idSection' name='idSection' class="form-control show-tick ms"></select>
                            <?php if($errors->has('idSection')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('idSection')); ?></strong>
                            </label>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div class="col-sm-4 form-control-label">
                        <?php echo Form::submit('View',['class' => 'btn btn-raised btn-primary btn-round waves-effect','id'=>'submit-btn']); ?>

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

                    </div>
                </div>

                <table class="table">
                    <thead style="background-color: #00d6f3;color:white;">
                        <tr>
                            <th>DAY/TIME</th>
                            <?php $__currentLoopData = $periods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <th><?php echo e($var->periodName); ?> <br> <?php echo e($var->fromTime); ?> <br><?php echo e($var->toTime); ?></th>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = weekdays(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <th style="background-color: #ffa60d;color:white;"><?php echo e($value); ?></th>
                            <?php $__currentLoopData = $periods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php $timetable = \App\Timetable::where('idPeriod','=',$var->idPeriod)->where('idWeekday','=',$key)->first() ?>
                                <?php if($var->isLunchBreak == 'N'): ?>
                                <td style="border-right: 1px solid #dee2e6;">
                                    <span><strong><?php echo e(isset($timetable->subject->subjectName) ? $timetable->subject->subjectName : ''); ?></strong></span><br>
                                    <span><strong><?php echo e(isset($timetable->teacher->firstName) ? $timetable->teacher->firstName : ''); ?></strong></span>
                                </td>
                                <?php else: ?>
                                <td style="background-color: #ffa60d;"></td>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
            <?php echo Form::close(); ?>

        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
    $(document).ready(function () {
        $('select[name="idClass"]').on('change', function () {
            var classID = $(this).val();
            if (classID) {
                $.ajax({
                    url: "<?php echo e(url('/teacher/class')); ?>" + '/' + classID + "/sections",
                    type: "GET",
                    dataType: "json",
                    success: function (data) {
                        $('#idSection').empty();
                        $('#idSection').append('<option value="">--Select--</option>');
                        $.each(data, function (key, value) {
                            $('#idSection').append('<option value="' + key + '">' + value + '</option>');
                        });
                    }
                });
            } else {
                $('select[name="idSection"]').empty();
            }
        });
        var cur_class = $('select[name="idClass"]').val();
        if (cur_class) {
            $.ajax({
                url: "<?php echo e(url('/teacher/class')); ?>" + '/' + cur_class + "/sections",
                type: "GET",
                dataType: "json",
                success: function (data) {
                    $('#idSection').empty();
                    $('#idSection').append('<option value="">--Select--</option>');
                    $.each(data, function (key, value) {
                        $('#idSection').append('<option value="' + key + '">' + value + '</option>');
                    });
                }
            });
        }
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('teachers.teacher_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

Copyright © 2021 - 2025 IMMREX7