<?php $__env->startSection('title', 'Edit Jabatan Fungsional'); ?>
<?php $__env->startSection('page_title', 'Edit Jabatan Fungsional'); ?>

<?php $__env->startSection('style'); ?>
<style>
    

    

    

    .master-panel {
        border: 1px solid rgba(0,0,0,0.05);
        border-radius: 8px;
        box-shadow: none;
        overflow: hidden;
    }

    .master-panel .card-header {
        display: flex;
        align-items: center;
        padding: 1rem 1.15rem;
        color: #4a3728;
        background: #ffffff;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        border-radius: 0;
    }

    .master-panel .card-header h5 {
        margin: 0;
        font-size: 1rem;
        font-weight: 750;
    }

    .panel-subtitle {
        margin-top: 0.2rem;
        color: #64748b;
        font-size: 0.8rem;
    }

    .info-surface {
        padding: 0.75rem 1rem;
        background: #e6ddc5;
        border: 1px solid #c8def3;
        border-radius: 6px;
        color: #7a5c1e;
        font-size: 0.875rem;
    }
</style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<section class="page-hero">
    <div>
        <h3><i class="fas fa-edit"></i> Edit Jabatan Fungsional</h3>
        <p>Perbarui data jabatan fungsional yang sudah ada.</p>
    </div>
    <a href="<?php echo e(route('admin.jabatan.index')); ?>" class="btn btn-outline-secondary">
        <i class="fas fa-arrow-left"></i> Kembali
    </a>
</section>

<div class="row justify-content-center">
    <div class="col-lg-6">
        <div class="card master-panel">
            <div class="card-header">
                <div>
                    <h5>Form Edit Jabatan</h5>
                    <div class="panel-subtitle">Semua field bertanda <span class="text-danger">*</span> wajib diisi.</div>
                </div>
            </div>
            <div class="card-body">
                <form action="<?php echo e(route('admin.jabatan.update', $jabatan)); ?>" method="POST">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('PUT'); ?>

                    <div class="mb-3">
                        <label for="unit_kerja_id" class="form-label">Unit Kerja <span class="text-danger">*</span></label>
                        <select id="unit_kerja_id" name="unit_kerja_id"
                            class="form-select <?php $__errorArgs = ['unit_kerja_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" required>
                            <option value="">-- Pilih Unit Kerja --</option>
                            <?php $__currentLoopData = $unitKerjaList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $unitKerja): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($unitKerja->id); ?>" <?php if((string) old('unit_kerja_id', $jabatan->unit_kerja_id) === (string) $unitKerja->id): echo 'selected'; endif; ?>>
                                    <?php echo e($unitKerja->nama_unit); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php $__errorArgs = ['unit_kerja_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback"><?php echo e($message); ?></div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    <div class="mb-3">
                        <label for="nama_jabatan" class="form-label">Nama Jabatan <span class="text-danger">*</span></label>
                        <input type="text" id="nama_jabatan" name="nama_jabatan"
                            class="form-control <?php $__errorArgs = ['nama_jabatan'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                            value="<?php echo e(old('nama_jabatan', $jabatan->nama_jabatan)); ?>" required>
                        <?php $__errorArgs = ['nama_jabatan'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback"><?php echo e($message); ?></div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    <div class="mb-3">
                        <label for="jenjang_jabatan_id" class="form-label">Jenjang <span class="text-danger">*</span></label>
                        <select id="jenjang_jabatan_id" name="jenjang_jabatan_id"
                            class="form-select <?php $__errorArgs = ['jenjang_jabatan_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" required>
                            <option value="">-- Pilih Jenjang --</option>
                            <?php $__currentLoopData = $jenjangList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jenjang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($jenjang->id); ?>" <?php if((string) old('jenjang_jabatan_id', $jabatan->jenjang_jabatan_id) === (string) $jenjang->id): echo 'selected'; endif; ?>>
                                    <?php echo e($jenjang->nama_jenjang); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php $__errorArgs = ['jenjang_jabatan_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback"><?php echo e($message); ?></div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    <div class="mb-3">
                        <label for="kategori" class="form-label">Kategori</label>
                        <input type="text" id="kategori" class="form-control" value="Keahlian" readonly>
                        <input type="hidden" name="kategori" value="Keahlian">
                    </div>

                    <div class="info-surface mb-4">
                        <i class="fas fa-info-circle"></i>
                        Pegawai tervalidasi pada jabatan ini: <strong><?php echo e($jabatan->pegawai()->where('status_validasi', 'disetujui')->count()); ?></strong>
                    </div>

                    <div class="d-flex gap-2">
                        <button type="submit" class="btn btn-primary">
                            <i class="fas fa-save"></i> Update
                        </button>
                        <a href="<?php echo e(route('admin.jabatan.index')); ?>" class="btn btn-outline-secondary">
                            <i class="fas fa-arrow-left"></i> Kembali
                        </a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\Skripsi-M\resources\views/admin/jabatan/edit.blade.php ENDPATH**/ ?>