<?php echo $__env->make('admin::layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php
use App\Models\AdminDetails;
?>
<main id="main-container">
        <!-- Hero -->
        <div class="bg-body-light">
          <div class="content content-full">
            <div class="d-flex flex-column flex-sm-row justify-content-sm-between align-items-sm-center">
              <h1 class="flex-grow-1 fs-3 fw-semibold my-2 my-sm-3">Customers</h1>
              <nav class="flex-shrink-0 my-2 my-sm-0 ms-sm-3" aria-label="breadcrumb">
                <ol class="breadcrumb">
                  <li class="breadcrumb-item">Dashboard</li>
                  <li class="breadcrumb-item">Users</li>
                  <li class="breadcrumb-item active" aria-current="page">Customers</li>
                </ol>
              </nav>
            </div>
          </div>
        </div>
        <!-- END Hero -->

        <!-- Page Content -->
        <div class="content">
          <!-- Your Block -->
          <div class="block block-rounded">
            <div class="block-header block-header-default">
              <h3 class="block-title">Customers</h3>
            </div>
            <div class="block-content">
            <?php if(Session::has('success')): ?> <div class="alert alert-success mt-2 mb-2"><?php echo e(Session::get('success')); ?></div><?php endif; ?>
            <?php if(Session::has('fail')): ?> <div class="alert alert-danger mt-2 mb-2"><?php echo e(Session::get('fail')); ?></div><?php endif; ?>
            <table  id="example" class="custom-datatable-no-export display responsive nowrap" style="width:100%">
                <thead>
                  <tr>
                  <th>Customer Name</th>
                  <!-- <th>Email</th> -->
                  <th>Customer Type</th>
                  <th>Phone</th>
                  <th>Email</th>
                  <!-- <th>Company Name</th>
                  <th>VAT No</th>
                  <th>KVK No</th>
                  <th>Country</th>
                  <th>Tax ID</th>
                  <th>Payment Terms</th>
                  <th>Grade</th>
                  <th>Discount</th>
                  <th>Loyalty Info</th>
                  <th>Notes</th> -->
                  <th>status</th>
                  <th>Actions</th>
                  </tr>
                </thead>
                <tbody>
                <?php foreach($customers as $customer) {
                ?>
                  <tr>
                    <td class="fw-semibold">
                      <?php echo e($customer->customerDetails->customer_name); ?>

                    </td>
                    <!-- <td class="fw-semibold">
                      <?php echo e($customer->email); ?>

                    </td> -->
                    <td class="fw-semibold">
                      <?php echo e($customer->customerDetails->customer_type); ?>

                    </td>
                    <td class="fw-semibold">
                      <?php echo e($customer->customerDetails->phone); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->email); ?>

                    </td>
                    <!-- <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->company_name); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->vat_no); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->kvk_no); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->country); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->tax_id); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->payment_terms); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->grade); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->discount); ?>

                    </td>
                    <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->loyalty_info); ?>

                    </td>
                     <td class="fw-semibold">
                       <?php echo e($customer->customerDetails->notes); ?>

                    </td> -->
                    <td class="fw-semibold">
                    <?php if($customer->status == "active") { ?>
                        <span class="badge bg-success">Active</span>
                    <?php } else { ?>
                        <span class="badge bg-danger">Inactive</span>
                    <?php } ?>
                    </td>
                    <td class="text-center">
                        <div class="btn-group">
                        <a href="<?php echo e(url('admin/edit-customer/'.$customer->id.'')); ?>" ><button type="button" class="btn btn-sm btn-alt-primary js-bs-tooltip-enabled" data-bs-toggle="tooltip" aria-label="Edit" data-bs-original-title="Edit">
                            <i class="fa fa-pencil-alt"></i>
                          </button></a>
                          <a href="<?php echo e(url('admin/activate-customer/'.$customer->id.'')); ?>" ><button type="button" class="btn btn-sm btn-alt-success js-bs-tooltip-enabled" data-bs-toggle="tooltip" aria-label="Activate" data-bs-original-title="Activate">
                            <i class="fa fa-check"></i>
                          </button></a>
                          <a href="<?php echo e(url('admin/deactivate-customer/'.$customer->id.'')); ?>" ><button type="button" class="btn btn-sm btn-alt-warning js-bs-tooltip-enabled" data-bs-toggle="tooltip" aria-label="Deactivate" data-bs-original-title="Deactivate">
                            <i class="fa fa-times"></i>
                          </button></a>
                          <a href="<?php echo e(url('admin/delete-customer/'.$customer->id.'')); ?>" onclick="return confirm('Are you sure you want to delete this ?');"><button type="button" class="btn btn-sm btn-alt-danger js-bs-tooltip-enabled" data-bs-toggle="tooltip" aria-label="Deactivate" data-bs-original-title="Deactivate">
                            <i class="fa fa-trash"></i>
                          </button></a>
                        </div>
                      </td>
                  </tr>
                <?php } ?>
                </tbody>
              </table>
            </div>
          </div>
          <!-- END Your Block -->
        </div>
        <!-- END Page Content -->
</main>
<!-- END Main Container -->
<?php echo $__env->make('admin::layouts.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u446954234/domains/orionerp.xyz/public_html/cus118-napaskitchen/Modules/Admin/resources/views/user/customers.blade.php ENDPATH**/ ?>