<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Edit Lembar Jawab IKK</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
</head>
<body class="bg-light">
    <div class="container-fluid py-4">
        <div class="row justify-content-center">
            <div class="col-lg-10">
                <div class="card shadow-sm">
                    <div class="card-header bg-warning text-dark">
                        <h5 class="mb-0"><i class="fas fa-edit me-2"></i>Edit Lembar Jawab IKK</h5>
                    </div>
                    <div class="card-body">
                        <form action="<?php echo e(route('ikk.lembar-jawab.update', $lembarJawab->id)); ?>" method="POST" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('PUT'); ?>

                            <!-- Bagian ATAS -->
                            <div class="row mb-4">
                                <div class="col-md-6">
                                    <label class="form-label fw-bold">OPD</label>
                                    <input type="text" class="form-control" value="<?php echo e($lembarJawab->opd); ?>" readonly>
                                </div>
                                <div class="col-md-6">
                                    <label class="form-label fw-bold">Tahun</label>
                                    <input type="text" class="form-control" value="<?php echo e($lembarJawab->tahun); ?>" readonly>
                                </div>
                            </div>

                            <hr>

                            <!-- Bagian TENGAH (SOAL - READONLY) -->
                            <h6 class="text-primary mb-3"><i class="fas fa-info-circle me-2"></i>Informasi Indikator</h6>
                            <div class="row mb-3">
                                <div class="col-md-6">
                                    <label class="form-label fw-bold">Kode IKK</label>
                                    <input type="text" class="form-control" value="<?php echo e($lembarJawab->kode_ikk); ?>" readonly>
                                </div>
                                <div class="col-md-6">
                                    <label class="form-label fw-bold">Satuan</label>
                                    <input type="text" class="form-control" value="<?php echo e($lembarJawab->satuan); ?>" readonly>
                                </div>
                            </div>

                            <div class="mb-3">
                                <label class="form-label fw-bold">IKK Output</label>
                                <input type="text" class="form-control" value="<?php echo e($lembarJawab->ikk_output); ?>" readonly>
                            </div>

                            <div class="mb-3">
                                <label class="form-label fw-bold">IKK Outcome</label>
                                <input type="text" class="form-control" value="<?php echo e($lembarJawab->ikk_outcome); ?>" readonly>
                            </div>

                            <div class="mb-4">
                                <label class="form-label fw-bold">Rumus Perhitungan</label>
                                <textarea class="form-control" rows="2" readonly><?php echo e($lembarJawab->rumus_perhitungan); ?></textarea>
                            </div>

                            <hr>

                            <!-- Bagian BAWAH (JAWABAN) -->
                            <h6 class="text-success mb-3"><i class="fas fa-edit me-2"></i>Isian Jawaban</h6>

                            <div class="row mb-3">
                                <div class="col-md-6">
                                    <label class="form-label fw-bold">Capaian <span class="text-danger">*</span></label>
                                    <div class="input-group">
                                        <input type="number" name="capaian" class="form-control" step="0.01" value="<?php echo e($lembarJawab->capaian); ?>" required>
                                        <span class="input-group-text"><?php echo e($lembarJawab->satuan); ?></span>
                                    </div>
                                </div>
                            </div>

                            <div class="mb-3">
                                <label class="form-label fw-bold">Kendala / Masalah <span class="text-danger">*</span></label>
                                <textarea name="kendala" class="form-control" rows="4" required><?php echo e($lembarJawab->kendala); ?></textarea>
                            </div>

                            <div class="mb-3">
                                <label class="form-label fw-bold">Tindak Lanjut <span class="text-danger">*</span></label>
                                <textarea name="tindak_lanjut" class="form-control" rows="4" required><?php echo e($lembarJawab->tindak_lanjut); ?></textarea>
                            </div>

                            <div class="mb-4">
                                <label class="form-label fw-bold">Upload Bukti</label>
                                <?php if($lembarJawab->file_bukti): ?>
                                    <div class="mb-2">
                                        <small class="text-muted">File saat ini: <?php echo e($lembarJawab->file_bukti); ?></small>
                                    </div>
                                <?php endif; ?>
                                <input type="file" name="file_bukti" class="form-control" accept=".pdf,.jpg,.jpeg,.png">
                                <small class="text-muted">Format: PDF, JPG, PNG. Maksimal 5MB. Kosongkan jika tidak ingin mengubah file.</small>
                            </div>

                            <!-- Button -->
                            <div class="d-flex justify-content-between">
                                <a href="<?php echo e(route('ikk.lembar-jawab.index')); ?>" class="btn btn-secondary">
                                    <i class="fas fa-arrow-left me-1"></i>Kembali
                                </a>
                                <div>
                                    <button type="submit" name="action" value="draft" class="btn btn-outline-primary me-2">
                                        <i class="fas fa-save me-1"></i>Simpan Draft
                                    </button>
                                    <button type="submit" name="action" value="ajukan" class="btn btn-success">
                                        <i class="fas fa-paper-plane me-1"></i>Ajukan Verifikasi
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html><?php /**PATH /Users/user/Documents/giriwidyan/project/inhouse/skm/resources/views/ikk/lembar-jawab/edit.blade.php ENDPATH**/ ?>