<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <div class="mb-12">
        <!-- Header -->
        <div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-6 mb-8">
            <div>
                <a href="<?php echo e(route('laporan.perolehan-marketing', request()->query())); ?>"
                    class="inline-flex items-center gap-2 text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-300 mb-4 transition-colors">
                    <i data-lucide="arrow-left" class="w-4 h-4"></i>
                    Kembali ke Laporan Marketing
                </a>
                <h1 class="text-4xl font-black tracking-tight dark:text-white">
                    <span class="bg-gradient-to-r from-blue-600 to-indigo-600 bg-clip-text text-transparent">
                        Detail Perolehan Marketing
                    </span>
                </h1>
                <p class="text-slate-500 dark:text-slate-400 text-sm mt-2">
                    <i data-lucide="user" class="w-4 h-4 inline mr-2"></i>
                    Detail mahasiswa yang didaftarkan oleh <?php echo e($marketing->name); ?>

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

        <!-- Info Marketing -->
        <div class="bg-gradient-to-r from-blue-500 to-indigo-600 rounded-2xl p-6 mb-6 text-white">
            <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                <div>
                    <p class="text-blue-100 text-sm">Nama Marketing</p>
                    <p class="text-2xl font-bold"><?php echo e($marketing->name); ?></p>
                </div>
                <div>
                    <p class="text-blue-100 text-sm">Kampus</p>
                    <p class="text-2xl font-bold"><?php echo e($marketing->kampus->nama ?? '-'); ?></p>
                </div>
                <div>
                    <p class="text-blue-100 text-sm">Total Perolehan</p>
                    <p class="text-2xl font-bold"><?php echo e(number_format($details->total())); ?> Mahasiswa</p>
                </div>
            </div>
        </div>

        <!-- Filter Tanggal -->
        <div class="bg-white dark:bg-[#1a1a2e] rounded-3xl border border-slate-200 dark:border-white/5 shadow-xl overflow-hidden mb-6">
            <div class="p-6 border-b border-slate-100 dark:border-white/5">
                <div class="flex items-center gap-3">
                    <div class="w-8 h-8 rounded-lg bg-violet-500/10 text-violet-500 flex items-center justify-center">
                        <i data-lucide="calendar" class="w-4 h-4"></i>
                    </div>
                    <div>
                        <h3 class="font-bold text-gray-900 dark:text-white">Filter Data</h3>
                        <p class="text-xs text-slate-500 dark:text-slate-400">Filter berdasarkan rentang tanggal</p>
                    </div>
                </div>
            </div>
            <div class="p-6">
                <form method="GET" class="grid grid-cols-1 md:grid-cols-3 gap-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">Tanggal Awal</label>
                        <input type="date" name="tanggal_awal" value="<?php echo e(request('tanggal_awal')); ?>"
                            class="w-full px-4 py-2 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl text-gray-700 dark:text-gray-300 focus:ring-2 focus:ring-violet-500 focus:border-transparent">
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">Tanggal Akhir</label>
                        <input type="date" name="tanggal_akhir" value="<?php echo e(request('tanggal_akhir')); ?>"
                            class="w-full px-4 py-2 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl text-gray-700 dark:text-gray-300 focus:ring-2 focus:ring-violet-500 focus:border-transparent">
                    </div>
                    <div class="flex items-end gap-2">
                        <button type="submit" class="px-4 py-2 bg-gradient-to-r from-violet-600 to-indigo-700 text-white rounded-xl text-sm font-medium hover:shadow-lg hover:shadow-violet-500/25 transition-all flex items-center gap-2">
                            <i data-lucide="search" class="w-4 h-4"></i>
                            Filter
                        </button>
                        <a href="<?php echo e(route('laporan.perolehan-marketing.detail', $marketing->id)); ?>"
                            class="px-4 py-2 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl text-sm font-medium text-slate-600 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-gray-700 transition-all flex items-center gap-2">
                            <i data-lucide="x" class="w-4 h-4"></i>
                            Reset
                        </a>
                    </div>
                </form>
            </div>
        </div>

        <!-- Summary Card: Statistik Sumber Input -->
        <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
            <div class="bg-white dark:bg-[#1a1a2e] rounded-2xl border border-slate-200 dark:border-white/5 p-4">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-slate-500 dark:text-slate-400 text-sm">Input oleh Marketing</p>
                        <p class="text-2xl font-bold text-blue-600 dark:text-blue-400">
                            <?php echo e(number_format($totalInputMarketing ?? 0)); ?>

                        </p>
                    </div>
                    <div class="w-12 h-12 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
                        <i data-lucide="user" class="w-6 h-6 text-blue-600 dark:text-blue-400"></i>
                    </div>
                </div>
                <div class="mt-2 w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2">
                    <?php
                        $totalAll = $details->total();
                        $percentageSelf = $totalAll > 0 ? (($totalInputMarketing ?? 0) / $totalAll) * 100 : 0;
                    ?>
                    <div class="bg-blue-600 h-2 rounded-full" style="width: <?php echo e($percentageSelf); ?>%"></div>
                </div>
                <p class="text-xs text-slate-400 dark:text-slate-500 mt-2"><?php echo e(number_format($percentageSelf, 1)); ?>% dari total</p>
            </div>

            <div class="bg-white dark:bg-[#1a1a2e] rounded-2xl border border-slate-200 dark:border-white/5 p-4">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-slate-500 dark:text-slate-400 text-sm">Input oleh Telemarketing</p>
                        <p class="text-2xl font-bold text-emerald-600 dark:text-emerald-400">
                            <?php echo e(number_format($totalInputTelemarketing ?? 0)); ?>

                        </p>
                    </div>
                    <div class="w-12 h-12 rounded-full bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center">
                        <i data-lucide="phone" class="w-6 h-6 text-emerald-600 dark:text-emerald-400"></i>
                    </div>
                </div>
                <div class="mt-2 w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2">
                    <?php
                        $percentageTele = $totalAll > 0 ? (($totalInputTelemarketing ?? 0) / $totalAll) * 100 : 0;
                    ?>
                    <div class="bg-emerald-600 h-2 rounded-full" style="width: <?php echo e($percentageTele); ?>%"></div>
                </div>
                <p class="text-xs text-slate-400 dark:text-slate-500 mt-2"><?php echo e(number_format($percentageTele, 1)); ?>% dari total</p>
            </div>
        </div>

        <!-- Summary Card: Statistik Herregistrasi -->
        <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
            <div class="bg-white dark:bg-[#1a1a2e] rounded-2xl border border-slate-200 dark:border-white/5 p-4">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-slate-500 dark:text-slate-400 text-sm">Total Herregistrasi</p>
                        <p class="text-2xl font-bold text-emerald-600 dark:text-emerald-400">
                            <?php echo e(number_format($totalHerregistrasi ?? 0)); ?>

                        </p>
                    </div>
                    <div class="w-12 h-12 rounded-full bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center">
                        <i data-lucide="credit-card" class="w-6 h-6 text-emerald-600 dark:text-emerald-400"></i>
                    </div>
                </div>
                <?php
                    $totalAll = $details->total();
                    $percentageHerregistrasi = $totalAll > 0 ? (($totalHerregistrasi ?? 0) / $totalAll) * 100 : 0;
                ?>
                <div class="mt-2 w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2">
                    <div class="bg-emerald-600 h-2 rounded-full" style="width: <?php echo e($percentageHerregistrasi); ?>%"></div>
                </div>
                <p class="text-xs text-slate-400 dark:text-slate-500 mt-2"><?php echo e(number_format($percentageHerregistrasi, 1)); ?>% dari total perolehan</p>
            </div>

            <div class="bg-white dark:bg-[#1a1a2e] rounded-2xl border border-slate-200 dark:border-white/5 p-4">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-slate-500 dark:text-slate-400 text-sm">Herregistrasi (Marketing)</p>
                        <p class="text-2xl font-bold text-blue-600 dark:text-blue-400">
                            <?php echo e(number_format($totalHerregistrasiSelf ?? 0)); ?>

                        </p>
                    </div>
                    <div class="w-12 h-12 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
                        <i data-lucide="user-check" class="w-6 h-6 text-blue-600 dark:text-blue-400"></i>
                    </div>
                </div>
            </div>

            <div class="bg-white dark:bg-[#1a1a2e] rounded-2xl border border-slate-200 dark:border-white/5 p-4">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-slate-500 dark:text-slate-400 text-sm">Herregistrasi (Telemarketing)</p>
                        <p class="text-2xl font-bold text-purple-600 dark:text-purple-400">
                            <?php echo e(number_format($totalHerregistrasiTele ?? 0)); ?>

                        </p>
                    </div>
                    <div class="w-12 h-12 rounded-full bg-purple-100 dark:bg-purple-900/30 flex items-center justify-center">
                        <i data-lucide="phone-call" class="w-6 h-6 text-purple-600 dark:text-purple-400"></i>
                    </div>
                </div>
            </div>
        </div>

        <!-- Tabel Detail Mahasiswa -->
        <div class="bg-white dark:bg-[#1a1a2e] rounded-3xl border border-slate-200 dark:border-white/5 shadow-xl overflow-hidden">
            <div class="overflow-x-auto">
                <table class="w-full">
                    <thead>
                        <tr class="bg-slate-50 dark:bg-white/5 border-b border-slate-200 dark:border-white/10">
                            <th class="text-left py-4 px-4 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider">No</th>
                            <th class="text-left py-4 px-4 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider">NIM</th>
                            <th class="text-left py-4 px-4 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider">Nama Mahasiswa</th>
                            <th class="text-left py-4 px-4 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider">Kampus / Prodi</th>
                            <th class="text-left py-4 px-4 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider">Sumber Input</th>
                            <th class="text-center py-4 px-4 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider">Aksi</th>
                        </tr>
                    </thead>
                    <tbody class="divide-y divide-slate-100 dark:divide-white/5">
                        <?php $__empty_1 = true; $__currentLoopData = $details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <?php
                                $teleFee = \App\Models\FeeTracking::where('mahasiswa_id', $item->mahasiswa_id)
                                    ->where('role', 'telemarketing')
                                    ->first();
                                $isFromTele = $teleFee ? true : false;
                                $inputBy = $isFromTele ? $teleFee->user->name : $marketing->name;
                            ?>
                            <tr class="hover:bg-slate-50 dark:hover:bg-white/5 transition-colors">
                                <td class="py-4 px-4 text-sm text-slate-600 dark:text-slate-400"><?php echo e($details->firstItem() + $index); ?></td>
                                <td class="py-4 px-4">
                                    <span class="inline-flex px-2 py-1 bg-slate-100 dark:bg-gray-800 rounded-md text-xs font-mono text-slate-600 dark:text-slate-400">
                                        <?php echo e($item->mahasiswa->nim ?? '-'); ?>

                                    </span>
                                </td>
                                <td class="py-4 px-4">
                                    <div class="flex items-center gap-2">
                                        <div class="w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
                                            <i data-lucide="user" class="w-4 h-4 text-blue-600 dark:text-blue-400"></i>
                                        </div>
                                        <span class="font-medium text-gray-900 dark:text-white"><?php echo e($item->mahasiswa->nama ?? '-'); ?></span>
                                    </div>
                                </td>
                                <td class="py-4 px-4">
                                    <div class="text-sm font-medium text-gray-900 dark:text-white"><?php echo e($item->mahasiswa->kampus->nama ?? '-'); ?></div>
                                    <div class="text-xs text-slate-500 dark:text-slate-400"><?php echo e($item->mahasiswa->prodi->nama ?? '-'); ?></div>
                                </td>
                                <td class="py-4 px-4">
                                    <?php if($isFromTele): ?>
                                        <span class="inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-400">
                                            <i data-lucide="phone" class="w-3 h-3"></i>
                                            Telemarketing
                                        </span>
                                    <?php else: ?>
                                        <span class="inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400">
                                            <i data-lucide="user" class="w-3 h-3"></i>
                                            Marketing
                                        </span>
                                    <?php endif; ?>
                                </td>
                                <td class="py-4 px-4 text-center">
                                    <button type="button"
                                        onclick="showDetailModal(
                                            '<?php echo e(addslashes($item->mahasiswa->nim ?? '-')); ?>',
                                            '<?php echo e(addslashes($item->mahasiswa->nama ?? '-')); ?>',
                                            '<?php echo e(addslashes($item->mahasiswa->kampus->nama ?? '-')); ?>',
                                            '<?php echo e(addslashes($item->mahasiswa->prodi->nama ?? '-')); ?>',
                                            '<?php echo e(addslashes($inputBy)); ?>',
                                            '<?php echo e($item->status); ?>',
                                            '<?php echo e($isFromTele ? 'telemarketing' : 'self'); ?>',
                                            '<?php echo e($item->created_at ? $item->created_at->format('d/m/Y') : '-'); ?>',
                                            '<?php echo e($item->tanggal_validasi_mahasiswa ? \Carbon\Carbon::parse($item->tanggal_validasi_mahasiswa)->format('d/m/Y') : '-'); ?>',
                                            '<?php echo e($item->tanggal_input_bayar ? \Carbon\Carbon::parse($item->tanggal_input_bayar)->format('d/m/Y') : '-'); ?>',
                                            '<?php echo e($item->tanggal_bayar ? \Carbon\Carbon::parse($item->tanggal_bayar)->format('d/m/Y') : '-'); ?>',
                                            '<?php echo e($item->tanggal_validasi_pembayaran ? \Carbon\Carbon::parse($item->tanggal_validasi_pembayaran)->format('d/m/Y') : '-'); ?>'
                                        )"
                                        class="text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 text-sm inline-flex items-center gap-1 transition-colors">
                                        <i data-lucide="eye" class="w-4 h-4"></i>
                                        Detail
                                    </button>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="6" class="py-12 px-4 text-center">
                                    <div class="w-16 h-16 mx-auto mb-4 rounded-full bg-slate-100 dark:bg-gray-800 flex items-center justify-center">
                                        <i data-lucide="inbox" class="w-8 h-8 text-slate-400 dark:text-slate-500"></i>
                                    </div>
                                    <h4 class="text-lg font-medium text-gray-900 dark:text-white mb-2">Belum Ada Data</h4>
                                    <p class="text-sm text-slate-500 dark:text-slate-400">Belum ada data mahasiswa yang didaftarkan</p>
                                </td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>

            <!-- Pagination -->
            <?php if($details->hasPages()): ?>
            <div class="p-6 border-t border-slate-100 dark:border-white/5">
                <?php echo e($details->appends(request()->query())->links()); ?>

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

    <!-- Modal Detail -->
    <div id="detailModal" class="fixed inset-0 z-50 hidden overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
        <div class="flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
            <div class="fixed inset-0 bg-gray-500 bg-opacity-75 dark:bg-gray-900 dark:bg-opacity-75 transition-opacity" aria-hidden="true" onclick="closeDetailModal()"></div>

            <div class="inline-block align-bottom bg-white dark:bg-[#1a1a2e] rounded-2xl text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-2xl sm:w-full">
                <div class="absolute top-0 right-0 pt-4 pr-4">
                    <button type="button" onclick="closeDetailModal()" class="text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400 focus:outline-none">
                        <i data-lucide="x" class="w-6 h-6"></i>
                    </button>
                </div>

                <div class="px-6 pt-6 pb-4">
                    <div class="flex items-center gap-3 mb-4">
                        <div class="w-10 h-10 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
                            <i data-lucide="info" class="w-5 h-5 text-blue-600 dark:text-blue-400"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-bold text-gray-900 dark:text-white">Detail Perolehan Mahasiswa</h3>
                            <p class="text-sm text-slate-500 dark:text-slate-400">Informasi lengkap perolehan mahasiswa</p>
                        </div>
                    </div>

                    <div class="grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-3">
                        <!-- Kolom Kiri -->
                        <div class="space-y-3">
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">NIM</span>
                                <span class="font-medium text-gray-900 dark:text-white" id="modalNIM">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Nama Mahasiswa</span>
                                <span class="font-medium text-gray-900 dark:text-white" id="modalNama">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Kampus</span>
                                <span class="text-gray-900 dark:text-white" id="modalKampus">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Program Studi</span>
                                <span class="text-gray-900 dark:text-white" id="modalProdi">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Diinput Oleh</span>
                                <span class="text-gray-900 dark:text-white" id="modalDiinputOleh">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Sumber Input</span>
                                <span id="modalSumberInput">-</span>
                            </div>
                        </div>

                        <!-- Kolom Kanan -->
                        <div class="space-y-3">
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Status Perolehan</span>
                                <span id="modalStatusFee">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Tanggal Input Mahasiswa</span>
                                <span class="text-gray-900 dark:text-white" id="modalTanggalDaftar">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Tanggal Validasi Mahasiswa</span>
                                <span class="text-gray-900 dark:text-white" id="modalTanggalValidasiMahasiswa">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Tanggal Input Her</span>
                                <span class="text-gray-900 dark:text-white" id="modalTanggalInputBayar">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Tanggal Bayar Her</span>
                                <span class="text-gray-900 dark:text-white" id="modalTanggalBayar">-</span>
                            </div>
                            <div class="flex justify-between items-center pb-2 border-b border-slate-100 dark:border-white/10">
                                <span class="text-sm text-slate-500 dark:text-slate-400">Tanggal Validasi Her</span>
                                <span class="text-gray-900 dark:text-white" id="modalTanggalValidasiPembayaran">-</span>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="bg-gray-50 dark:bg-gray-900 px-6 py-3 flex justify-end">
                    <button type="button" onclick="closeDetailModal()" class="px-4 py-2 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-300 dark:hover:bg-gray-600 transition">
                        Tutup
                    </button>
                </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>

