<?php $__env->startSection('content'); ?>
<section class="section">
          <div class="section-header">
            <h1>Kelola Deposit </h1>
            <div class="section-header-breadcrumb">
              <div class="breadcrumb-item active"><a href="#">Dashboard</a></div>
              <div class="breadcrumb-item"><a href="#">Developer</a></div>
              <div class="breadcrumb-item">Deposit</div>
            </div>
          </div>

          <div class="section-body">
          
            <div class="row">
              <div class="col-md-12">
                <div class="card">
                  <div class="card-header">
                    <h4><span>Semua Deposit</span></h4>
                  </div>
                  <div class="card-body">
                     <?php if(session('success')): ?>

                        <div class="alert alert-success" role="alert">
                            <i class="fa fa-check-circle"></i> <?php echo e(session('success')); ?>

                        </div>

                    <?php endif; ?>
                    <div class="float-left">
                          <form method="GET">
                            <div class="input-group">
                              <input type="text" class="form-control" placeholder="Cari ID deposit" name="search">
                              <div class="input-group-append">                                            
                                <button class="btn btn-primary"><i class="fas fa-search"></i></button>
                              </div>
                            </div>
                          </form>
                        </div>
                        <div class="clearfix mb-3"></div>
                    <div class="table-responsive">
                      <table class="table table-striped table-md">
                          <tr>
                            <th>#</th>
                            <th>Tanggal</th>
                            <th>Type</th>
                            <th>Jumlah</th>
                            <th>Pengirim</th>
                            <th>Get saldo</th>
                            <th>Status</th>
                            <th>Action</th>
                          </tr>
                          <?php $__currentLoopData = $deposits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                          <tr>
                            <td><?php echo e($data->id); ?></td>
                            <td><?php echo e($data->created_at); ?></td>
                            <td><?php echo e($data->methods->name); ?></td>
                            <td>Rp <?php echo e(number_format($data->quantity)); ?></td>
                            <td><?php echo e($data->sender); ?></td>
                            <td>Rp <?php echo e(number_format($data->get_balance)); ?></td>
                            <td><span class="badge badge-<?php echo e(($data->status=='Success' ? 'success' : ($data->status == 'Pending' ? 'warning' : 'danger'))); ?>"><?php echo e($data->status); ?></span></td>
                            <td>
                              <?php if($data->status != "Success"): ?>
                              <form method="POST" class="form-delete" action="<?php echo e(url('developer/deposit/accept')); ?>">
                                <?php echo csrf_field(); ?>
                                <input type="hidden" value="<?php echo e($data->id); ?>" name="id">
                                <button type="submit" class="btn btn-info"  data-delete='<?php echo e($data->id); ?>' name="accept">
                                  <i class="fa fa-check"></i>
                                </button>
                              </form>
                              <?php endif; ?>
                              <form method="POST" class="form-delete" action="<?php echo e(url('developer/deposit/decline')); ?>">
                                <?php echo csrf_field(); ?>
                                <input type="hidden" value="<?php echo e($data->id); ?>" name="id">
                                <button type="submit" class="btn btn-danger"  name="reject">
                                  <i class="fa fa-times"></i>
                                </button>
                              </form>
                            </td>
                          </tr>
                          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      </table>
                    </div>
                    <?php echo e($deposits->links()); ?>

                  </div>
                </div>
              </div>
            </div>
            
          </div>
        </section>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Berkc\OneDrive\Masaüstü\smm\zoopedia-master\resources\views\developer\deposits\index.blade.php ENDPATH**/ ?>