<!--    Authors         :   Carlos C. Corrada-Bravo
                            David J. Ortiz-Rivera

        Organization    :   Centro de Desarrollo y Consultoria Computacional
        Project         :   OPASO Material Registry  
        File            :   requests
        Description     :   Display material requests -->

<!-- verify session -->
<?php require_once("header.php");?>

<!doctype html>
<html lang="en">
    <!-- encoding/imports/styling -->
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title class="title">Material Requests</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
        <link rel="stylesheet" href="/style/main.css">
        <link rel="stylesheet" href="/style/offered.css">
    </head>

    <!-- content -->
    <body>
        <!-- alerts -->
        <div class="alerts">
            <div class="alert">
                <div class="message-icon-wrapper">
                    <i class="message-icon success-icon material-icons">done</i>
                    <i class="message-icon error-icon failed-icon warning-icon material-icons">close</i>
                </div>
                <p class="alert-status"></p>
                <p class="alert-message"></p>
            </div>
        </div>

        <div class="content">
            <!-- navbar -->
            <?php require_once("navbar.php")?>
            <div class="main">
                <div class="header-wrapper">
                    <h5 class="header">Material Requests</h5>
                    
                    <!-- processing -->
                    <div class="processing">
                        <p class="processing-text">Fetching requests...</p>
                        <div class="loader"></div>
                    </div>
                </div>

                <div class="main-wrapper">
                    <!-- search form -->
                    <div class="float-right">
                        <div class="search-form-wrapper">
                            <input class="search-form" placeholder="Search for requests" type="text" name="search-form">
                            <button class="clear-btn search-form-submit">
                                <i class="material-icons clear-icon">close</i>
                            </button>
                        </div>
                    </div>

                    <!-- requests -->
                    <h6 class="header sub-header"></h6>
                    <div class="table-wrapper content-wrapper">
                        <table class="table">
                            <thead class="table-header">
                                <tr>
                                    <th value="mat_name">Material</th>
                                    <th value="man_name">Manufacturer</th>
                                    <th value="capacity">Capacity</th>
                                    <th value="amount">Amount</th>
                                    <th value="person_name">Requestor</th>
                                    <th value="lab_room">Previous Lab</th>
                                    <th value="lab_room">New Lab</th>
                                    <th value="actions">Actions</th>
                                </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>

                    <h6 class="header table-total"></h6>
                </div>
            </div>

            <!-- footer -->
            <?php require_once("footer.php")?>
        </div>  

        <!-- scripts -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
        <script type="text/javascript" src="/scripts/main.js"></script>
        <script type="text/javascript" src="/scripts/requests.js"></script>
    </body>
</html>