<?php $__env->startSection('page-title'); ?>
    <?php echo e(__('Manage Archive Application')); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
    <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>"><?php echo e(__('Home')); ?></a></li>

    <li class="breadcrumb-item"><?php echo e(__('Archive Application')); ?></li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">

        <div class="col-xl-12">
            <div class="card">
                <div class="card-header card-body table-border-style">
                    
                    <div class="table-responsive">
                        <table class="table" id="pc-dt-simple">
                            <thead>
                                <tr>
                                    <th><?php echo e(__('Name')); ?></th>
                                    <th><?php echo e(__('Applied For')); ?></th>
                                    <th><?php echo e(__('Rating')); ?></th>
                                    <th><?php echo e(__('Applied at')); ?></th>
                                    <th><?php echo e(__('Resume')); ?></th>
                                    <th><?php echo e(__('Action')); ?></th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $archive_application; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $application): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><a class="btn btn-outline-primary"
                                                href="<?php echo e(route('job-application.show', \Crypt::encrypt($application->id))); ?>">
                                                <?php echo e($application->name); ?></a></td>
                                        <td><?php echo e(!empty($application->jobs) ? $application->jobs->title : '-'); ?></td>
                                        <td>
                                            <?php for($i = 1; $i <= 5; $i++): ?>
                                                <?php if($application->rating < $i): ?>
                                                    <?php if(is_float($application->rating) && round($application->rating) == $i): ?>
                                                        <i class="text-warning fas fa-star-half-alt"></i>
                                                    <?php else: ?>
                                                        <i class="fas fa-star"></i>
                                                    <?php endif; ?>
                                                <?php else: ?>
                                                    <i class="text-warning fas fa-star"></i>
                                                <?php endif; ?>
                                            <?php endfor; ?>
                                        </td>
                                        <td><?php echo e(\Auth::user()->dateFormat($application->created_at)); ?></td>
                                        <td>
                                            <?php
                                                $resumes = \App\Models\Utility::get_file('uploads/job/resume');
                                            ?>
                                            <?php if(!empty($application->resume)): ?>
                                                <div class="dt-buttons">
                                                    <span class="action-btn bg-primary me-2">
                                                        <a class="mx-3 btn btn-sm align-items-center"
                                                            href="<?php echo e($resumes . '/' . $application->resume); ?>"
                                                            data-bs-toggle="tooltip"
                                                            data-bs-original-title="<?php echo e(__('Download')); ?>" download><span
                                                                class="text-white"><i
                                                                    class="ti ti-download "></i></span></a>
                                                    </span>
                                                    <div class="action-btn bg-secondary ">
                                                        <a class="mx-3 btn btn-sm align-items-center"
                                                            href="<?php echo e($resumes . '/' . $application->resume); ?>"
                                                            target="_blank">
                                                            <span class="text-white"><i class="ti ti-crosshair "
                                                                    data-bs-toggle="tooltip"
                                                                    data-bs-original-title="<?php echo e(__('Preview')); ?>"></i></span>
                                                        </a>
                                                    </div>
                                                </div>
                                            <?php else: ?>
                                                -
                                            <?php endif; ?>


                                        </td>
                                        <td>
                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Show Job Application')): ?>
                                                <div class="dt-buttons">
                                                    <span>
                                                        <div class="action-btn bg-warning">

                                                            <a class="mx-3 btn btn-sm  align-items-center"
                                                                data-bs-toggle="tooltip" title="<?php echo e(__('View')); ?>"
                                                                data-title="<?php echo e(__('Details')); ?>"
                                                                href="<?php echo e(route('job-application.show', \Crypt::encrypt($application->id))); ?>">
                                                                <span class="text-white"><i class="ti ti-eye"></i></span></a>
                                                        </div>
                                                    </span>
                                                <?php endif; ?>


                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>



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

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/payraty/hris/resources/views/jobApplication/candidate.blade.php ENDPATH**/ ?>