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.

566 lines
20 KiB

1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/head-headquarters :: head}"></head>
  4. <style>
  5. .card-body table {
  6. width: 100%;
  7. padding: 100px;
  8. }
  9. .card-body th,
  10. td {
  11. padding: 8px;
  12. text-align: left;
  13. }
  14. .amount-cell {
  15. text-align: right;
  16. padding-right: 1rem;
  17. /* Adjust padding as needed */
  18. }
  19. .table {
  20. width: 100% !important;
  21. }
  22. </style>
  23. <body>
  24. <!-- Page Container -->
  25. <div id="page-container"
  26. class="sidebar-o sidebar-dark enable-page-overlay side-scroll page-header-fixed page-header-dark">
  27. <!-- Sidebar Nav-->
  28. <aside th:replace="~{fragments/aside-right :: aside}"></aside>
  29. <!-- END Side Overlay (right)-->
  30. <!-- Sidebar Nav-->
  31. <nav th:replace="~{fragments/nav-headquarters :: nav}"></nav>
  32. <!-- END Sidebar -->
  33. <!-- Header -->
  34. <header th:replace="~{fragments/header-headquarters :: header}"></header>
  35. <!-- END Header -->
  36. <!-- Main Container -->
  37. <main id="main-container">
  38. <div class="content">
  39. <div class="block block-rounded">
  40. <div class="block-header block-header-default">
  41. <h3 class="block-title">List of Bookings Rejected</h3>
  42. </div>
  43. <div class="block-content p-0">
  44. <div class="p-sm-4 p-0">
  45. <div class="table-responsive">
  46. <table class="table table-bordered table-striped table-vcenter js-dataTable-responsive" id="bookingrejectedtable">
  47. <thead class="thead-light">
  48. <tr>
  49. <th class="text-center no-sort">S.No</th>
  50. <th class="text-center">Booking Id</th>
  51. <th class="text-center">zone</th>
  52. <th class="text-center">Division</th>
  53. <th class="text-center" width="20%">Hall Name</th>
  54. <th class="text-center">User Name</th>
  55. <th class="text-center">User type</th>
  56. <th class="text-center" width="20%">Booking Date</th>
  57. <th class="text-center">Number of days</th>
  58. <th class="text-center">Reason for Booking</th>
  59. <th class="text-center">Caretaker Name/MobileNumber</th>
  60. <th class="text-center">Action</th>
  61. </tr>
  62. </thead>
  63. <tbody>
  64. <!--<tbody th:each="registration, i : ${registrations}">-->
  65. <!--<tr>-->
  66. <tr th:each="booking, rowStat : ${rejectedBookings}">
  67. <td class="text-center" th:text="${rowStat.index + 1}"></td>
  68. <td class="text-center" th:text="${booking.bookingId}"></td>
  69. <td class="text-center" th:text="${booking.hallDetails.zone}"></td>
  70. <td class="text-center" th:text="${booking.hallDetails.division}"></td>
  71. <td class="text-center" th:text="${booking.hallDetails.hallName}"></td>
  72. <td class="text-center" th:text="${booking.users.name}"></td>
  73. <td class="text-center" th:text="${booking.users.usertype}"></td>
  74. <td class="text-center" th:text="${booking.bookingDate}"></td>
  75. <td class="text-center" th:text="${booking.noOfDays}"></td>
  76. <td class="text-center" th:text="${booking.reason}"></td>
  77. <td class="text-center"
  78. th:text="${booking.hallDetails.hallInchargeName} + ' / ' + ${booking.hallDetails.hallInchargeMobno}">
  79. </td>
  80. <td>
  81. <p>
  82. <span class="badge bg-warning" style="cursor: pointer;"
  83. th:onclick="pendingbooking([[${booking.bookingId}]])">REJECTED</span>
  84. </p>
  85. </td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </main>
  95. <!-- END Main Container -->
  96. <!--modal for pening-->
  97. <div class="modal fade backdrop" id="pendingBookingForm" data-backdrop="static" tabindex="-1" role="dialog"
  98. aria-labelledby="staticBackdropLabel" aria-hidden="true">
  99. <div class="modal-dialog modal-lg" role="document">
  100. <div class="modal-content">
  101. <form id="ownform" onsubmit="return rejectsubmit();">
  102. <div class="block block-rounded block-themed block-transparent mb-0">
  103. <div class="block-header bg-primary-dark">
  104. <h3 class="block-title" id="2mtitle">Booking Information</h3>
  105. <div class="block-options">
  106. <button type="button" class="btn-block-option" data-bs-dismiss="modal"
  107. aria-label="Close">
  108. <i class="fa fa-fw fa-times"></i>
  109. </button>
  110. </div>
  111. </div>
  112. <div class="block-content row">
  113. <div class="col-md-12 col-lg-12 col-sm-12 mb-2">
  114. <input type="hidden" class="form-control text-center" name="bookingid"
  115. id="bookingid" disabled />
  116. <div class="card-body">
  117. <table>
  118. <tr>
  119. <th colspan="10" style="background-color: #f2f2f2;">User Details</th>
  120. </tr>
  121. <tr>
  122. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">User Name:
  123. </th>
  124. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  125. id="td_userName"></td>
  126. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">Mobile Number:
  127. </th>
  128. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  129. id="td_mobileNumber"></td>
  130. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">User Type:
  131. </th>
  132. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  133. id="td_usertype"></td>
  134. </tr>
  135. <tr>
  136. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">User Address:
  137. </th>
  138. <td colspan="5" class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  139. id="td_useraddress"></td>
  140. </tr>
  141. </table>
  142. </div>
  143. </div>
  144. <div class="col-md-12 col-lg-12 col-sm-12 mb-2">
  145. <input type="hidden" class="form-control text-center" name="bookingid"
  146. id="bookingid" disabled />
  147. <div class="card-body">
  148. <table>
  149. <tr>
  150. <th colspan="10" style="background-color: #f2f2f2;">Hall Details</th>
  151. </tr>
  152. <tr>
  153. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">Hall Name:
  154. </th>
  155. <td colspan="10" class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  156. id="td_hallName"></td>
  157. </tr>
  158. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">Hall Address:</th>
  159. <td colspan="10" class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  160. id="td_halladdress"></td>
  161. </tr>
  162. <tr>
  163. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">Caretaker
  164. Name:</th>
  165. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  166. id="td_caretakername"></td>
  167. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">Caretaker
  168. Mobile Number:</th>
  169. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  170. id="td_caretakermobileNumber"></td>
  171. </tr>
  172. </table>
  173. </div>
  174. </div>
  175. <div class="col-md-12 col-lg-12 col-sm-12">
  176. <input type="hidden" class="form-control text-center" name="settlementid"
  177. id="settlementid" disabled />
  178. <div class="card-body">
  179. <table>
  180. <tr>
  181. <th colspan="4" style="background-color: #f2f2f2;">Booking
  182. Details of Booking Id:-<span id="booking_id"
  183. style="color:blue"></span></th>
  184. </tr>
  185. <tr>
  186. <th style="padding: 0.45rem 0.45rem;font-weight: normal">Booking Date:
  187. </th>
  188. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  189. id="td_bookingDate"></td>
  190. <th style="padding: 0.45rem 0.45rem;font-weight: normal">Booking Status:
  191. </th>
  192. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  193. id="td_bookingStatus"></td>
  194. </tr>
  195. <tr>
  196. <th style="padding: 0.45rem 0.45rem;font-weight: normal">Start Date:
  197. </th>
  198. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  199. id="td_startDate"></td>
  200. <th style="padding: 0.45rem 0.45rem;font-weight: normal">Deposit
  201. Amount:</th>
  202. <td class="fw-semibold amount-cell " style="padding: 0.45rem 0.45rem;"
  203. id="td_depositeAmount"></td>
  204. </tr>
  205. <tr>
  206. <th style="padding: 0.45rem 0.45rem;font-weight: normal">END
  207. Date:</th>
  208. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  209. id="td_endDate"></td>
  210. <th style="padding: 0.45rem 0.45rem;font-weight: normal">Hall Amount:
  211. </th>
  212. <td class="fw-semibold amount-cell " style="padding: 0.45rem 0.45rem;"
  213. id="td_hallAmount"></td>
  214. </tr>
  215. <tr>
  216. <th style="padding: 0.45rem 0.45rem;font-weight: normal">Starting Slot:
  217. </th>
  218. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  219. id="td_startingSlot"></td>
  220. <th style="padding: 0.45rem 0.45rem;font-weight: normal">GST @18%:</th>
  221. <td class="fw-semibold amount-cell " style="padding: 0.45rem 0.45rem;"
  222. id="td_gst"></td>
  223. </tr>
  224. <tr>
  225. <th style="padding: 0.45rem 0.45rem;font-weight: normal">Ending Slot:
  226. </th>
  227. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  228. id="td_endingSlot"></td>
  229. <th style="padding: 0.45rem 0.45rem;font-weight: normal">Total Amount:
  230. </th>
  231. <td class="fw-semibold amount-cell" style="padding: 0.45rem 0.45rem;"
  232. id="td_totalAmount"></td>
  233. </tr>
  234. </table>
  235. </div>
  236. </div>
  237. <div class="col-sm-12">
  238. <!--<label class="form-label">Documents:<span class="text-danger"></span></label>-->
  239. <div class="documents" id="documents"></div>
  240. </div>
  241. <div class="col-md-12 col-lg-12 col-sm-12 mb-2">
  242. <input type="hidden" class="form-control text-center" name="bookingid"
  243. id="bookingid" disabled />
  244. <div class="card-body">
  245. <table>
  246. <tr>
  247. <th colspan="10" style="background-color: #f2f2f2;">Booking Payment
  248. Details</th>
  249. </tr>
  250. <tr>
  251. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">Transaction
  252. ID:</th>
  253. <td colspan="10" class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  254. id="td_transactionId"></td>
  255. </tr>
  256. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">Amount Received:
  257. </th>
  258. <td colspan="10" class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  259. id="td_payamountReceived"></td>
  260. </tr>
  261. <tr>
  262. <th style="padding: 0.45rem 0.45rem;font-weight: normal;">Transaction
  263. Status:</th>
  264. <td class="fw-semibold" style="padding: 0.45rem 0.45rem;"
  265. id="td_paymentStatus"></td>
  266. </tr>
  267. </table>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <div class="block-content block-content-full text-end bg-body" id="mbutton2">
  273. <button type="button" class="btn btn-sm btn-alt-secondary"
  274. data-bs-dismiss="modal">Close</button>
  275. </div>
  276. </form>
  277. </div>
  278. </div>
  279. </div>
  280. <!-- End Modal User -->
  281. <!-- Footer -->
  282. <div class="modal fade" id="fileModal" tabindex="-1" role="dialog" aria-labelledby="fileModalLabel"
  283. aria-hidden="true">
  284. <div class="modal-dialog modal-lg" role="document">
  285. <div class="modal-content">
  286. <div class="modal-header">
  287. <h5 class="modal-title" id="fileModalLabel">File Preview</h5>
  288. <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
  289. <span aria-hidden="true">&times;</span>
  290. </button>
  291. </div>
  292. <div class="modal-body">
  293. <embed id="filePreview" src="" width="100%" height="600px">
  294. </div>
  295. <div class="modal-footer">
  296. <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. <div th:replace="~{fragments/resetpassword :: div}"></div>
  302. <footer th:replace="~{fragments/footer2 :: footer}"></footer>
  303. <script th:replace="~{fragments/loginscript :: script}"></script>
  304. <script>
  305. //script to open pending form
  306. function pendingbooking(bookingId) {
  307. $.ajax({
  308. type: "GET",
  309. url: '/communityhall/api/officer/getBookingDetails',
  310. data: {
  311. 'bookingsId': bookingId
  312. },
  313. success: function (x) {
  314. //console.log(x);
  315. showBookingInfo(x);
  316. }
  317. });
  318. }
  319. function showBookingInfo(list) {
  320. $('#pendingBookingForm').modal({
  321. backdrop: 'static',
  322. keyboard: false
  323. });
  324. $('#pendingBookingForm').modal('show');
  325. document.getElementById("td_userName").innerHTML = list.users.name;
  326. document.getElementById("td_mobileNumber").innerHTML = list.users.mobileNo;
  327. document.getElementById("td_usertype").innerHTML = list.users.usertype;
  328. document.getElementById("bookingid").value = list.bookingId;
  329. var userDetails = list.users;
  330. var userDetailsString =
  331. userDetails.doorNo + ", " +
  332. userDetails.street + ", " +
  333. userDetails.area + ", " +
  334. userDetails.location + "- " +
  335. userDetails.pinCode;
  336. document.getElementById("td_useraddress").innerHTML = userDetailsString;
  337. document.getElementById("td_hallName").innerHTML = list.hallDetails.hallName;
  338. var hallDetails = list.hallDetails;
  339. var hallDetailsString =
  340. hallDetails.doorNo + ", " +
  341. hallDetails.street + ", " +
  342. hallDetails.area + ", " +
  343. hallDetails.city + "- " +
  344. hallDetails.pinCode;
  345. document.getElementById("td_halladdress").innerHTML = hallDetailsString;
  346. document.getElementById("td_caretakername").innerHTML = list.hallDetails.hallInchargeName;
  347. document.getElementById("td_caretakermobileNumber").innerHTML = list.hallDetails.hallInchargeMobno;
  348. document.getElementById("td_bookingDate").innerHTML = list.bookingDate;
  349. document.getElementById("td_depositeAmount").innerHTML = '₹ ' + parseFloat(list.depositAmount).toFixed(2);
  350. document.getElementById("td_hallAmount").innerHTML = '₹ ' + parseFloat(list.hallAmount).toFixed(2);
  351. document.getElementById("td_totalAmount").innerHTML = '₹ ' + parseFloat(list.amountReceived).toFixed(2);
  352. var gstcl = (list.hallAmount * (list.hallDetails.gst/100));
  353. var formattedGst = gstcl.toFixed(2);
  354. document.getElementById("td_gst").innerHTML = '₹ ' + formattedGst;
  355. document.getElementById("td_startDate").innerHTML = list.startDate;
  356. document.getElementById("td_endDate").innerHTML = list.endDate;
  357. document.getElementById("booking_id").innerHTML = list.bookingId;
  358. function getTimeSlot(slotValue) {
  359. //console.log("Slot Value in getTimeSlot function:", slotValue);
  360. var timeSlot;
  361. var trimmedSlotValue = String(slotValue).trim(); // Convert to string and then trim
  362. if (trimmedSlotValue === '1') {
  363. timeSlot = 'Morning';
  364. } else if (trimmedSlotValue === '2') {
  365. timeSlot = 'Evening';
  366. } else {
  367. timeSlot = 'Unknown';
  368. }
  369. //console.log("Time Slot:", timeSlot);
  370. return timeSlot;
  371. }
  372. document.getElementById("td_startingSlot").innerHTML = getTimeSlot(list.startingSlot);
  373. document.getElementById("td_endingSlot").innerHTML = getTimeSlot(list.endingSlot);
  374. document.getElementById("td_bookingStatus").innerHTML = list.bookingStatus;
  375. document.getElementById("td_transactionId").innerHTML = list.payments.transactionId;
  376. document.getElementById("td_payamountReceived").innerHTML = '₹ ' + list.payments.amountReceived;
  377. document.getElementById("td_paymentStatus").innerHTML = list.payments.paymentStatus;
  378. showReasonDocuments(list);
  379. }
  380. function showReasonDocuments(list) {
  381. $.ajax({
  382. type: "GET",
  383. url: '/communityhall/api/officer/getReasonByName',
  384. data: {
  385. 'reasonName': list.reason
  386. },
  387. success: function (x) {
  388. // console.log(x);
  389. showReasonWithDocument(x, list);
  390. }
  391. });
  392. }
  393. // Display booking documents
  394. function showReasonWithDocument(reasonData, list) {
  395. var reasonDocumentData = reasonData.reasonDocumentMasterList;
  396. var bookingDocumentsList = list.bookingDocumentsList;
  397. const reasonFieldsContainer = $('#documents');
  398. reasonFieldsContainer.empty();
  399. // Create a responsive table container
  400. var tableResponsiveDiv = $('<div>').addClass('table-responsive');
  401. // Create the table with Bootstrap classes and custom styles
  402. var table = $('<table>').addClass('table table-bordered table-striped table-vcenter js-dataTable-responsive').css({
  403. 'width': '100%',
  404. 'height': 'auto',
  405. 'border': '1px solid black'
  406. });
  407. // Create the table header (thead)
  408. var thead = $('<thead>').appendTo(table);
  409. var headerRow = $('<tr>').appendTo(thead);
  410. $('<th>').attr('colspan', '3').text('Document Details').css({
  411. 'color': 'black',
  412. 'font-weight': 'bold',
  413. 'background-color': '#f2f2f2',
  414. 'padding': '0.45rem 0.45rem'
  415. }).appendTo(headerRow);
  416. // Create header row for columns
  417. var columnHeadersRow = $('<tr>').appendTo(thead);
  418. $('<th>').text('S.No').appendTo(columnHeadersRow);
  419. $('<th>').text('Required Info').appendTo(columnHeadersRow);
  420. $('<th>').text('Required Documents').appendTo(columnHeadersRow);
  421. // Create the table body (tbody)
  422. var tbody = $('<tbody>').appendTo(table);
  423. // Iterate through the documents list and populate rows
  424. for (var i = 0; i < bookingDocumentsList.length; i++) {
  425. (function (index) {
  426. var row = $('<tr>').appendTo(tbody);
  427. $('<td>').text(index + 1).appendTo(row);
  428. // Determine the text content for the second cell
  429. var name = bookingDocumentsList[index].name ? bookingDocumentsList[index].name : ''; // Empty string if name is null or undefined
  430. var fieldText = reasonDocumentData[index].fieldName;
  431. var fullText = name ? fieldText + ': ' + name : fieldText; // Include colon only if name is not empty
  432. $('<td>').text(fullText).appendTo(row);
  433. // Create a link to view document image
  434. var viewLink = $('<a>').attr('href', 'javascript:void(0)').text(reasonDocumentData[index].docFieldName).on('click', function () {
  435. showDocumentImage(bookingDocumentsList[index].bookingDocUrl);
  436. });
  437. $('<td>').append(viewLink).appendTo(row);
  438. })(i);
  439. }
  440. // Append table to the responsive container
  441. tableResponsiveDiv.append(table);
  442. // Append table to the container in the DOM
  443. reasonFieldsContainer.append(tableResponsiveDiv);
  444. }
  445. function showDocumentImage(fileURL) {
  446. //console.log(fileURL);
  447. openFileModal(fileURL);
  448. }
  449. // Event delegation for dynamically added elements
  450. $(document).on('click', '.view-document', function () {
  451. const fileURL = $(this).data('url');
  452. openFileModal(fileURL);
  453. });
  454. function openFileModal(fileURL) {
  455. $('#filePreview').attr('src', fileURL);
  456. $('#fileModal').modal('show');
  457. }
  458. $(document).ready(
  459. function () {
  460. var buttons = [{
  461. extend: 'pageLength',
  462. className: 'btn btn-primary'
  463. }, {
  464. title: 'Data export',
  465. extend: 'copyHtml5',
  466. text: 'Copy',
  467. className: 'btn btn-primary',
  468. id: 'copyBtn'
  469. }, {
  470. extend: 'excelHtml5',
  471. text: 'Excel',
  472. className: 'btn btn-primary',
  473. id: 'excelBtn'
  474. }, {
  475. extend: 'csvHtml5',
  476. text: 'CSV',
  477. className: 'btn btn-primary',
  478. id: 'csvBtn'
  479. }, {
  480. extend: 'pdfHtml5',
  481. text: 'PDF',
  482. className: 'btn btn-primary',
  483. id: 'pdfBtn'
  484. },
  485. ];
  486. $('#bookingrejectedtable').DataTable(
  487. {
  488. dom: 'Bftip',
  489. columnDefs: [{
  490. targets: 'no-sort',
  491. orderable: false
  492. }],
  493. lengthMenu: [
  494. [50, 100, 200, 500, -1],
  495. ['50 rows', '100 rows', '200 rows',
  496. '500 rows', 'Show all']],
  497. scrollY: '50vh',
  498. fixedColumns: {
  499. left: 1,
  500. right: 1
  501. },
  502. buttons: [buttons],
  503. responsive: true,
  504. searching: true, // Enable search
  505. select: false,
  506. processing: false,
  507. });
  508. });
  509. </script>
  510. </body>
  511. </html>