
<?php $__env->startSection('content'); ?>
<main id="main" class="main">

    <div class="pagetitle">
      <h1>Absensi</h1>
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a>Dashboard</a></li>
          <li class="breadcrumb-item"><a>Presensi</a></li>
          <li class="breadcrumb-item active">Absensi (Approval)</li>
        </ol>
      </nav>
    </div><!-- End Page Title -->

    <section class="section dashboard">
      <?php if(Session::get('msg')): ?>
      <div class="alert alert-success alert-dismissible fade show" role="alert">
          <i class="bi bi-check-circle me-1"></i>
                <?php echo e(Session::get('msg')); ?>

          <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
      </div>
      <?php endif; ?>


      <div class="row">
        <div class="col-lg-12">
          <div class="card">
            <div class="card-body">
              <h5 class="card-title">Data Absensi (Menungggu Verif)</h5>
              <br>
              <br>
              <!-- Default Table -->
              <table class="table" id="table">
                <thead>
                  <tr>
                    <th scope="col">#</th>
                    <th scope="col">Waktu Latihan</th>
                    <th scope="col">Venue</th>
                    <th scope="col">Trainer</th>
                    <th scope="col">Peserta</th>
                    <th scope="col">Tipe</th>
                    <!-- <th scope="col">Foto</th> -->
                    <th scope="col">Status</th>
                    <th scope="col">Action</th>
                  </tr>
                </thead>
                <tbody>
                  <?php 
                    $i = 1;
                  ?>
                  <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $datas): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <tr>
                    <th scope="row"><?php echo e($i++); ?></th>
                    <td><?php echo e($datas->date); ?> <?php echo e($datas->time); ?></td>
                    <td><?php echo e($datas->Venue->name); ?></td>
                    <td><?php echo e($datas->Trainer->name); ?></td>
                    <?php if($datas->student_come == 0): ?>
                    <td><?php echo e($datas->student_name); ?><span class="badge bg-danger">tidak hadir</span></td>
                    <?php endif; ?>
                    <?php if($datas->student_come == 1): ?>
                    <td><?php echo e($datas->student_name); ?><span class="badge bg-success">hadir</span></td>
                    <?php endif; ?>
                    <!-- <td><img src="/<?php echo e($datas->image); ?>" alt="" title="" style="width:50px" /></td> -->
                    <?php if($datas->status == 0): ?>
                    <td><span class="badge bg-warning">menunggu verifikasi</span></td>
                    <?php endif; ?>
                    <td>
                        <?php if($datas->group_type == '0'): ?>
                            <?php echo e('Tunggal'); ?>

                        <?php elseif($datas->group_type == '1'): ?>
                            <?php echo e('Group'); ?>

                        <?php elseif($datas->group_type == '2'): ?>
                            <?php echo e('Therapy'); ?>

                        <?php else: ?>
                            <?php echo e('Club'); ?>

                        <?php endif; ?>
                    </td>

                    
                    <?php if($datas->status == 1): ?>
                    <td><span class="badge bg-success">terverifikasi</span></td>
                    <?php endif; ?>
                    <td>
                      <a href="/dashboard/absensi/detail/<?php echo e($datas->id); ?>" class="btn btn-secondary btn-sm" 
                        data-bs-toggle="tooltip" data-bs-placement="top" title="Detail">
                        <i class="bi bi-info-square"></i>
                      </a>
                      <a href="/dashboard/absensi/admin/approve/<?php echo e($datas->id); ?>" class="btn btn-success btn-sm" 
                        onclick="return confirm('Anda yakin ingin approve absensi?')" 
                        data-bs-toggle="tooltip" data-bs-placement="top" title="Approve">
                        <i class="bi bi-check"></i>
                      </a>
                      <a href="/dashboard/absensi/admin/reject/<?php echo e($datas->id); ?>" class="btn btn-danger btn-sm" 
                        onclick="return confirm('Anda yakin ingin reject absensi?')" 
                        data-bs-toggle="tooltip" data-bs-placement="top" title="Reject">
                        <i class="bi bi-x"></i>
                      </a>
                    </td>
                  </tr>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>  
                </tbody>
              </table>
              <!-- End Default Table Example -->
            </div>
          </div>
        </div>
      </div>
    </section>

  </main><!-- End #main -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('dashboard.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tpsm5646/public_html/tpscmalang.com/tpscmalang/resources/views/dashboard/absensiApproval.blade.php ENDPATH**/ ?>