123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316 |
- <!-- Authors : Carlos C. Corrada-Bravo
- David J. Ortiz-Rivera
-
- Organization : Centro de Desarrollo y Consultoria Computacional
- Project : OPASO Material Registry
- File : laboratory
- Description : Display laboratory inventory -->
-
- <!-- verify session -->
- <?php require_once("header.php");
-
- /* start user session */
- if(!isset($_SESSION)){
- session_start();
- }
-
- /* verify lab id */
- if(!isset($_GET["lab_id"])){
- header("Location: /menu");
- die();
- }
-
- else{
- if(!(array_key_exists($_GET["lab_id"],$_SESSION["authorized"]))){
- header("Location: /menu");
- die();
- }
- }
- ?>
-
- <!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"><?php echo $_SESSION["authorized"][$_GET["lab_id"]]["lab_room"]; ?></title>
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
- <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/css?family=Roboto&display=swap" rel="stylesheet">
- <link rel="stylesheet" href="/style/main.css">
- <link rel="stylesheet" href="/style/laboratory.css">
- </head>
-
- <!-- content -->
- <body>
- <!-- transaction forms -->
- <div class="form-shader close-form">
- <!-- main transactions -->
- <div class="main-form close-form">
- <div class="form-wrapper">
- <div class="form-header-wrapper">
- <h4 class="form-header main-header">Material Use</h4>
- <div class="close-icon"><i class="material-icons close-form">close</i></div>
- </div>
- <div class="form">
- <div class="form-body">
- <div class="li-wrapper total">
- <label class="label" for="total">Limit</label>
- <input class="text-field" id="total" type="text" name="total" disabled>
- </div>
- <div class="li-wrapper">
- <label class="label transaction-label" for="transaction"></label>
- <div class="control-wrapper">
- <input class="text-field" id="transaction" type="text" name="transaction">
- <!-- <i class="control control-plus fas fa-plus" id="plus"></i><br>
- <i class="control control-minus fas fa-minus" id="minus"></i> -->
- </div>
- </div>
- </div>
- <div class="form-actions">
- <button class="btn btn-primary action-btn submit" id="main-submit">Submit</button>
- </div>
- </div>
- </div>
- </div>
-
- <!-- add material -->
- <div class="add-form close-form">
- <div class="add-form-wrapper">
- <div class="add-form-header-wrapper">
- <h4 class="form-header">Add Material</h4>
- <div class="close-icon"><i class="material-icons close-form">close</i></div>
- </div>
- <div class="add-form-body-wrapper">
- <div class="add-form-body">
- <div class="details material">
- <h5 class="details-header">Material Details</h5>
- <div class="add-li-wrapper large-field">
- <label for="mat_name">Material</label>
- <input class="material-input" type="text" placeholder="Material name" name="mat_name">
- </div>
- <div class="add-li-wrapper medium-field">
- <label for="cas-number">CAS Number</label>
- <input class="material-input" type="text" placeholder="CAS Num." name="cas">
- </div>
- <div class="add-li-wrapper medium-field">
- <label for="man_name">Manufacturer</label>
- <input class="material-input" type="text" placeholder="Manufacturer name" name="man_name">
- </div>
- <div class="add-li-wrapper large-field">
- <label for="sds-link">SDS Link</label>
- <input class="material-input" type="text" placeholder="SDS Link" name="sds">
- </div>
- <div class="add-li-wrapper extra-small-field">
- <label for="state">State</label>
- <input class="material-input" type="text" placeholder="State" name="state">
- </div>
- </div>
- <div class="details hazard">
- <h5 class="details-header">Hazard Details</h5>
- <div class="add-li-wrapper small-field">
- <label for="ghs">GHS</label>
- <input class="material-input" type="text" placeholder="GHS" name="ghs">
- </div>
- <div class="add-li-wrapper medium-field">
- <label for="hazard">Hazard</label>
- <input class="material-input" type="text" placeholder="Hazard" name="hazard">
- </div>
- </div>
- <div class="details container-details">
- <h5 class="details-header">Container Details</h5>
- <div class="add-li-wrapper extra-small-field">
- <label for="type">Type</label>
- <input class="material-input" type="text" placeholder="Type" name="type">
- </div>
- <div class="add-li-wrapper small-field">
- <label for="capacity">Capacity</label>
- <input class="material-input" type="text" name="capacity" placeholder="Capacity" oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');">
- </div>
- <div class="add-li-wrapper small-field quantity">
- <label for="quantity">Quantity</label>
- <input class="material-input" type="text" name="quantity" placeholder="Quantity" oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');">
- </div>
- <div class="add-li-wrapper small-field uom">
- <label for="uom">UOM</label>
- <input class="material-input" type="text" placeholder="UOM" name="uom">
- </div>
- <div class="add-li-wrapper medium-field">
- <label for="location">Location</label>
- <input class="material-input" type="text" placeholder="Location" name="location">
- </div>
- </div>
- </div>
- <div class="add-form-actions">
- <button class="btn btn-primary action-btn submit" id="add-submit">Submit</button>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <!-- 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>
-
- <!-- confirm alert -->
- <div class="alert-wrapper hide-confirm">
- <div class="confirm-alert">
- <h5 class="header confirm-header">Confirm</h5>
- <div class="mi-wrapper">
- <div class="confirm-message"></div>
- <div class="query-actions">
- <button class="btn query-btn" id="yes">Yes</button>
- <button class="btn query-btn hide-confirm">No</button>
- </div>
- </div>
- </div>
- </div>
-
- <!-- material data -->
- <div class="material-data-shader hide-material-data">
- <div class="material-data-wrapper">
- <div class="material-data-icon-wrapper">
- <i class="hide-material-data-icon hide-material-data material-icons">close</i>
- </div>
- <div class="material-data">
- <div class="material-name-wrapper">
- <h5 class="header material-data-header material-name" value="mat_name"></h6>
- <a class="material-link" target="_blank" rel="noopener noreferrer" title="material"><i class="fas fa-external-link-alt"></i></a>
- </div>
- <div class="material-data-row">
- <h6 class="header material-data-header">CAS Num.</h6>
- <span class="material-data-text" value="cas"></span>
- </div>
- <div class="material-data-row">
- <h6 class="header material-data-header">State</h6>
- <span class="material-data-text" value="state"></span>
- </div>
- <div class="material-data-row">
- <h6 class="header material-data-header">Type</h6>
- <span class="material-data-text" value="type"></span>
- </div>
- <div class="material-data-row">
- <h6 class="header material-data-header">SDS Link</h6>
- <span class="material-data-text" value="sds"></span>
- </div>
- <div class="material-data-row">
- <h6 class="header material-data-header">GHS</h6>
- <span class="material-data-text" value="ghs"></span>
- </div>
- </div>
- </div>
- </div>
-
- <div class="content">
- <!-- navbar -->
- <?php require_once("navbar.php")?>
- <div class="main">
- <div class="header-wrapper">
- <h5 class="header lab-header"><?php echo $_SESSION["authorized"][$_GET["lab_id"]]["lab_room"]; ?></h5>
-
- <!-- processing -->
- <div class="processing">
- <p class="processing-text">Fetching inventory...</p>
- <div class="loader"></div>
- </div>
- </div>
-
- <div class="main-wrapper">
-
- <!-- inventory -->
- <div class="personnel-wrapper">
- <h6 class="header sub-header">Personnel</h6>
- <table class="table personnel">
- <thead class="table-header">
- <tr>
- <th value="person_name" >Person Name</th>
- <th value="access_level">Access level</th>
- </tr>
- </thead>
- <tbody class="personnel-body"></tbody>
- </table>
- </div>
-
- <div class="float-right">
- <div class="dropdown download">
- <button class="btn btn-outline-success download-btn" type="button" title="Download" id="dropdown-menu-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="material-icons download-icon">archived</i></button>
- <div class="dropdown-menu" aria-labelledby="dropdown-menu-button">
- <span class="download-option" value="lab_report">Lab Report</span>
- </div>
- </div>
-
- <div class="btn btn-light transaction add-material" id="add-material">
- <i class="fas fa-plus add-material-icon"></i>
- <p class="add-text">Add</p>
- </div>
-
- <div class="search-form-wrapper">
- <input class="search-form" type="text" placeholder="Search for materials" name="search-form">
- <button class="clear-btn search-form-submit">
- <i class="material-icons clear-icon">close</i>
- </button>
- </div>
- </div>
-
- <!-- inventory -->
- <div class="sub-header-wrapper">
- <h6 class="header sub-header table-sub-header">Inventory</h6>
- <?php
- /* start user session */
- if(!isset($_SESSION)){
- session_start();
- }
- if($_SESSION["access_level"] == "admin" or $_SESSION["access_level"] == "investigator"){
- echo '<a class="edit-link" href="/inventory?lab_id=' . $_GET["lab_id"] . '" title="edit inventory">(Edit)</a>';
- }
- ?>
- </div>
-
- <div class="table-wrapper content-wrapper inventory">
- <table class="table">
- <thead class="table-header">
- <tr>
- <th class="sort" value="mat_name" >Material
- <i class="sort-icon sort-material fas fa-caret-down"></i>
- </th>
- <th class="sort" value="man_name">Manufacturer
- <i class="sort-alt fas fa-caret-down"></i>
- </th>
- <th value="capacity">Capacity</th>
- <th value="quantity">Quantity</th>
- <th value="total">Total</th>
- <th value="uom">UOM</th>
- <th >Location</th>
- <th >Transactions</th>
- </tr>
- </thead>
- <tbody class="inventory-body"></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/laboratory.js"></script>
- </body>
- </html>
|