<?php $__env->startSection('content_header'); ?>
    <?php echo notifyCss(); ?>
    <?php echo notifyJs(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-12">
            <div class="card card-primary">
                <div class="card-header">
                    <h3 class="card-title">View Training Details</h3>
                </div>
                <?php echo $__env->make('notify::messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <!-- /.card-header -->
                <!-- form start -->
                <form id="userregform" class="form-horizontal" action="#" method="post" autocomplete="off" enctype="multipart/form-data">
                  <?php echo e(csrf_field()); ?>

                  <div class="card-body">
                      <div class="col-12">
                          <div class="form-group row">
                              <div class="col-3">
                                  <label for="exampleInputEmail1">Training Title</label><br>
                                  <?php echo e($schedule_trainings->schedule->training_title); ?>

                                  <input type="hidden" name="schedule_id" id="schedule_id" value="<?php echo e($schedule_trainings->schedule_id); ?>">
                              </div>
                              <div class="col-3">
                                  <label for="exampleInputEmail1">Venue</label><br>
                                  <?php echo e($schedule_trainings->schedule->venue); ?>

                              </div>
                              <div class="col-3">
                                  <label for="exampleInputEmail1">Training Period</label><br>
                                  <?php
                                    $period_from = $schedule_trainings->schedule->period_from;
                                    $period_to = $schedule_trainings->schedule->period_to;
                                    if($period_from)
                                    {
                                        $period_from = date("d-M-Y", strtotime($period_from));
                                    }
                                    if($period_to)
                                    {
                                        $period_to = date("d-M-Y", strtotime($period_to));
                                    }
                                    echo $period_from." to ".$period_to;
                                  ?> 
                                  
                              </div>
                              <div class="col-3">
                                <label for="exampleInputEmail1">Min & Max seats for training</label><br>
                                  <?php
                                    $min_seat_training = $schedule_trainings->schedule->min_seat_training;
                                    $max_seat_training = $schedule_trainings->schedule->max_seat_training;
                                    
                                    echo $min_seat_training." & ".$max_seat_training;
                                  ?> 
                              </div>
                          </div>
                      </div>
                      <div id="listroledata" style="padding: 10px;">
                        <table class="table table-hover table-bordered table-striped datatable" id="dept_details" width="100%">
                            <thead>
                              <tr class="success">
                                <th>Training Date</th>
                                <th>Topic</th>
                                <th>Attendance</th>
                              </tr>  
                            </thead>
                            <tbody>
                              <?php
                                $att_status ="";
                              ?>
                              <?php $__currentLoopData = $topic_schedule_date_arr; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $topic_schedule_date): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                  <td><?php echo e(date("d-M-Y", strtotime($topic_schedule_date))); ?></td>
                                  <td><?php echo e($schedule_topic_name_arr[$topic_schedule_date]); ?></td>
                                  <td>
                                    <?php
                                      if(isset($attendance_status[$topic_schedule_date]))
                                      {
                                        if($attendance_status[$topic_schedule_date]==1)
                                        {
                                          $att_status = "Present";
                                        }
                                        else
                                        {
                                          $att_status = "Absent";
                                        }
                                      }
                                    ?>
                                    <?php echo e($att_status); ?>

                                  </td>
                                </tr>
                              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>             
                      </div>
                  </div>
                  <!-- /.card-body -->
                  <div class="card-footer">
                    <a href="<?php echo e(URL::to('/active_trainings')); ?>" class="btn btn-primary pull-right">Back</a>
                  </div>
                </form>
            </div>
        </div>        
    </div>
    
<?php $__env->stopSection(); ?>

<?php echo $__env->make('adminlte::page', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\xampp7.3\htdocs\kmportal\resources\views/Trainee/view_training_attendance_details.blade.php ENDPATH**/ ?>