<!-- Bootstrap Table with Header - Dark -->
<div class="card">
    <div class="card-header">
        <h5>Tabela de candidaturas</h5>
        <form method="GET" action="<?php echo e(route('candidaturas.index')); ?>" id="formSearch">
        <div>
            <div class="input-group input-group-merge">
            <span id="basic-icon-default-fullname2" class="input-group-text"
                ><i class="icon-base bx bx-search"></i
            ></span>
                <input
                type="text"
                class="form-control"
                id="search"
                name="search"
                placeholder="Pesquisar"
                value="<?php echo e(request('search')); ?>"
                aria-label="Pesquisar"
                aria-describedby="basic-icon-default-fullname2" />

            </div>
        </div>
        </form>
    </div>
    <div class="table-responsive text-nowrap">
        <table class="table">
            <thead class="table-dark">
                <tr>
                <th>Nome do candidato</th>
                <th>E-mail do candidato</th>
                <th>Número de candidatura</th>
                <th>Vaga</th>
                <th>Status</th>
                <th>Anexos</th>
                <th>Acções</th>
                </tr>
            </thead>
            <tbody class="table-border-bottom-0">
                <?php if($candidaturas->isEmpty()): ?>
                    <tr>
                        <td colspan="7" class="text-center" style="font-size: 15px;">
                            Nenhum resultado encontrado
                        </td>
                    </tr>
                <?php else: ?>
                    <?php $__currentLoopData = $candidaturas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $candidatura): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($candidatura->nome_candidato); ?></td>
                        <td><?php echo e($candidatura->email_candidato); ?></td>
                        <td class="text-primary"><?php echo e($candidatura->numero_registro); ?></td>
                        <td><?php echo e($candidatura->vaga->nome_vaga); ?></td>
                        <td><?php if($candidatura->status == 'Pendente'): ?>
                            <span class="badge bg-label-warning me-1"><?php echo e($candidatura->status); ?></span>
                            <?php elseif($candidatura->status == 'Aprovado'): ?>
                            <span class="badge bg-label-success me-1"><?php echo e($candidatura->status); ?></span>
                            <?php else: ?>
                            <span class="badge bg-label-danger me-1"><?php echo e($candidatura->status); ?></span>
                            <?php endif; ?>
                        </td>
                        <td>
                            <?php if($candidatura->anexo_id): ?>

                            <?php else: ?>

                            <?php endif; ?>
                        </td>
                        <td>
                            <div class="dropdown">
                            <button type="button" class="btn p-0 dropdown-toggle hide-arrow" data-bs-toggle="dropdown">
                                <i class="icon-base bx bx-dots-vertical-rounded"></i>
                            </button>
                            <div class="dropdown-menu">
                                <a class="dropdown-item" data-bs-toggle="modal" href="#modal_editar_candidatura<?php echo e($candidatura->candidatura_id); ?>"
                                ><i class="icon-base bx bx-edit-alt me-1"></i> Validar</a
                                >
                                <a class="dropdown-item" href="<?php echo e(route('candidaturas.destroy', $candidatura->candidatura_id)); ?>"
                                ><i class="icon-base bx bx-trash me-1"></i> Eliminar</a
                                >
                            </div>
                            </div>
                        </td>
                    </tr>
                    <?php echo $__env->make('dashboard.admin.pages.candidaturas._includes.modal-editar-candidatura', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>
<!--/ Bootstrap Table with Header Dark -->

<?php /**PATH C:\laragon\www\website-van_thanh\resources\views/dashboard/admin/pages/candidaturas/_includes/tabela-candidaturas.blade.php ENDPATH**/ ?>