<?php $__env->startSection('konten'); ?>
<div class="container" style="max-width: 600px; margin: auto; background: white; padding: 20px; border-radius: 10px; box-sizing: border-box;">
    <h2 style="text-align: center;">Form Laporan Kerusakan</h2>
    <hr>

    <?php if($errors->any()): ?>
    <div style="background: #ffdbdb; color: #a94442; padding: 15px; border-radius: 5px; margin-bottom: 20px;">
        <strong>Waduh, ada yang salah:</strong>
        <ul>
            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <li><?php echo e($error); ?></li>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ul>
    </div>
    <?php endif; ?>

    <?php if($errors->any()): ?>
    <div class="alert alert-danger">
        <ul>
            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <li><?php echo e($error); ?></li>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ul>
    </div>
    <?php endif; ?>

    <form action="<?php echo e(url('service/simpan')); ?>" method="POST" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>
        <div style="margin-bottom: 15px;">
            <label>Nama Pelapor:</label><br>
            <input type="text" name="pelapor" value="<?php echo e(session('user_nama')); ?>" placeholder="Nama Lengkap" required style="width: 100%; padding: 8px; margin-top: 5px;">
        </div>

        <div style="margin-bottom: 15px;">
            <label>Kantor:</label><br>
            <select name="unit" required style="width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px;">
                <option value="Kantor (SJU)">Kantor (SJU)</option>
                <option value="Ruko">Ruko</option>
                <option value="Retail / Toko">Retail / Toko</option>
            </select>
        </div>

        <div style="margin-bottom: 15px;">
            <label>Lokasi:</label><br>
            <input type="text" name="divisi" placeholder="Contoh: Gudang / HRD" required style="width: 100%; padding: 8px; margin-top: 5px;">
        </div>

        <div style="margin-bottom: 15px;">
            <label>Perangkat yang Rusak:</label><br>
            <input type="text" name="perangkat" placeholder="Contoh: Monitor Samsung / Printer Epson" required style="width: 100%; padding: 8px; margin-top: 5px;">
        </div>

        <div style="margin-bottom: 15px;">
            <label>No. Inventaris:</label><br>
            <input type="text" name="no_inventaris" placeholder="No. Inventaris Yang Ada Di Perangkat" required style="width: 100%; padding: 8px; margin-top: 5px;">
        </div>

        <div style="margin-bottom: 15px;">
            <label>Keluhan / Kerusakan:</label><br>
            <textarea name="keluhan" rows="4" placeholder="Jelaskan detail kerusakannya..." required style="width: 100%; padding: 8px; margin-top: 5px;"></textarea>
        </div>

        <div style="margin-bottom: 15px;">
            <label>Tingkat Urgensi:</label><br>
            <select name="urgensi" style="width: 100%; padding: 8px;">
                <option value="Biasa">Biasa</option>
                <option value="Penting">Penting (Butuh Cepat)</option>
                <option value="Darurat">Darurat (Pekerjaan Terhenti!)</option>
            </select>
        </div>

        <div class="mb-3">
            <label class="form-label font-weight-bold">Foto Bukti (Maks 2MB):</label>
            <input type="file" name="foto" class="form-control" accept="image/*">
            <small class="text-muted">Format: JPG, PNG, JPEG. Maksimal 2MB.</small>
        </div>
        <br>
        <button type="submit" style="width: 100%; background: #28a745; color: white; padding: 10px; border: none; border-radius: 5px; cursor: pointer;">Kirim Laporan</button>
        <a href="<?php echo e(url('service')); ?>" style="display: block; text-align: center; margin-top: 10px; color: gray; text-decoration: none;">Kembali</a>


    </form>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/sjumyid/public_html/sju-service/resources/views/service/create.blade.php ENDPATH**/ ?>