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.

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