<?php $__env->startSection('title', 'Pendidikan Lanjut'); ?>

<?php $__env->startSection('content'); ?>
    <div class="flex justify-between items-center mb-6">
        <h1 class="text-2xl font-bold text-gray-800">Pendidikan Lanjut</h1>
        <a href="<?php echo e(route('alumni.pendidikan.create')); ?>" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
            <i class="fas fa-plus mr-2"></i> Tambah Pendidikan
        </a>
    </div>

    <div class="bg-white rounded-lg shadow-sm overflow-hidden">
        <?php if(count($pendidikanLanjut) > 0): ?>
            <div class="divide-y divide-gray-200">
                <?php $__currentLoopData = $pendidikanLanjut; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pendidikan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="p-6 hover:bg-gray-50 transition-colors">
                        <div class="flex justify-between items-start">
                            <div>
                                <h2 class="text-lg font-semibold text-gray-800"><?php echo e($pendidikan->jenjang); ?> <?php echo e($pendidikan->program_studi); ?></h2>
                                <p class="text-md text-gray-600"><?php echo e($pendidikan->institusi); ?></p>
                                
                                <div class="mt-2 flex items-center text-sm text-gray-500">
                                    <i class="far fa-calendar-alt mr-2"></i>
                                    <span>
                                        <?php echo e($pendidikan->tahun_masuk); ?> - 
                                        <?php echo e($pendidikan->tahun_lulus ?: 'Sekarang'); ?>

                                    </span>
                                </div>
                                
                                <div class="mt-3">
                                    <?php if($pendidikan->sedang_berjalan): ?>
                                        <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
                                            <i class="fas fa-check-circle mr-1"></i> Sedang Berjalan
                                        </span>
                                    <?php else: ?>
                                        <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">
                                            <i class="fas fa-graduation-cap mr-1"></i> Selesai
                                        </span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="flex space-x-2">
                                <a href="<?php echo e(route('alumni.pendidikan.show', $pendidikan->id)); ?>" class="px-3 py-1 text-blue-600 bg-blue-100 rounded-md hover:bg-blue-200">
                                    <i class="fas fa-eye"></i>
                                </a>
                                <a href="<?php echo e(route('alumni.pendidikan.edit', $pendidikan->id)); ?>" class="px-3 py-1 text-yellow-600 bg-yellow-100 rounded-md hover:bg-yellow-200">
                                    <i class="fas fa-edit"></i>
                                </a>
                                <button type="button" class="px-3 py-1 text-red-600 bg-red-100 rounded-md hover:bg-red-200 delete-btn" data-id="<?php echo e($pendidikan->id); ?>">
                                    <i class="fas fa-trash-alt"></i>
                                </button>
                                <form id="delete-form-<?php echo e($pendidikan->id); ?>" action="<?php echo e(route('alumni.pendidikan.destroy', $pendidikan->id)); ?>" method="POST" class="hidden">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                </form>
                            </div>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        <?php else: ?>
            <div class="p-8 text-center">
                <div class="bg-gray-50 rounded-lg p-6 inline-block mb-4">
                    <i class="fas fa-book text-gray-400 text-4xl"></i>
                </div>
                <h2 class="text-xl font-semibold text-gray-800 mb-2">Belum Ada Data Pendidikan Lanjut</h2>
                <p class="text-gray-600 mb-6">Anda belum menambahkan riwayat pendidikan lanjut. Jika Anda melanjutkan pendidikan, tambahkan data pendidikan lanjut untuk melengkapi profil Anda.</p>
                <a href="<?php echo e(route('alumni.pendidikan.create')); ?>" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
                    <i class="fas fa-plus mr-2"></i> Tambah Pendidikan
                </a>
            </div>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
<script>
    document.addEventListener('DOMContentLoaded', function() {
        const deleteButtons = document.querySelectorAll('.delete-btn');
        
        deleteButtons.forEach(button => {
            button.addEventListener('click', function() {
                const id = this.getAttribute('data-id');
                
                if (confirm('Apakah Anda yakin ingin menghapus data pendidikan lanjut ini?')) {
                    document.getElementById(`delete-form-${id}`).submit();
                }
            });
        });
    });
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Source Code\STIAB Jinarakkhita Lampung\Tracer-Study\resources\views/alumni/pendidikan/index.blade.php ENDPATH**/ ?>