Victoria Hall Booking for Events
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

279 lines
9.7 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/head-admin :: head}"></head>
  4. <body>
  5. <!-- Page Container -->
  6. <div id="page-container"
  7. class="sidebar-o sidebar-dark enable-page-overlay side-scroll page-header-fixed page-header-dark">
  8. <!-- Sidebar Nav-->
  9. <aside th:replace="~{fragments/aside-right :: aside}"></aside>
  10. <!-- END Side Overlay (right)-->
  11. <!-- Sidebar Nav-->
  12. <nav th:replace="~{fragments/nav-pensioner :: nav}"></nav>
  13. <!-- END Sidebar -->
  14. <!-- Header -->
  15. <header th:replace="~{fragments/header-department :: header}"></header>
  16. <!-- END Header -->
  17. <!-- Main Container -->
  18. <main id="main-container">
  19. <!-- Page Content -->
  20. <div class="content">
  21. <div class="block block-rounded">
  22. <div class="block-header block-header-default">
  23. <h3 class="block-title"> List of Approved Users</h3>
  24. </div>
  25. <div class="block-content p-0">
  26. <div class="p-sm-4 p-0">
  27. <div class="table-responsive">
  28. <table id="userApprovedList"
  29. class="table table-bordered table-striped table-vcenter js-dataTable-responsive">
  30. <thead class="thead-light">
  31. <tr class="table-bordered">
  32. <th class="text-center no-sort">S.No</th>
  33. <th class="text-center" width="20%">Usertype</th>
  34. <th class="text-center">Name</th>
  35. <th class="text-center">Mobile Number</th>
  36. <th class="text-center">Email</th>
  37. <th class="text-center">User Status</th>
  38. <th class="text-center">Action</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <!-- Use Thymeleaf to loop through the bookingList -->
  43. <tr th:each="users, rowStat : ${pensionerApprovedList}">
  44. <!--<td class="text-center" th:text="${i.index + 1}"></td>-->
  45. <td class="text-center" th:text="${rowStat.index + 1}"></td>
  46. <td class="text-center" th:text="${users.usertype}"></td>
  47. <td class="text-center" th:text="${users.name}"></td>
  48. <td class="text-center" th:text="${users.mobileNo}"></td>
  49. <td class="text-center" th:text="${users.email}"></td>
  50. <td class="text-center" th:text="${users.userstatus}"></td>
  51. <td>
  52. <p>
  53. <span class="badge bg-success" style="cursor: pointer;"
  54. th:onclick="approved([[${users.userId}]])">Approved</span>
  55. </p>
  56. </td>
  57. </tr>
  58. </tbody>
  59. </table>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <!-- END Page Content -->
  66. </main>
  67. <!-- END Main Container -->
  68. <!-- END Main Container -->
  69. <!--modal for pening-->
  70. <div class="modal fade backdrop" id="approvalForm" data-backdrop="static" tabindex="-1" role="dialog"
  71. aria-labelledby="staticBackdropLabel" aria-hidden="true">
  72. <div class="modal-dialog modal-lg" role="document">
  73. <div class="modal-content">
  74. <form id="ownform">
  75. <div class="block block-rounded block-themed block-transparent mb-0">
  76. <div class="block-header bg-primary-dark">
  77. <h3 class="block-title" id="2mtitle">User Approval Information</h3>
  78. <div class="block-options">
  79. <button type="button" class="btn-block-option" data-bs-dismiss="modal"
  80. aria-label="Close">
  81. <i class="fa fa-fw fa-times"></i>
  82. </button>
  83. </div>
  84. </div>
  85. <div class="block-content row">
  86. <!-- <div class="col-sm-4"> -->
  87. <!-- <label class="form-label">Pet ID:<span class="text-danger">*</span></label> -->
  88. <input type="hidden" class="form-control text-center" name="userid" id="userid"
  89. disabled />
  90. <!--<input type="hidden" class="form-control text-center" name="Mobii" id="Mobii"
  91. disabled />-->
  92. <!-- </div> -->
  93. <div class="col-sm-4">
  94. <label class="form-label">Name:<span class="text-danger"></span></label>
  95. <input type="text" class="form-control text-center" name="name" id="name"
  96. disabled />
  97. </div>
  98. <div class="col-sm-4">
  99. <label class="form-label">Mobile No:<span class="text-danger"></span></label>
  100. <input type="text" class="form-control text-center" name="mobile" id="mobile"
  101. disabled />
  102. </div>
  103. <div class="col-sm-4">
  104. <label class="form-label">Email:<span class="text-danger"></span></label>
  105. <input type="text" class="form-control text-center" name="email" id="email"
  106. disabled />
  107. </div>
  108. <div class="col-sm-4">
  109. <label class="form-label">Street:<span class="text-danger"></span></label>
  110. <input type="text" class="form-control text-center" name="street" id="street"
  111. disabled />
  112. </div>
  113. <div class="col-sm-4">
  114. <label class="form-label">Area:<span class="text-danger"></span></label>
  115. <input type="text" class="form-control text-center" name="area" id="area"
  116. disabled />
  117. </div>
  118. <div class="col-sm-4">
  119. <label class="form-label">Location:<span class="text-danger"></span></label>
  120. <input type="text" class="form-control text-center" name="location" id="location"
  121. disabled />
  122. </div>
  123. <div class="col-sm-4">
  124. <label class="form-label">Pincode:<span class="text-danger"></span></label>
  125. <input type="text" class="form-control text-center" name="pincode" id="pincode"
  126. disabled />
  127. </div>
  128. <div class="col-sm-4">
  129. <label class="form-label">UserType:<span class="text-danger"></span></label>
  130. <input type="text" class="form-control text-center" name="usertype" id="usertype"
  131. disabled />
  132. </div>
  133. <div class="col-sm-4">
  134. <label class="form-label">User Status:<span class="text-danger"></span></label>
  135. <input type="text" class="form-control text-center" name="userstatus"
  136. id="userstatus" disabled />
  137. </div>
  138. <div class="col-sm-4" style="display:none" id="idField">
  139. <label class="form-label">Usertype Id:<span class="text-danger"></span></label>
  140. <input type="text" class="form-control text-center" name="governmentId" id="governmentId"
  141. readonly />
  142. </div>
  143. <div class="col-sm-4" style="display:none" id="departmentField">
  144. <label class="form-label">Department:<span class="text-danger"></span></label>
  145. <input type="text" class="form-control text-center" name="department" id="department"
  146. readonly />
  147. </div>
  148. </div>
  149. </div>
  150. <div class="block-content block-content-full text-end bg-body" id="mbutton2">
  151. <!--<button type="button" class="btn btn-sm btn-alt-success"
  152. th:onclick="accept()">Accept</button>-->
  153. <button type="button" class="btn btn-sm btn-alt-secondary"
  154. data-bs-dismiss="modal">Close</button>
  155. <!--<button type="submit" class="btn btn-sm btn-primary">Reject</button>-->
  156. </div>
  157. </form>
  158. </div>
  159. </div>
  160. </div>
  161. <footer th:replace="~{fragments/footer2 :: footer}"></footer>
  162. <!-- Scripts -->
  163. <script th:replace="~{fragments/loginscript :: script}"></script>
  164. <script type="text/javascript">
  165. $(document).ready(
  166. function () {
  167. var buttons = [{
  168. extend: 'pageLength',
  169. className: 'btn btn-primary'
  170. }, {
  171. title: 'Data export',
  172. extend: 'copyHtml5',
  173. text: 'Copy',
  174. className: 'btn btn-primary',
  175. id: 'copyBtn'
  176. }, {
  177. extend: 'excelHtml5',
  178. text: 'Excel',
  179. className: 'btn btn-primary',
  180. id: 'excelBtn'
  181. }, {
  182. extend: 'csvHtml5',
  183. text: 'CSV',
  184. className: 'btn btn-primary',
  185. id: 'csvBtn'
  186. }, {
  187. extend: 'pdfHtml5',
  188. text: 'PDF',
  189. className: 'btn btn-primary',
  190. id: 'pdfBtn'
  191. },
  192. ];
  193. $('#userApprovedList').DataTable(
  194. {
  195. dom: 'Bftip',
  196. columnDefs: [{
  197. targets: 'no-sort',
  198. orderable: false
  199. }],
  200. lengthMenu: [
  201. [50, 100, 200, 500, -1],
  202. ['50 rows', '100 rows', '200 rows',
  203. '500 rows', 'Show all']],
  204. scrollY: '50vh',
  205. fixedColumns: {
  206. left: 1,
  207. right: 1
  208. },
  209. buttons: [buttons],
  210. responsive: true,
  211. searching: true, // Enable search
  212. select: false,
  213. processing: false,
  214. });
  215. // Link the search input to DataTable
  216. $('#searchInput').on('keyup', function () {
  217. dataTable.search(this.value).draw();
  218. });
  219. });
  220. function approved(userId) {
  221. $.ajax({
  222. type: "GET",
  223. url: '/victoriahallbooking/api/officer/getUserDetails',
  224. data: {
  225. 'usersid': userId
  226. },
  227. success: function (x) {
  228. showUserInfo(x)
  229. }
  230. });
  231. }
  232. function showUserInfo(list) {
  233. $('#approvalForm').modal({
  234. backdrop: 'static',
  235. keyboard: false
  236. });
  237. $('#approvalForm').modal('show');
  238. document.getElementById("userid").value = list.userId;
  239. document.getElementById("name").value = list.name;
  240. document.getElementById("mobile").value = list.mobileNo;
  241. document.getElementById("email").value = list.email;
  242. document.getElementById("street").value = list.street;
  243. document.getElementById("area").value = list.area;
  244. document.getElementById("location").value = list.location;
  245. document.getElementById("pincode").value = list.pinCode;
  246. document.getElementById("usertype").value = list.usertype;
  247. document.getElementById("userstatus").value = list.userstatus;
  248. document.getElementById("department").value=list.department;
  249. document.getElementById("governmentId").value=list.governmentId;
  250. if (list.usertype === 'GCC_EMPLOYEE' || list.usertype === 'PENSIONER') {
  251. idField.style.display = 'block';
  252. departmentField.style.display = 'block';
  253. } else {
  254. idField.style.display = 'none';
  255. departmentField.style.display = 'none';
  256. }
  257. }
  258. </script>
  259. </body>
  260. </html>