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.

256 lines
8.6 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-counsellor :: 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 : ${counsellorApprovedList}">
  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>
  139. </div>
  140. <div class="block-content block-content-full text-end bg-body" id="mbutton2">
  141. <button type="button" class="btn btn-sm btn-alt-secondary"
  142. data-bs-dismiss="modal">Close</button>
  143. </div>
  144. </form>
  145. </div>
  146. </div>
  147. </div>
  148. <footer th:replace="~{fragments/footer2 :: footer}"></footer>
  149. <!-- Scripts -->
  150. <script th:replace="~{fragments/loginscript :: script}"></script>
  151. <script type="text/javascript">
  152. $(document).ready(
  153. function () {
  154. var buttons = [{
  155. extend: 'pageLength',
  156. className: 'btn btn-primary'
  157. }, {
  158. title: 'Data export',
  159. extend: 'copyHtml5',
  160. text: 'Copy',
  161. className: 'btn btn-primary',
  162. id: 'copyBtn'
  163. }, {
  164. extend: 'excelHtml5',
  165. text: 'Excel',
  166. className: 'btn btn-primary',
  167. id: 'excelBtn'
  168. }, {
  169. extend: 'csvHtml5',
  170. text: 'CSV',
  171. className: 'btn btn-primary',
  172. id: 'csvBtn'
  173. }, {
  174. extend: 'pdfHtml5',
  175. text: 'PDF',
  176. className: 'btn btn-primary',
  177. id: 'pdfBtn'
  178. },
  179. ];
  180. $('#userApprovedList').DataTable(
  181. {
  182. dom: 'Bftip',
  183. columnDefs: [{
  184. targets: 'no-sort',
  185. orderable: false
  186. }],
  187. lengthMenu: [
  188. [50, 100, 200, 500, -1],
  189. ['50 rows', '100 rows', '200 rows',
  190. '500 rows', 'Show all']],
  191. scrollY: '50vh',
  192. fixedColumns: {
  193. left: 1,
  194. right: 1
  195. },
  196. buttons: [buttons],
  197. responsive: true,
  198. searching: true, // Enable search
  199. select: false,
  200. processing: false,
  201. });
  202. // Link the search input to DataTable
  203. $('#searchInput').on('keyup', function () {
  204. dataTable.search(this.value).draw();
  205. });
  206. });
  207. function approved(userId) {
  208. $.ajax({
  209. type: "GET",
  210. url: '/victoriahallbooking/api/officer/getUserDetails',
  211. data: {
  212. 'usersid': userId
  213. },
  214. success: function (x) {
  215. showUserInfo(x)
  216. }
  217. });
  218. }
  219. function showUserInfo(list) {
  220. $('#approvalForm').modal({
  221. backdrop: 'static',
  222. keyboard: false
  223. });
  224. $('#approvalForm').modal('show');
  225. document.getElementById("userid").value = list.userId;
  226. document.getElementById("name").value = list.name;
  227. document.getElementById("mobile").value = list.mobileNo;
  228. document.getElementById("email").value = list.email;
  229. document.getElementById("street").value = list.street;
  230. document.getElementById("area").value = list.area;
  231. document.getElementById("location").value = list.location;
  232. document.getElementById("pincode").value = list.pinCode;
  233. document.getElementById("usertype").value = list.usertype;
  234. document.getElementById("userstatus").value = list.userstatus;
  235. }
  236. </script>
  237. </body>
  238. </html>