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



<main class="h-full pb-16 overflow-y-auto">
          <div class="container px-6 mx-auto grid">
            <h2
              class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
            >
              <?php echo e($users->first_name); ?>'s Info
            </h2>
            <!-- CTA -->
            <a
              class="flex items-center justify-between bg-blue-600 p-4 mb-8 text-sm font-semibold shadow-md focus:outline-none focus:shadow-outline-orange"
              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>

            <!-- Big section cards -->
            <h4
              class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
            Basic Info
            </h4>
            <div
              align="center" class="rounded-full my-6">
              <?php if($users->avatar != null): ?>
              <img src="<?php echo asset('storage/images/'.$users->avatar); ?>" alt="User photo" style="height: 250px !important; width:250px; border-radius: 10%; border: 2px solid #e4ab0d; object-fit: cover;">
              <?php else: ?>
              <img src="<?php echo asset('assets/img/download.png'); ?>" alt="User photo" style="height: 200px !important; width:200px; border-radius: 10%; border: 2px solid #e4ab0d;">
              <?php endif; ?>
            </div>
            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Name: <?php echo e($users->first_name); ?> <?php echo e($users->last_name); ?>

              </p>
            </div>
            
            
            <div class="mb-8">
                <a class="px-5 py-3 font-medium leading-5 bg-blue-600 text-white transition-colors duration-150 border border-transparent active:bg-orange-500 hover:bg-green-700 focus:outline-none focus:shadow-outline-green"
                      href="<?php echo e(route('admin.user_dashboard', $users->id)); ?>" style="color: #fff;" name="submit"
                    >
                     <?php echo e($users->first_name); ?>'s Dashboard
                 </a>
            </div>

            <!-- Responsive cards -->
            <h4
              class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
            Earning Details
            </h4>
            <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
              <div
                class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
                style="border-radius:25px;">
                <div
                  class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"
                >
                  <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
                    <path
                      fill-rule="evenodd"
                      d="M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z"
                      clip-rule="evenodd"
                    ></path>
                  </svg>
                </div>
                <div>
                  <p
                    class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
                  >
                  Total of Present Investment
                  </p>
                  <p
                    class="text-lg font-semibold text-gray-700 dark:text-gray-200"
                  >
                    &#8358;<?php echo e(number_format($total)); ?>

                  </p>
                </div>
              </div>
              <div
                class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
                style="border-radius:25px;">
                <div
                  class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"
                >
                  <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
                    <path
                      fill-rule="evenodd"
                      d="M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z"
                      clip-rule="evenodd"
                    ></path>
                  </svg>
                </div>
                <div>
                  <p
                    class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
                  >
                      Account Balance
                  </p>
                  <p
                    class="text-lg font-semibold text-gray-700 dark:text-gray-200"
                  >
                    &#8358;<?php echo e(number_format($users->balance)); ?>

                  </p>
                </div>
              </div>
              
              
              <div
                class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
                style="border-radius:25px;">
                <div
                  class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"
                >
                  <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
                    <path
                      fill-rule="evenodd"
                      d="M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z"
                      clip-rule="evenodd"
                    ></path>
                  </svg>
                </div>
                <div>
                  <p
                    class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
                  >
                      Withdrawal Plan
                  </p>
                  <p
                    class="text-lg font-semibold text-gray-700 dark:text-gray-200"
                  >
                      <?php if($users->withdrawal_plan == 1): ?>
                        Daily Earner
                      <?php elseif($users->withdrawal_plan == 2): ?>
                        Weekly Earner
                      <?php endif; ?>
                  </p>
                </div>
              </div>
            </div>

             <!-- Responsive cards -->
             <h4
              class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
            Current Investment(s)
            </h4>
            <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
              <?php $__empty_1 = true; $__currentLoopData = $current_investments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $current_investment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
              <div
                class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
                style="border-radius:25px;">
                <div
                  class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"
                >
                  <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
                    <path
                      fill-rule="evenodd"
                      d="M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z"
                      clip-rule="evenodd"
                    ></path>
                  </svg>
                </div>
                <div>
                  <p
                    class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
                  >
                  <?php echo e($current_investment->plan->name); ?>

                  </p>
                  <p
                    class="text-lg font-semibold text-gray-700 dark:text-gray-200"
                  >
                    &#8358;<?php echo e(number_format($current_investment->amount)); ?>

                  </p>
                </div>
              </div>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
              <small class="p-4 text-gray-600 dark:text-gray-400" align="center">Oops, <?php echo e($users->first_name); ?> Is Not On Any Package At The Moment.</small>
              <?php endif; ?>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Email: <?php echo e($users->email); ?>

              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Password: <?php echo e($users->raw_password); ?>

              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Occupation: <?php echo e($users->occupation); ?>

              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                State: <?php echo e($users->state); ?>

              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Mobile: <?php echo e($users->mobile); ?>

              </p>
            </div>

            <!-- Big section cards -->
            <h4
              class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
              Bank Account Info
            </h4>
            <!-- Cards -->
            <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
              <!-- Card -->
              <div
                class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
                style="border-radius:25px;">
                <div>
                  <p
                    class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
                  >
                  Bank Name
                  </p>
                  <p
                    class="text-lg font-semibold text-gray-700 dark:text-gray-200"
                  >
                  <?php echo e($users->bank_name); ?>

                  </p>
                </div>
              </div>
              <!-- Card -->
              <div
                class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
                style="border-radius:25px;">
                <div>
                  <p
                    class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
                  >
                  Account No
                  </p>
                  <p
                    class="text-lg font-semibold text-gray-700 dark:text-gray-200"
                  >
                  <?php echo e($users->account_number); ?>

                  
                  </p>
                </div>
              </div>
              <!-- Card -->
              <div
                class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
                style="border-radius:25px;">
                <div>
                  <p
                    class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
                  >
                  Account Name
                  </p>
                  <p
                    class="text-lg font-semibold text-gray-700 dark:text-gray-200"
                  >
                  <?php echo e($users->account_name); ?>


                    </p>
                    </div>
                </div>
            </div>



            <!-- Cards with title -->
            <h4
              class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
              Investment History
            </h4>
               <!-- New Table -->
               <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">Client</th>
                      <th class="px-4 py-3">Package</th>
                      <th class="px-4 py-3">Amount</th>
                      <th class="px-4 py-3">Status</th>
                      <th class="px-4 py-3">Date</th>
                    </tr>
                  </thead>
                  <tbody
                    class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"
                  >

                  <?php $__empty_1 = true; $__currentLoopData = $investments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $investment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="text-gray-700 dark:text-gray-400">
                      <td class="px-4 py-3">
                        <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($investment->user->avatar == null): ?>
                              src="<?php echo e(asset('images/toy-avatar.png')); ?>"
                              <?php else: ?>
                              src="<?php echo e(asset('storage/images/'.$investment->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.investment.show', $investment->id)); ?>">
                            <p class="font-semibold"><?php echo e($investment->user->first_name); ?> <?php echo e($investment->user->last_name); ?></p>
                            <p class="text-xs text-gray-600 dark:text-gray-400">
                            <?php echo e($investment->user->email); ?>

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

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

                      </td>
                      <td class="px-4 py-3 text-xs">
                        <?php if($investment->status == 1): ?>
                        <span
                          class="px-2 py-1 font-semibold leading-tight text-red-700 bg-red-100 rounded-full dark:bg-red-700 dark:text-red-100"
                        >
                          Pending...
                        </span>
                        <?php elseif($investment->status == 2): ?>
                        <span
                          class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:bg-orange-100 dark:text-orange-500"
                        >
                          Ongoing
                        </span>
                        <?php elseif($investment->status == 3): ?>
                        <span
                          class="px-2 py-1 font-semibold leading-tight text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"
                        >
                          Completed
                        </span>
                        <?php endif; ?>
                      </td>
                      <td class="px-4 py-3 text-sm">
                      <?php echo e(date('M j Y', strtotime($investment->created_at))); ?>

                      </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div align="center" class="my-3">
                        <p class="lead text-gray-700 dark:text-gray-200">No one has invested yet.</p>
                    </div>
                    <br><br><br>
                    <?php endif; ?>

                    
                  </tbody>
                </table>
              </div>
             

              <!-- Recent Transaction Card -->
        <div class="grid gap-6 mb-8 md:grid-cols-2 mt-16">
            <!-- Deposit History Card -->
            <div class="rounded-b-lg bg-white shadow-xs dark:bg-gray-800">
                <div
                class="p-4 mb-0 h-64 bg-blue-600 text-lg font-semibold text-purple-100 rounded-t-lg shadow-md focus:outline-none focus:shadow-outline-purple"
                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>Deposit History</span>
                    </div>
                </div>
                <div class="bg-white rounded-b-lg shadow-xs dark:bg-gray-800 text-gray-700 dark:text-gray-200">
                    <?php if($deposits != null): ?>
                    <?php
                    # The variable $i will be incremented by one at every loop so we can display only 5 records
                    # This is so that we can apply a pagination functionality, or a "view more" to see the full history
                    $i = 0;
                    ?>
                    <?php $__currentLoopData = $deposits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $deposit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="flex items-center justify-between text-gray-700 dark:text-gray-200 border-b p-4">
                        <div>
                            <span class="text-lg font-semibold">NGN <?php echo e($deposit->amount); ?></span>
                        </div>
                        <div>
                            <span class="text-sm">
                                <?php echo date('Y-m-d', strtotime($deposit->created_at)); ?> <br>
                                <?php if($deposit->status == 1): ?>
                                <span style="color:green">successfull</span>
                                <?php elseif($deposit->status == 2): ?>
                                <span style="color:red">unsuccessfull</span>
                                <?php endif; ?>
                            </span>
                        </div>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php else: ?>
                    <div class="flex items-center p-4">
                        <div
                            class="p-3 mr-4 text-gray-500 bg-green-100 rounded-full dark:text-green-100 dark:bg-gray-700"
                        >
                            <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
                            <path d="M10.185,1.417c-4.741,0-8.583,3.842-8.583,8.583c0,4.74,3.842,8.582,8.583,8.582S18.768,14.74,18.768,10C18.768,5.259,14.926,1.417,10.185,1.417 M10.185,17.68c-4.235,0-7.679-3.445-7.679-7.68c0-4.235,3.444-7.679,7.679-7.679S17.864,5.765,17.864,10C17.864,14.234,14.42,17.68,10.185,17.68 M10.824,10l2.842-2.844c0.178-0.176,0.178-0.46,0-0.637c-0.177-0.178-0.461-0.178-0.637,0l-2.844,2.841L7.341,6.52c-0.176-0.178-0.46-0.178-0.637,0c-0.178,0.176-0.178,0.461,0,0.637L9.546,10l-2.841,2.844c-0.178,0.176-0.178,0.461,0,0.637c0.178,0.178,0.459,0.178,0.637,0l2.844-2.841l2.844,2.841c0.178,0.178,0.459,0.178,0.637,0c0.178-0.176,0.178-0.461,0-0.637L10.824,10z"
                            ></path>
                            </svg>
                        </div>
                        <div>
                            <p
                            class="text-sm text-gray-700 dark:text-gray-200"
                            >
                                You are yet to make a deposit. <br>
                                Do so, and your deposit history should appear here.
                            </p>
                        </div>
                    </div>
                    <?php endif; ?>
                </div>       
            </div>
            
            <!-- Withdraw History card -->
            <div class="rounded-b-lg bg-white shadow-xs dark:bg-gray-800">
                <div
                class="p-4 mb-0 h-64 bg-blue-600 text-lg font-semibold text-purple-100 rounded-t-lg shadow-md focus:outline-none focus:shadow-outline-purple"
                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>Withdraw History</span>
                    </div>
                </div>
                <div class="bg-white rounded-b-lg shadow-xs dark:bg-gray-800 text-gray-700 dark:text-gray-200">
                 <?php $__empty_1 = true; $__currentLoopData = $withdrawals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $withdrawal): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <div class="flex items-center justify-between text-gray-700 dark:text-gray-200 border-b p-4">
                        <div>
                            <span class="text-lg font-semibold">
                                NGN <?php echo e($withdrawal->amount); ?></span>
                        </div>
                        <div>
                            <span class="text-sm">
                                <?php echo date('Y-m-d', strtotime($withdrawal->created_at)); ?> <br>
                                <?php if($withdrawal->status == 2): ?>
                                <span style="color:green">approved</span>
                                <?php elseif($withdrawal->status == 1): ?>
                                <span style="color:red">pending</span>
                                <?php endif; ?>
                            </span>
                        </div>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <p class="text-lg font-extralight text-center px-4 mt-2">
                        You haven't carried out any withdrawals yet <br>
                        
                    </p>
                    <?php endif; ?>
                </div>       
            </div>
        </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 /home/jangodri/public_html/resources/views/admin/user_info.blade.php ENDPATH**/ ?>