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



<main class="h-full pb-16 overflow-y-auto">
          <div class="container grid px-6 mx-auto">
            <h2
              class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
            >
            <span class="text-blue-500">Deposit</span> Requests
            </h2>
             <!-- CTA -->
             <a
              class="flex items-center bg-blue-600 justify-between p-4 mb-8 text-sm font-semibold shadow-md focus:outline-none focus:shadow-outline-green"
              href="<?php echo e(url('/')); ?>" style="color: #fff;"
            >
              <div class="flex items-center">
                <svg
                  class="w-5 h-5 mr-2"
                  fill="currentColor"
                  viewBox="0 0 20 20"
                >
                  <path
                    d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
                  ></path>
                </svg>
                <span>Go to main website</span>
              </div>
              <span>View &RightArrow;</span>
            </a>

            

            <!-- With actions -->
            <h4
              class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
              List of Investment Deposit Requests
            </h4>
            <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.alert','data' => []]); ?>
<?php $component->withName('alert'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?><br>
            <div class="w-full overflow-hidden rounded-lg shadow-xs">
              <div class="w-full overflow-x-auto">
                <table class="w-full whitespace-no-wrap">
                  <thead>
                    <tr
                      class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800"
                    >
                      <th class="px-4 py-3 border">User</th>
                      <th class="px-4 py-3 border">Package</th>
                      <th class="px-4 py-3 border">Amount</th>
                      <th class="px-4 py-3 border">REF.No</th>
                      <th class="py-3 px-3 border">Actions</th>
                    </tr>
                  </thead>
                  <tbody
                    class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"
                  >
                  <?php $__empty_1 = true; $__currentLoopData = $deposits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $deposit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="text-gray-700 dark:text-gray-400">
                      <td class="px-4 py-3 border">
                        <div class="flex items-center text-sm">
                          <!-- Avatar with inset shadow -->
                          <div
                            class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
                          >
                          <img
                              class="object-cover w-full h-full rounded-full"
                              <?php if($deposit->user->avatar == null): ?>
                              src="<?php echo e(asset('images/toy-avatar.png')); ?>"
                              <?php else: ?>
                              src="<?php echo e(asset('storage/images/'.$deposit->user->avatar)); ?>"
                              <?php endif; ?>
                              alt=""
                              loading="lazy"
                            />
                            <div
                              class="absolute inset-0 rounded-full shadow-inner"
                              aria-hidden="true"
                            ></div>
                          </div>
                          <div><a href="<?php echo e(route('admin.request_info', $deposit->id)); ?>">
                            <p class="font-semibold"><?php echo e($deposit->user->first_name . ' ' . $deposit->user->last_name); ?></p>
                            <p class="text-xs text-gray-600 dark:text-gray-400">
                              <?php echo e($deposit->user->email); ?>

                            </p>
                           </a>
                          </div>
                        </div>
                      </td>
                      <td class="px-4 py-3 text-sm border">
                        <?php echo e($deposit->plan->name); ?>

                      </td>
                      <td class="px-4 py-3 text-sm border">
                        &#8358;<?php echo e(number_format($deposit->amount)); ?>

                      </td>
                      <td class="px-4 py-3 text-sm border font-semibold">
                        <?php echo e($deposit->pop); ?>

                      </td>
                      <td class="px-4 py-3 border">
                        <div class="flex items-center space-x-6 text-sm">
                          <a
                            class="flex items-center justify-between py-2 text-sm font-medium leading-5 text-green-600 rounded-lg dark:text-gray-400 focus:outline-none focus:shadow-outline-gray"
                            aria-label="View" href="<?php echo e(route('admin.request_info', $deposit->id)); ?>"
                          >
                          <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
                            <path d="M10 12a2 2 0 100-4 2 2 0 000 4z" />
                            <path fill-rule="evenodd" d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z" clip-rule="evenodd" />
                          </svg>
                          </a>

                          <?php if($deposit->status == NULL): ?>
                          <form action="<?php echo e(route('admin.request_approve')); ?>" method="post">
                              <?php echo csrf_field(); ?>
                              <input type="hidden" name="deposit_id" value="<?php echo e($deposit->id); ?>">
                              <input type="hidden" name="user_id" value="<?php echo e($deposit->user->id); ?>">
                              <input type="hidden" name="is_increase" value="<?php echo e($deposit->is_increase); ?>">
                              <input type="hidden" name="amount" value="<?php echo e($deposit->amount); ?>">
                              <button type="submit" class="font-semibold text-green-700 dark:text-green-200" name="submit"
                               onclick="return confirm('Dear Admin, Are you sure you want to approve <?php echo e($deposit->user->first_name); ?>\'s Investment Request?');" >Approve</button>
                          </form>
                          
                          
                          <a
                            href="<?php echo e(route('admin.decline', $deposit->id)); ?>" class="font-semibold text-red-700 dark:text-red-200"
                            aria-label="Ban"
                          >
                            Decline
                          </a>
                          
                          <!--<form action="" method="post">
                              <?php echo csrf_field(); ?>
                              <input type="hidden" name="deposit_id" value="<?php echo e($deposit->id); ?>">
                              <button type="submit" class="font-semibold text-red-700 dark:text-red-200" name="submit"
                              onclick="return confirm('Dear Admin, Are you sure you want to decline <?php echo e($deposit->user->first_name); ?>\'s Investment Request?');">Decline</button>
                          </form>-->
                          <?php else: ?>
                          <?php endif; ?>
                        </div>
                      </td>
                    </tr>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                  <div class="mx-auto my-3">
                        <p class="text-center lead text-white">No Deposit Requests!!</p>
                  </div>
                  <br><br><br>
                  <?php endif; ?>
                  
        
                  </tbody>
                </table>
              </div>
              <div
                class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"
              >

              </div>
            </div>
          </div>
        </main>






   
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin_layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\jango\resources\views/admin/requests.blade.php ENDPATH**/ ?>