

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

<div class="container mt-4">

<h3>Applications List</h3>


<form method="GET" class="row mb-3">

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

<div class="col-md-3">
<select name="status" class="form-select">
<option value="">All Status</option>
<option value="pending" <?php echo e(request('status')=='pending'?'selected':''); ?>>Pending</option>
<option value="review" <?php echo e(request('status')=='review'?'selected':''); ?>>Review</option>
<option value="approved" <?php echo e(request('status')=='approved'?'selected':''); ?>>Approved</option>
<option value="rejected" <?php echo e(request('status')=='rejected'?'selected':''); ?>>Rejected</option>
</select>
</div>

<div class="col-md-2">
<button class="btn btn-dark w-100">Filter</button>
</div>

</form>



<div class="table-responsive">
<table class="table table-bordered table-hover">

<thead class="table-dark">
<tr>
<th>ID</th>
<th>Name</th>
<th>Mobile</th>
<th>NID</th>
<th>Status</th>
<th>Created</th>
<th>Action</th>
</tr>
</thead>

<tbody>

<?php $__empty_1 = true; $__currentLoopData = $applications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $app): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>

<tr>
<td><?php echo e($app->id); ?></td>
<td><?php echo e($app->full_name); ?></td>
<td><?php echo e($app->mobile); ?></td>
<td><?php echo e($app->nid); ?></td>

<td>
<span class="badge bg-<?php echo e($app->status=='approved' ? 'success' : 
($app->status=='rejected' ? 'danger' : 
($app->status=='review' ? 'warning' : 'secondary'))); ?>">
<?php echo e(ucfirst($app->status)); ?>

</span>
</td>

<td><?php echo e($app->created_at->format('d M Y')); ?></td>

<td>
<a href="<?php echo e(url('/application/'.$app->id)); ?>"
class="btn btn-sm btn-info">
View
</a>

<a href="<?php echo e(url('/application/'.$app->id.'/edit')); ?>"
class="btn btn-sm btn-success">
Edit
</a>
</td>

</tr>

<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>

<tr>
<td colspan="7" class="text-center">No Applications Found</td>
</tr>

<?php endif; ?>

</tbody>

</table>
</div>


<div class="mt-3">
<?php echo e($applications->withQueryString()->links()); ?>

</div>

</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/dhakasupplier/bdcrimewatch.com/resources/views/application/index.blade.php ENDPATH**/ ?>