<?php include "../../root.class.php";
$html = new html();
$html->add_styles_page();
// $html->check_user_type("ADMIN");

$assigned_to = new input();
$assigned_to->class("inputs");
$assigned_to->type("text");
$assigned_to->placeholder("ASSIGNED TO");
$assigned_to->name("assigned_to");
$assigned_to->id("assigned_to");
$assigned_to->onkeyup("search_booking()");

$test_id = new input();
$test_id->class("inputs");
$test_id->type("text");
$test_id->placeholder("TEST ID");
$test_id->name("test_id");
$test_id->id("test_id");
$test_id->onkeyup("search_booking()");

$status = new input();
$status->class("inputs");
$status->type("text");
$status->placeholder("STATUS");
$status->name("status");
$status->id("status");
$status->onkeyup("search_booking()");

?>
<div class="column">
    <div class="banner">
        <div class="row">
            <?php echo $html->selectable_block("add_booking.php", "add"); ?>

            <div class="search_form">
                <div class="row">
                    <div class="row">
                        <?php
                        $assigned_to->add();
                        $test_id->add();
                        $status->add();
                        ?>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php
    $ajax = new js_ajax();
    $ajax->run_on_load();
    $ajax->function_name("search_booking");
    $ajax->select("bookings");
    $ajax->return_columns(['date_booked' , 'booking_no', 'date_created', 'test_id']);
    $ajax->redirect("edit_booking.php");
    ?>