Your IP : 216.73.216.91


Current Path : /var/www/html/LLCF-APP/storage/framework/views/
Upload File :
Current File : /var/www/html/LLCF-APP/storage/framework/views/272a0c90409038a63a8ffdd50e381dbf.php

<?php $__env->startSection('css'); ?>
<style>
    .table td {
        white-space: unset;
    }

    .swal2-confirm.red-button {
        background-color: red !important;
        border-color: red !important;
        color: white !important;
    }
</style>
<?php $__env->stopSection(); ?>

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

<!-- Page Header -->
<div class="content-header">
  <div class="container-fluid">
    <div class="row mb-2">
      <div class="col-sm-6">
        <h1 class="m-0">Voucher Expenses</h1>
      </div>
      <div class="col-sm-6">
        <ol class="breadcrumb float-sm-right">
          <li class="breadcrumb-item">
            <a href="<?php echo e(route('admin.dashboard')); ?>">Dashboard</a>
          </li>
          <li class="breadcrumb-item active">Voucher Expenses</li>
        </ol>
      </div>
    </div>
  </div>
</div>

<!-- Content -->
<div class="content">
  <div class="container-fluid">
    <?php echo $__env->make('include.messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <!-- Filter Form -->
    <div class="card mb-3">
      <div class="card-body pt-3 pb-1">
        <form method="GET" action="<?php echo e(route('admin.voucher-expenses.index')); ?>">
          <div class="form-row align-items-end">

            <div class="col-md-4 mb-2">
              <input
                type="text"
                name="title"
                value="<?php echo e(request('title')); ?>"
                class="form-control"
                placeholder="Search by title"
              >
            </div>

            <div class="col-md-3 mb-2">
              <label class="mb-1">From Date</label>
              <input
                type="date"
                name="date_from"
                value="<?php echo e(request('date_from')); ?>"
                class="form-control"
              >
            </div>

            <div class="col-md-3 mb-2">
              <label class="mb-1">To Date</label>
              <input
                type="date"
                name="date_to"
                value="<?php echo e(request('date_to')); ?>"
                class="form-control"
              >
            </div>

            <div class="col-md-2 mb-2 d-flex gap-2">
              <button type="submit" class="btn btn-primary mr-2">
                <i class="fas fa-search"></i> Filter
              </button>
              <a href="<?php echo e(route('admin.voucher-expenses.index')); ?>" class="btn btn-secondary">
                <i class="fas fa-times-circle"></i> Reset
              </a>
            </div>

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

    <!-- Table -->
    <div class="card">
      <div class="card-header">
        <div class="d-flex justify-content-between align-items-center">
          <h3 class="card-title mb-0">Voucher Expense List</h3>
          <a class="btn btn-primary" href="<?php echo e(route('admin.voucher-expenses.create')); ?>">
            <i class="fas fa-plus"></i>
          </a>
        </div>
      </div>

      <div class="card-body p-0">

        <!-- Export Buttons -->
        <div class="mb-3 d-flex justify-content-start p-2">
          <a
            href="<?php echo e(route('admin.voucher-expenses.export.pdf', request()->query())); ?>"
            class="btn btn-danger mr-2"
          >
            <i class="fas fa-file-pdf"></i> Export PDF
          </a>

          <a
            href="<?php echo e(route('admin.voucher-expenses.export.csv', request()->query())); ?>"
            class="btn btn-success"
          >
            <i class="fas fa-file-csv"></i> Export CSV
          </a>
        </div>

        <table class="table table-striped">
          <thead>
            <tr>
              <th>Title</th>
              <th>Created At</th>
              <th class="text-center">Action</th>
            </tr>
          </thead>
          <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $voucherExpenses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $expense): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
              <tr>
                <td><?php echo e($expense->title); ?></td>
                <td><?php echo e($expense->created_at?->format('d M Y')); ?></td>
                <td class="text-center">
                  <div class="btn-group">
                    <a
                      href="<?php echo e(route('admin.voucher-expenses.edit', $expense->id)); ?>"
                      class="btn btn-default btn-sm"
                    >
                      <i class="fas fa-edit"></i>
                    </a>

                    <form
                      class="delete-expense-form"
                      action="<?php echo e(route('admin.voucher-expenses.destroy', $expense->id)); ?>"
                      method="POST"
                    >
                      <?php echo csrf_field(); ?>
                      <?php echo method_field('DELETE'); ?>
                      <button type="submit" class="btn btn-default btn-sm">
                        <i class="fas fa-trash"></i>
                      </button>
                    </form>
                  </div>
                </td>
              </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
              <tr>
                <td colspan="3" class="text-center">
                  No voucher expenses found.
                </td>
              </tr>
            <?php endif; ?>
          </tbody>
        </table>
      </div>

      <?php if($voucherExpenses->total() > 10): ?>
        <div class="card-footer">
          <div class="d-flex justify-content-end">
            <?php echo e($voucherExpenses->appends(request()->query())->links('vendor.pagination.bootstrap-4')); ?>

          </div>
        </div>
      <?php endif; ?>
    </div>
  </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
<script>
  $(document).ready(function () {
    $(".delete-expense-form").on("submit", function (e) {
      e.preventDefault();

      Swal.fire({
        title: "<strong>Are you sure?</strong>",
        icon: "warning",
        html: `<p>Do you really want to delete this voucher expense?</p>`,
        showCloseButton: true,
        showCancelButton: true,
        focusConfirm: false,
        confirmButtonText: `<i class="fa fa-trash"></i> Yes, delete it!`,
        cancelButtonText: `<i class="fa fa-times"></i> Cancel`,
        allowOutsideClick: false,
        customClass: {
          confirmButton: 'red-button'
        }
      }).then((result) => {
        if (result.isConfirmed) {
          this.submit();
        }
      });
    });
  });
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.default', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/LLCF-APP/resources/views/admin/voucher-expenses/index.blade.php ENDPATH**/ ?>