<?php $__env->startSection('title', 'Buat Pengajuan P1'); ?>

<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-header"><h3 class="card-title">Form Pengajuan P1</h3></div>
    <div class="card-body">
        <form action="<?php echo e(route('p1.pengajuan.store')); ?>" method="POST" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>
            <?php if(auth()->user()->role === 'mahasiswa'): ?>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label">Mahasiswa</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" value="<?php echo e(auth()->user()->nim); ?> - <?php echo e(auth()->user()->name); ?>" readonly>
                        <input type="hidden" name="nim" value="<?php echo e(auth()->user()->nim); ?>">
                    </div>
                </div>
            <?php else: ?>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label">Mahasiswa</label>
                    <div class="col-sm-10">
                        <select name="nim" class="form-control" required>
                            <option value="">-- Pilih Mahasiswa --</option>
                            <?php $__currentLoopData = $mahasiswa; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $m): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($m->nim); ?>"><?php echo e($m->nim); ?> - <?php echo e($m->nama); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                </div>
            <?php endif; ?>
            <div class="form-group row">
                <label class="col-sm-3 col-form-label">Disposisi Ketua Bagian</label>
                <div class="col-sm-9"><input type="file" name="file_disposisi" class="form-control" required></div>
            </div>
            <div class="form-group row">
                <label class="col-sm-3 col-form-label">Transkrip Nilai</label>
                <div class="col-sm-9"><input type="file" name="file_transkrip" class="form-control" required></div>
            </div>
            <div class="form-group row">
                <label class="col-sm-3 col-form-label">Ijazah Terakhir</label>
                <div class="col-sm-9"><input type="file" name="file_ijazah" class="form-control" required></div>
            </div>
            <div class="form-group row">
                <label class="col-sm-3 col-form-label">KHS Semester 1-7</label>
                <div class="col-sm-9"><input type="file" name="file_khs" class="form-control" required></div>
            </div>
            <div class="form-group row">
                <label class="col-sm-3 col-form-label">Sertifikat PKK Maba</label>
                <div class="col-sm-9"><input type="file" name="file_pkk" class="form-control" required></div>
            </div>
            <button type="submit" class="btn btn-primary">Kirim Pengajuan</button>
            <a href="<?php echo e(route('p1.pengajuan.index')); ?>" class="btn btn-secondary">Batal</a>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /opt/lampp/htdocs/skripsifh/resources/views/p1/pengajuan/create.blade.php ENDPATH**/ ?>