<?php $__env->startSection('title', 'Detail Jurnal'); ?>
<?php $__env->startSection('page-title', 'Detail Jurnal'); ?>

<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-header bg-white">
        <div class="d-flex justify-content-between align-items-center">
            <div>
                <h5 class="mb-0"><i class="fas fa-book me-2"></i>Detail Jurnal Harian</h5>
                <small class="text-muted">Informasi lengkap jurnal kegiatan magang</small>
            </div>
            <a href="<?php echo e(route('jurnal')); ?>" class="btn btn-outline-secondary btn-sm">
                <i class="fas fa-arrow-left me-1"></i>Kembali
            </a>
        </div>
    </div>
    
    <div class="card-body">
        <div class="row align-items-start">
            <!-- Kolom kiri -->
            <div class="col-md-8">
                <div class="mb-4">
                    <div class="row mb-3">
                        <div class="col-sm-3">
                            <strong>Tanggal:</strong>
                        </div>
                        <div class="col-sm-9">
                            <?php
                            $tanggal = \Carbon\Carbon::parse($jurnal->tanggal);
                            $hariIndonesia = ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'];
                            $bulanIndonesia = ['', 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'];
                            ?>
                            <span class="fw-bold"><?php echo e($hariIndonesia[$tanggal->dayOfWeek]); ?>, <?php echo e($tanggal->day); ?> <?php echo e($bulanIndonesia[$tanggal->month]); ?> <?php echo e($tanggal->year); ?></span>
                        </div>
                    </div>

                    <div class="row mb-3">
                        <div class="col-sm-3">
                            <strong>Status:</strong>
                        </div>
                        <div class="col-sm-9">
                            <?php if($jurnal->status_verifikasi == 'pending'): ?>
                                <span class="badge bg-warning text-dark fs-6">
                                    <i class="fas fa-clock"></i> Menunggu Verifikasi
                                </span>
                            <?php elseif($jurnal->status_verifikasi == 'diterima'): ?>
                                <span class="badge bg-success fs-6">
                                    <i class="fas fa-check"></i> Diterima
                                </span>
                            <?php else: ?>
                                <span class="badge bg-danger fs-6">
                                    <i class="fas fa-times"></i> Ditolak
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>

                    <div class="row mb-4">
                        <div class="col-sm-3">
                            <strong>Perencanaan Kegiatan:</strong>
                        </div>
                        <div class="col-sm-9">
                            <div class="bg-light p-3 rounded">
                                <?php echo e($jurnal->perencanaan_kegiatan); ?>

                            </div>
                        </div>
                    </div>

                    <div class="row mb-4">
                        <div class="col-sm-3">
                            <strong>Pelaksanaan Kegiatan:</strong>
                        </div>
                        <div class="col-sm-9">
                            <div class="bg-light p-3 rounded">
                                <?php echo e($jurnal->pelaksanaan_kegiatan); ?>

                            </div>
                        </div>
                    </div>

                    <?php if($jurnal->catatan_instruktur): ?>
                    <div class="row mb-4">
                        <div class="col-sm-3">
                            <strong>Catatan Instruktur:</strong>
                        </div>
                        <div class="col-sm-9">
                            <div class="bg-info bg-opacity-10 border border-info p-3 rounded">
                                <i class="fas fa-comment-alt me-2 text-info"></i>
                                <?php echo e($jurnal->catatan_instruktur); ?>

                            </div>
                        </div>
                    </div>
                    <?php endif; ?>
                </div>

                <!-- Tombol Aksi -->
                <?php if($jurnal->status_verifikasi == 'pending' || $jurnal->status_verifikasi == 'ditolak'): ?>
                <div class="d-flex gap-2">
                    <button type="button" class="btn btn-warning" 
                        onclick="editJurnal(<?php echo e($jurnal->id); ?>, '<?php echo e(\Carbon\Carbon::parse($jurnal->tanggal)->format('Y-m-d')); ?>', '<?php echo e(addslashes($jurnal->perencanaan_kegiatan)); ?>', '<?php echo e(addslashes($jurnal->pelaksanaan_kegiatan)); ?>')">
                        <i class="fas fa-edit me-1"></i>Edit Jurnal
                    </button>
                    <button type="button" class="btn btn-danger" onclick="hapusJurnal(<?php echo e($jurnal->id); ?>)">
                        <i class="fas fa-trash me-1"></i>Hapus Jurnal
                    </button>
                </div>
                <?php endif; ?>
            </div>

            <!-- Kolom kanan -->
            <div class="col-md-4">
                <div class="card bg-light h-100">
                    <div class="card-body">
                        <h6 class="card-title"><i class="fas fa-info-circle me-2"></i>Informasi</h6>
                        <ul class="list-unstyled mb-0">
                            <?php if($jurnal->status_verifikasi == 'pending'): ?>
                                <li><i class="fas fa-clock text-warning me-2"></i>Jurnal sedang menunggu verifikasi</li>
                                <li><i class="fas fa-edit text-info me-2"></i>Anda masih bisa mengedit jurnal ini</li>
                            <?php elseif($jurnal->status_verifikasi == 'diterima'): ?>
                                <li><i class="fas fa-check text-success me-2"></i>Jurnal telah diverifikasi</li>
                                <li><i class="fas fa-lock text-secondary me-2"></i>Jurnal tidak dapat diedit lagi</li>
                            <?php else: ?>
                                <li><i class="fas fa-times text-danger me-2"></i>Jurnal ditolak</li>
                                <li><i class="fas fa-edit text-warning me-2"></i>Silakan perbaiki dan kirim ulang</li>
                            <?php endif; ?>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<?php echo $__env->make('siswa.jurnal.edit', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php echo $__env->make('siswa.jurnal.hapus', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<?php echo $__env->make('siswa.jurnal.script', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.siswa', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\presensi-magang\resources\views/siswa/jurnal/detail.blade.php ENDPATH**/ ?>