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

<?= $this->section('content') ?>
<div class="container-fluid">
    <div class="card shadow-sm col-md-6">
        <div class="card-header bg-primary text-white">
            <h4 class="mb-0">Pengaturan Kapasitas Produksi</h4>
        </div>
        <div class="card-body">
            <?php if(session()->getFlashdata('success')): ?>
                <div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
            <?php endif; ?>

            <form action="<?= base_url('owner/production-queue/setting') ?>" method="post">
                <?= csrf_field() ?>
                
                <div class="mb-3">
                    <label class="form-label fw-bold">Batas PO per Bulan</label>
                    <input type="number" 
                           name="monthly_po_limit" 
                           class="form-control" 
                           value="<?= esc($limit) ?>" 
                           required>
                    <small class="text-muted">Nilai ini menentukan batas maksimal order yang dapat diproses per bulan.</small>
                </div>

                <div class="d-flex justify-content-between">
                    <a href="<?= base_url('owner/productionqueue') ?>" class="btn btn-secondary">Kembali</a>
                    <button type="submit" class="btn btn-success">Simpan Perubahan</button>
                </div>
            </form>
        </div>
    </div>
</div>
<?= $this->endSection() ?>