


<?php $__env->startSection('isDesktop'); ?>

<div class="content my01">
  <div class="container-fluid">

    <div style="background:#1e2146;border-radius:6px;">

      <div style="background:#0c1445;padding:12px 20px;">
        Referral Downline
      </div>

      
      <form method="GET" action="/refferal">
        <div class="p-4">
          <div class="row align-items-center mb-3">

            <div class="col-md-2">Tanggal</div>

            <div class="col-md-6">
              <input type="text" class="form-control datepicker" name="daterange" value="<?php echo e(request('daterange')); ?>">
            </div>

            <div class="col-md-4">
              <button class="btn btn-primary">Cari</button>
            </div>

          </div>
        </div>
      </form>

      
      <div class="p-4">
        <table id="referral-table-desktop" class="table table-bordered">
          <thead>
            <tr>
              <th>Username</th>
              <th>Email</th>
              <th>No HP</th>
              <th>Tanggal</th>
            </tr>
          </thead>

          <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $downlines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $d): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <tr>
              <td><?php echo e($d->name); ?></td>
              <td><?php echo e($d->email); ?></td>
              <td><?php echo e($d->telp); ?></td>
              <td><?php echo e($d->created_at->format('Y-m-d')); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <tr>
              <td colspan="4" class="text-center">
                Tidak punya Referral bulan ini.
              </td>
            </tr>
            <?php endif; ?>
          </tbody>
        </table>
      </div>

    </div>

  </div>
</div>

<?php $__env->stopSection(); ?>



<?php $__env->startSection('isMobile'); ?>

<?php echo $__env->make('nav_saldo', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<div class="container">

  <h2 class="title">Referral Downline</h2>

  <form method="GET" action="/refferal">

    <div class="box-wrapper plr-15">

      <div class="row">
        <div class="col-xs-4">Tanggal</div>
        <div class="col-xs-8">
          <input type="text" class="form-control datepicker" name="daterange" value="<?php echo e(request('daterange')); ?>">
        </div>
      </div>

      <div class="row mt-2">
        <div class="col-xs-12">
          <button class="btn btn-primary w-100">Cari</button>
        </div>
      </div>

    </div>

  </form>

  <div class="mt-3">
    <table id="referral-table-mobile" class="table table-bordered">

      <thead>
        <tr>
          <th>Username</th>
          <th>Tanggal</th>
        </tr>
      </thead>

      <tbody>
        <?php $__empty_1 = true; $__currentLoopData = $downlines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $d): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <tr>
          <td><?php echo e($d->name); ?></td>
          <td><?php echo e($d->created_at->format('Y-m-d')); ?></td>
        </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <tr>
          <td colspan="2" class="text-center">
            Tidak punya Referral
          </td>
        </tr>
        <?php endif; ?>
      </tbody>

    </table>
  </div>

</div>

<?php $__env->stopSection(); ?>



<?php $__env->startSection('scripts'); ?>

<script>
$(document).ready(function () {

    $('.datepicker').daterangepicker({
        locale: {
            format: 'YYYY-MM-DD'
        }
    });

    $('#referral-table-desktop').DataTable({
        destroy: true
    });

    $('#referral-table-mobile').DataTable({
        destroy: true
    });

});
</script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ybjqutnd/jp.royalkingz.top/resources/views/refferal.blade.php ENDPATH**/ ?>