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


$name = new input();
$name->name("name");
$name->id("name");
$name->class("inputs");
$name->placeholder("JOB CARD ACCOUNT NAME");
$name->type("text");
$name->onkeyup("search_jobcard_account()");


$status = new select();
$status->name("status");
$status->id("status");
$status->class("inputs");
$status->onchange("search_jobcard_account()");
$status->add_option("", "STATUS");
$status->add_option("1", "Active");
$status->add_option("0", "Inactive");



$account_manager_id = new select();
$account_manager_id->name("account_manager_id");
$account_manager_id->id("account_manager_id");
$account_manager_id->class("inputs");
$account_manager_id->add_option("", "ACCOUNT MANAGER");
$account_manager_id->fill_from_db("users", "record_id", "username");
$account_manager_id->onchange("search_jobcard_account()");

?>

<div class="search_form">
    <h2>SEARCH JOB CARD ACCOUNT</h2>
    <?php
    $name->add();
    $status->add();
    $account_manager_id->add();
    ?>
</div>

<?php
$ajax = new js_ajax();
$ajax->run_on_load();
$ajax->function_name("search_jobcard_account");
// $ajax->submit_btn_id("submit");
$ajax->select("job_card_accounts");
$ajax->return_columns(['name','description']);
$ajax->redirect("edit_jobcard_account.php");
?>