Proyecto en colaboración con OPASO

manage-personnel.php 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <!-- Authors : Carlos C. Corrada-Bravo
  2. David J. Ortiz-Rivera
  3. Organization : Centro de Desarrollo y Consultoria Computacional
  4. Project : OPASO Material Registry
  5. File : manage-personnel
  6. Description : Manage laboratory personnel -->
  7. <!-- verify session -->
  8. <?php require_once("header.php");
  9. /* start user session */
  10. if(!isset($_SESSION)){
  11. session_start();
  12. }
  13. if(!($_SESSION["access_level"] === "admin") and !($_SESSION["access_level"] === "investigator")){
  14. header("Location: /menu");
  15. die();
  16. }
  17. ?>
  18. <!doctype html>
  19. <html lang="en">
  20. <!-- encoding/imports/styling -->
  21. <head>
  22. <meta charset="utf-8">
  23. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  24. <title class="title">Manage Personnel</title>
  25. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
  26. <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  27. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
  28. <link rel="stylesheet" href="./style/main.css">
  29. <link rel="stylesheet" href="/style/manage.css">
  30. <link rel="stylesheet" href="/style/add.css">
  31. </head>
  32. <!-- content -->
  33. <body>
  34. <!-- forms -->
  35. <div class="form-shader close-form">
  36. <!-- access form -->
  37. <div class="main-form close-form">
  38. <div class="form-wrapper">
  39. <div class="form-header-wrapper">
  40. <h5 class="form-header main-header"></h5>
  41. <div class="close-icon"><i class="close-form material-icons">close</i></div>
  42. </div>
  43. <div class="form">
  44. <div class="form-body">
  45. <h6 class="form-header person"></h6>
  46. <div class="select-wrapper">
  47. <label class="select-label" for="number">Laboratory</label>
  48. <select class="laboratories"></select>
  49. </div>
  50. <div class="select-wrapper">
  51. <label class="select-label" for="number">Access Level</label>
  52. <select class=access_level>
  53. <option value="investigator">Investigator</option>
  54. <option value="technician">Technician</option>
  55. <option value="none">None</option>
  56. </select>
  57. </div>
  58. </div>
  59. <div class="form-actions">
  60. <button class="btn btn-primary action-btn submit" id="main-submit">Submit</button>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <!-- add form -->
  66. <div class="add-form close-form">
  67. <div class="add-form-wrapper">
  68. <div class="add-form-header-wrapper">
  69. <h5 class="form-header">Add Personnel</h5>
  70. <div class="close-icon"><i class="close-form material-icons">close</i></div>
  71. </div>
  72. <div class="add-form-body-wrapper">
  73. <div class="add-form-body">
  74. <div class="details material">
  75. <div class="li-wrapper medium-field">
  76. <label class="form-label" for="name">Full Name</label>
  77. <input id="person_name" class="required ap-field" placeholder="Full name" type="text" name="name">
  78. <div class="invalid-feedback person_name">Please provide a valid name</div>
  79. </div>
  80. <div class="li-append">
  81. <div class="li-wrapper medium-field">
  82. <label class="form-label" for="email">Email</label>
  83. <input id="email" class="required ap-field" placeholder="someone@upr.edu" type="text" name="email">
  84. <div class="invalid-feedback email">Please provide a valid email</div>
  85. </div>
  86. <div class="li-wrapper small-field margin-left phone-number">
  87. <label class="form-label" for="number">Contact Number</label>
  88. <input id="phone_number" class="ap-field" type="text" name="number" placeholder="Phone number" oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g,'$1');">
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="add-form-actions">
  94. <button class="btn btn-primary action-btn submit" id="add-submit">Submit</button>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <!-- alerts -->
  101. <div class="alerts">
  102. <div class="alert">
  103. <div class="message-icon-wrapper">
  104. <i class="message-icon success-icon material-icons">done</i>
  105. <i class="message-icon error-icon failed-icon warning-icon material-icons">close</i>
  106. </div>
  107. <p class="alert-status"></p>
  108. <p class="alert-message"></p>
  109. </div>
  110. </div>
  111. <div class="content">
  112. <!-- navbar -->
  113. <?php require_once("navbar.php")?>
  114. <div class="main">
  115. <div class="header-wrapper">
  116. <h5 class="header">Manage Personnel</h5>
  117. <!-- processing -->
  118. <div class="processing">
  119. <p class="processing-text">Fetching personnel...</p>
  120. <div class="loader"></div>
  121. </div>
  122. </div>
  123. <div class="main-wrapper">
  124. <!-- search form -->
  125. <div class="float-right">
  126. <div class="transaction btn btn-light" id="add">
  127. <i class="fas fa-plus add-personnel-icon"></i>
  128. <p class="add-text">Add</p>
  129. </div>
  130. <div class="search-form-wrapper">
  131. <input class="search-form" placeholder="Search for personnel" type="text" name="search-form">
  132. <button class="clear-btn search-form-submit">
  133. <i class="material-icons clear-icon">close</i>
  134. </button>
  135. </div>
  136. </div>
  137. <!-- personnel -->
  138. <h6 class="header sub-header">Personnel List</h6>
  139. <div class="table-wrapper content-wrapper personnel">
  140. <table class="table">
  141. <thead class="table-header">
  142. <tr>
  143. <th value="person">Person</th>
  144. <th >Authorized</th>
  145. <th >Access Level</th>
  146. <th >Actions</th>
  147. </tr>
  148. </thead>
  149. <tbody></tbody>
  150. </table>
  151. </div>
  152. <h6 class="header table-total"></h6>
  153. </div>
  154. </div>
  155. <!-- footer -->
  156. <?php require_once("footer.php")?>
  157. </div>
  158. <!-- scripts -->
  159. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  160. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
  161. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
  162. <script type="text/javascript" src="/scripts/main.js"></script>
  163. <script type="text/javascript" src="/scripts/manage-personnel.js"></script>
  164. </body>
  165. </html>