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.

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