<?php if (isset($component)) { $__componentOriginal1f9e5f64f242295036c059d9dc1c375c = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal1f9e5f64f242295036c059d9dc1c375c = $attributes; } ?>
<?php $component = App\View\Components\Layout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('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\Layout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title', null, []); ?> <?php echo e($title); ?> <?php $__env->endSlot(); ?>
    <!-- Content -->

    <div class="card card-responsive mb-3">
        <div class="card-header d-flex align-items-center justify-content-between">
            <h5 class="mb-0">Data SPP</h5>
            <span class="badge bg-label-primary float-end" type="button" data-bs-toggle="modal"
                data-bs-target="#modalTambahSPP">
                <i class="fa-solid fa-person-circle-plus me-1"></i>
                Tambah
            </span>
        </div>
        <div class="card-body">
            <div class="table-responsive text-nowrap">
                <table id="myTable" class="table table-striped" width="100%">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Tahun Ajaran</th>
                            <th>Kelas X</th>
                            <th>Kelas XI</th>
                            <th>Kelas XII</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $sppList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($loop->iteration); ?></td>
                                <td><?php echo e($list->tahun_ajaran); ?></td>
                                <td>Rp. <?php echo e(number_format($list->spp1, 0, ',', '.')); ?></td>
                                <td>Rp. <?php echo e(number_format($list->spp2, 0, ',', '.')); ?></td>
                                <td>Rp. <?php echo e(number_format($list->spp3, 0, ',', '.')); ?></td>
                                <td>
                                    <button type="button" class="btn btn-warning btn-sm" data-bs-toggle="modal"
                                        data-bs-target="#modalEditUser<?php echo e($list->id); ?>">
                                        <i class="bx bx-edit"></i>
                                    </button>
                                    <a type="button" id="btn-hapus" href="/spp/hapus-SPP/<?php echo e($list->id); ?>"
                                        class="btn btn-danger btn-sm">
                                        <i class="bx bx-trash"></i>
                                    </a>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>


                <?php $__currentLoopData = $sppList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="modal fade" id="modalEditUser<?php echo e($list->id); ?>" tabindex="-1" aria-hidden="true">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h5 class="modal-title" id="exampleModalLabel3">Edit Data SPP</h5>
                                    <button type="button" class="btn-close" data-bs-dismiss="modal"
                                        aria-label="Close"></button>
                                </div>
                                <form action="spp/updateSPP" method="post">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('PUT'); ?>
                                    <div class="modal-body">
                                        <input type="hidden" name="id" value="<?php echo e($list->id); ?>">
                                        <div class="mb-3">
                                            <label class="form-label">Tahun Ajaran</label>
                                            <input type="text" name="tahun_ajaran" class="form-control"
                                                value="<?php echo e($list->tahun_ajaran); ?>" disabled autocomplete="off">
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label">Kelas X</label>
                                            <input type="number" name="spp1" class="form-control"
                                                placeholder="Rp 1.000.000" value="<?php echo e($list->spp1); ?>"
                                                autocomplete="off">
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label">Kelas XI</label>
                                            <input type="number" name="spp2" class="form-control"
                                                placeholder="Rp 1.000.000" value="<?php echo e($list->spp2); ?>"
                                                autocomplete="off">
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label">Kelas XII</label>
                                            <input type="number" name="spp3" class="form-control"
                                                placeholder="Rp 1.000.000" value="<?php echo e($list->spp3); ?>"
                                                autocomplete="off">
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-outline-secondary"
                                            data-bs-dismiss="modal">Close</button>
                                        <button type="submit" name="save" class="btn btn-primary">Save</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

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


    <div class="modal fade" id="modalTambahSPP" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel3">Tambah Data SPP</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <form action="spp/simpanSPP" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body">
                        <div class="mb-3">
                            <label class="form-label">Tahun Ajaran</label>
                            <input type="text" name="tahun_ajaran" class="form-control"
                                placeholder="<?php echo e(date('Y')); ?>" autocomplete="off">
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Kelas X</label>
                            <input type="number" name="spp1" class="form-control" placeholder="Rp 1.000.000"
                                autocomplete="off">
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Kelas XI</label>
                            <input type="number" name="spp2" class="form-control" placeholder="Rp 1.000.000"
                                autocomplete="off">
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Kelas XII</label>
                            <input type="number" name="spp3" class="form-control" placeholder="Rp 1.000.000"
                                autocomplete="off">
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-outline-secondary"
                            data-bs-dismiss="modal">Close</button>
                        <button type="submit" name="save" class="btn btn-primary">Save</button>
                    </div>
                </form>
            </div>
        </div>
    </div>


    <!-- / Content -->
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal1f9e5f64f242295036c059d9dc1c375c)): ?>
<?php $attributes = $__attributesOriginal1f9e5f64f242295036c059d9dc1c375c; ?>
<?php unset($__attributesOriginal1f9e5f64f242295036c059d9dc1c375c); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1f9e5f64f242295036c059d9dc1c375c)): ?>
<?php $component = $__componentOriginal1f9e5f64f242295036c059d9dc1c375c; ?>
<?php unset($__componentOriginal1f9e5f64f242295036c059d9dc1c375c); ?>
<?php endif; ?>
<?php /**PATH C:\Users\USER\Downloads\Compressed\Pembayaran-SPP-main\resources\views/spp.blade.php ENDPATH**/ ?>