<?= $this->extend('layouts/owner') ?>

<?= $this->section('content') ?>

<div class="container-fluid">

    <div class="row mb-3">

        <div class="col-md-6">

            <h3>

                <i class="fas fa-sliders-h"></i>

                Pengaturan Limit PO Bulanan

            </h3>

        </div>

        <div class="col-md-6 text-end">

            <a href="<?= base_url('owner/production') ?>"

               class="btn btn-secondary">

                Kembali

            </a>

        </div>

    </div>

    <?php if(session()->getFlashdata('success')): ?>

        <div class="alert alert-success">

            <?= session()->getFlashdata('success') ?>

        </div>

    <?php endif; ?>

    <div class="card shadow">

        <div class="card-header bg-warning">

            Setting Produksi

        </div>

        <div class="card-body">

            <form action="<?= base_url('owner/production/saveLimit') ?>"

                  method="post">

                <?= csrf_field() ?>

                <div class="mb-3">

                    <label>

                        Maksimal PO Dalam 1 Bulan

                    </label>

                    <input

                        type="number"

                        class="form-control"

                        name="monthly_po_limit"

                        value="<?= $setting['monthly_po_limit'] ?? 5 ?>"

                        required>

                </div>

                <div class="alert alert-info">

                    Jika limit diisi <strong>5</strong> dan terdapat

                    order ke-6 maka sistem otomatis akan

                    memasukkan order tersebut ke

                    periode bulan berikutnya.

                </div>

                <button

                    class="btn btn-success">

                    <i class="fas fa-save"></i>

                    Simpan

                </button>

            </form>

        </div>

    </div>

</div>

<?= $this->endSection() ?>