
<?php $__env->startSection('title', 'Visa Application List :: E-Visa'); ?>
<?php $__env->startSection('content'); ?>
<div class="page-inner mt-5 pt-5">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title">Visa Application List</h4>
                </div>
                <div class="card-body">
                    <button class="btn btn-black btn-sm mb-2" title="Go Back" onclick="history.back();">
                        <span class="btn-label">
                            <i class="fas fa-reply"></i>
                        </span>
                        Go Back
                    </button>
                    <a href="<?php echo e(route('apply.now')); ?>" class="btn btn-success btn-sm mb-2" title="Add New">
                        <span class="btn-label">
                            <i class="fas fa-plus"></i>
                        </span>
                        Add New Application
                    </a>
                    <div class="table-responsive">
                        <table id="basic-datatables" class="display table table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>Sl</th>
                                    <th>Name</th>
                                    <th>Passport No</th>
                                    <th>Tracking No</th>
                                    <th>Status</th>
                                    <th>Date</th>
                                    <th class="text-center">Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $applications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $application): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($loop->iteration); ?></td>
                                    <td><?php echo e($application->personalInfo->passport_number ?? '—'); ?></td>
                                    <td><?php echo e($application->personalInfo->family_name ?? '—'); ?></td>
                                    <td>
                                        <?php echo e($application->tracking_number); ?>

                                    </td>
                                    <td><?php echo e($application->status ?? '—'); ?></td>
                                    <td><?php echo e($application->created_at->format('d F Y') ?? '—'); ?></td>
                                    <td>
                                        <div class="btn-list d-flex justify-content-center gap-1">
                                            <a href="<?php echo e(route('application.pdf.download', $application->id)); ?>" class="btn btn-sm btn-danger">
                                                <i class="fas fa-file-pdf"></i>
                                            </a>

                                            <a href="<?php echo e(route('application.pdf.view', $application->id)); ?>" class="btn btn-outline-danger me-2">
                                                <i class="fas fa-eye me-1"></i>
                                            </a>
                                            <a class="btn btn-sm btn-warning" href="<?php echo e(route('application.submitted', ['application' => $application->id])); ?>" title="View Application">
                                                <span class="btn-label">
                                                    <i class="far fa-eye"></i>
                                                </span>
                                            </a>
                                            <a class="btn btn-sm btn-secondary" href="#" title="Edit">
                                                <span class="btn-label">
                                                    <i class="far fa-edit"></i>
                                                </span>
                                            </a>
                                            <form action="<?php echo e(route('application.delete', ['id' => $application->id])); ?>" method="post">
                                                <button class="btn btn-danger btn-sm delete_unique" type="submit" title="Delete Application">
                                                    <span class="btn-label">
                                                        <i class="far fa-trash-alt"></i>
                                                    </span>
                                                </button>
                                                <?php echo csrf_field(); ?>
                                                <?php echo method_field('delete'); ?>
                                            </form>
                                        </div>
                                    </td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('script'); ?>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('backend.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\xampp\htdocs\e-visa update\resources\views/backend/cms/application/index.blade.php ENDPATH**/ ?>