<script>
    function showDetailModal(nim, nama, kampus, prodi, diinputOleh, statusFee, sumberInput,
        tanggalDaftar, tanggalValidasiMahasiswa, tanggalInputBayar,
        tanggalBayar, tanggalValidasiPembayaran) {
        // Isi data ke modal
        document.getElementById('modalNIM').innerText = nim;
        document.getElementById('modalNama').innerText = nama;
        document.getElementById('modalKampus').innerText = kampus;
        document.getElementById('modalProdi').innerText = prodi;
        document.getElementById('modalDiinputOleh').innerText = diinputOleh;
        document.getElementById('modalTanggalDaftar').innerText = tanggalDaftar || '-';
        document.getElementById('modalTanggalValidasiMahasiswa').innerText = tanggalValidasiMahasiswa || '-';
        document.getElementById('modalTanggalInputBayar').innerText = tanggalInputBayar || '-';
        document.getElementById('modalTanggalBayar').innerText = tanggalBayar || '-';
        document.getElementById('modalTanggalValidasiPembayaran').innerText = tanggalValidasiPembayaran || '-';

        // Status badge
        const statusColors = {
            'pending': 'bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-400',
            'approved': 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400',
            'rejected': 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400',
            'paid': 'bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400'
        };
        const statusClass = statusColors[statusFee] || 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-400';
        document.getElementById('modalStatusFee').innerHTML =
            `<span class="inline-flex px-2 py-1 text-xs rounded-full ${statusClass}">${statusFee || 'pending'}</span>`;

        // Sumber input badge
        if (sumberInput === 'telemarketing') {
            document.getElementById('modalSumberInput').innerHTML =
                '<span class="inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-400"><i data-lucide="phone" class="w-3 h-3"></i> Telemarketing</span>';
        } else {
            document.getElementById('modalSumberInput').innerHTML =
                '<span class="inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400"><i data-lucide="user" class="w-3 h-3"></i> Marketing</span>';
        }

        // Tampilkan modal
        document.getElementById('detailModal').classList.remove('hidden');
        document.body.style.overflow = 'hidden';

        // Re-init icons
        if (typeof lucide !== 'undefined') {
            lucide.createIcons();
        }
    }

    function closeDetailModal() {
        document.getElementById('detailModal').classList.add('hidden');
        document.body.style.overflow = 'auto';
    }

    // Tutup modal dengan tombol ESC
    document.addEventListener('keydown', function(event) {
        if (event.key === 'Escape') {
            closeDetailModal();
        }
    });
</script>
<?php /**PATH C:\Users\User\Documents\K2-PROJECTS\k2-sipema\resources\views/laporan/perolehan-marketing-detail.blade.php ENDPATH**/ ?>