<?php
// Ambil parameter no_order dari AJAX request
if (isset($_GET['no_order'])) {
    $no_order = $_GET['no_order'];

    // Ambil data jadwal yang akan diedit berdasarkan no_order
    // Anda bisa mengambil data dari database atau sumber data lainnya sesuai dengan struktur data Anda
    $scheduleToEdit = array(
        'no_order' => '001',
        'product_model' => 'Product A',
        'quantity_order' => 100,
        'output' => 80,
        'delivery_date' => '2023-08-21'
    );
    // Contoh data jadwal yang akan diedit (simulasi)
?>

<form method="post" action="edit_schedule.php?no_order=<?php echo $no_order; ?>">
    <div class="form-group">
        <label for="no_order">No Order</label>
        <input type="text" class="form-control" id="no_order" name="no_order" value="<?php echo $scheduleToEdit['no_order']; ?>" required>
    </div>
    <div class="form-group">
        <label for="product_model">Product Model</label>
        <input type="text" class="form-control" id="product_model" name="product_model" value="<?php echo $scheduleToEdit['product_model']; ?>" required>
    </div>
    <div class="form-group">
        <label for="quantity_order">Quantity Order</label>
        <input type="number" class="form-control" id="quantity_order" name="quantity_order" value="<?php echo $scheduleToEdit['quantity_order']; ?>" required>
    </div>
    <div class="form-group">
        <label for="output">Output</label>
        <input type="number" class="form-control" id="output" name="output" value="<?php echo $scheduleToEdit['output']; ?>" required>
    </div>
    <button type="submit" class="btn btn-primary">Save Changes</button>
</form>

<?php
}
?>
