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.

262 lines
8.5 KiB

3 years ago
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
3 years ago
3 years ago
3 years ago
​
​
​
​
​
3 years ago
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
3 years ago
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/modules/base/head :: head}"></head>
  4. <body>
  5. <div class="wrapper">
  6. <!-- header top menu Start -->
  7. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  8. <!-- header top menu end -->
  9. <div class="page-wrap">
  10. <!--=============== Left Menu side Start ================-->
  11. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  12. <!--=============== Left side End ================-->
  13. <div class="main-content">
  14. <div class="container-fluid">
  15. <div class="page-header">
  16. <div class="row align-items-end">
  17. <div class="col-lg-6">
  18. <div class="page-header-title">
  19. <i class="fas fa-receipt bg-blue"></i>
  20. <div class="d-inline">
  21. <h5>PGR COMPLAINT Zone Wise</h5>
  22. <span>PGR COMPLAINT Zone Wise Reports list module</span>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="col-lg-6">
  27. <nav class="breadcrumb-container" aria-label="breadcrumb">
  28. <ol class="breadcrumb">
  29. <li class="breadcrumb-item"><a href="/index"><i
  30. class="ik ik-home"></i></a></li>
  31. <li class="breadcrumb-item">PGR Complaints</li>
  32. <li class="breadcrumb-item">User ID Wise Reports</li>
  33. <li class="breadcrumb-item active" aria-current="page">Zone
  34. Wise</li>
  35. </ol>
  36. </nav>
  37. </div>
  38. </div>
  39. </div>
  40. <hr>
  41. <div class="row">
  42. <div class="col-md-12">
  43. <div class="card">
  44. <div class="card-block">
  45. <form class="" action="" onsubmit="getReport()">
  46. <div class="row">
  47. <div class="col-md-3">
  48. <label for="fromDate" class="">From Date</label> <input
  49. type="date" class="form-control" id="fromDate"
  50. name="sFrDate" th:value="${sFrDate}"
  51. data-date-format="dd/mm/yy" required>
  52. </div>
  53. <div class="col-md-3">
  54. <label for="toDate" class="">To Date</label> <input
  55. type="date" class="form-control" id="toDate" name="sToDate"
  56. th:value="${sToDate}" data-date-format="dd/mm/yy" required>
  57. </div>
  58. <div class="col-md-3">
  59. <label for="DepartmentDropdown">Select Department:</label> <select
  60. class="form-control" name="DEPT_NAME" id="zone">
  61. <option value='0' th:selected="${DEPT_NAME == 0}">----
  62. All ----</option>
  63. <option th:each="complaintdepartment : ${complaintdept}"
  64. th:value="${complaintdepartment.name}"
  65. th:text="${complaintdepartment.name}"
  66. th:selected="${DEPT_NAME == complaintdepartment.name}"></option>
  67. </select>
  68. </div>
  69. <div class="col-md-3"
  70. style="display: flex; justify-content: space-between; align-items: center; margin-top: 25px;">
  71. <button type="submit" style="width: 100%; height: auto;"
  72. class=" btn btn-sm btn-primary btn-l">search</button>
  73. </div>
  74. </div>
  75. </form>
  76. <br> <br>
  77. <div>
  78. <table id="assetDatatable"
  79. class="table table-striped table-bordered table-hover dataTable"
  80. role="grid" width="100%">
  81. <thead class="thead-dark">
  82. <tr role="row">
  83. <th class="text-center no-sort" width="1%">S.No</th>
  84. <th class="text-center" width="10%">Department</th>
  85. <th class="text-center" width="10%">User Name</th>
  86. <th class="text-center" width="10%">Mobile Number</th>
  87. <th class="text-center" width="10%">Nos</th>
  88. </tr>
  89. </theadclass="thead-dark">
  90. <tbody>
  91. <tr th:each="zonewise, i : ${zonewiselist}"
  92. class="zonewisereportlist">
  93. <td th:text="${i.count}">0</td>
  94. <td class="text-center" th:text="${zonewise.DEPT_NAME}"></td>
  95. <td class="text-center" th:text="${zonewise.USER_NAME}"></td>
  96. <td class="text-center" th:text="${zonewise.MOBILENO}"></td>
  97. <td style="text-align: center;"><a
  98. th:href="@{'/pgr/zonecomplaintlist/?Deptid=' + ${zonewise.DEPTID} + '&PgrUserID=' + ${zonewise.IDUSER} + '&nos=' + ${zonewise.NOS} + '&sFrDate=' + ${#strings.replace(sFrDate, '/', '%2F')} + '&sToDate=' + ${#strings.replace(sToDate, '/', '%2F')}}"
  99. style="text-align: center; color: blue; text-decoration: underline; cursor: default;"
  100. target="_blank" th:text="${zonewise.NOS}">
  101. View details </a></td>
  102. </tr>
  103. </tbody>
  104. <tfoot class="thead-dark">
  105. <tr>
  106. <th class="text-center">S.No</th>
  107. <th class="text-center">Department</th>
  108. <th class="text-center">User Name</th>
  109. <th class="text-center">Mobile Number</th>
  110. <th class="text-center">Nos</th>
  111. </tr>
  112. </tfoot>
  113. </table>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  122. </div>
  123. </div>
  124. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  125. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  126. <script>
  127. $(document).ready(function() {
  128. // DataTables buttons configuration
  129. var buttons = [
  130. {
  131. extend: 'pageLength',
  132. className: 'btn btn-warning'
  133. },
  134. {
  135. title: 'Data export',
  136. extend: 'copyHtml5',
  137. text: 'Copy',
  138. className: 'btn btn-secondary',
  139. id: 'copyBtn'
  140. },
  141. {
  142. extend: 'excelHtml5',
  143. text: 'Excel',
  144. className: 'btn btn-secondary',
  145. id: 'excelBtn'
  146. },
  147. {
  148. extend: 'csvHtml5',
  149. text: 'CSV',
  150. className: 'btn btn-secondary',
  151. id: 'csvBtn'
  152. },
  153. {
  154. extend: 'pdfHtml5',
  155. text: 'PDF',
  156. className: 'btn btn-secondary',
  157. id: 'pdfBtn',
  158. title:'ZoneWise'
  159. },
  160. // Additional button
  161. /*
  162. {
  163. text: '<i class="far fa-plus-square"></i> Add New Asset',
  164. className: 'btn btn-warning',
  165. action: function () {
  166. callAdd();
  167. }
  168. }
  169. */
  170. ];
  171. $('#assetDatatable').DataTable( {
  172. dom: 'Bftip',
  173. columnDefs: [
  174. { targets: 'no-sort', orderable: false }
  175. ],
  176. lengthMenu: [
  177. [ 50, 100, 200, 500, -1 ],
  178. [ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
  179. ],
  180. scrollY: '50vh',
  181. fixedColumns: {
  182. left: 1,
  183. right: 1
  184. },
  185. buttons: [buttons],
  186. fixedHeader: true,
  187. autoWidth: true,
  188. responsive: true,
  189. searching: false,
  190. select: false,
  191. processing: false,
  192. } );
  193. } );
  194. function callAdd(){
  195. $('#addForm').modal({
  196. backdrop: 'static',
  197. keyboard: false
  198. })
  199. $('#addForm').modal('show');
  200. }
  201. function getReport(){
  202. alert("wait for response to load data...")
  203. let sFrDate = document.getElementById("fromDate").value;
  204. let sToDate = document.getElementById("toDate").value;
  205. let DEPT_NAME = document.getElementById("zone")
  206. window.location.href='/zonewise?sFrDate='+sFrDate+'&sToDate='+sToDate+'&DEPT_NAME='+DEPT_NAME;
  207. }
  208. //Departments Dropdowns
  209. $(document).ready(function () {
  210. $.ajax({
  211. url: '/pgr/useridwisereport/zonewise', // Change this URL to your endpoint
  212. type: 'GET',
  213. success: function (data) {
  214. var dropdown = $('#DepartmentDropdown')
  215. $.each(data, function (index, complaintdepartment) {
  216. dropdown.append($('<option></option>').attr('value', complaintdepartment.id).text(complaintdepartment.name));
  217. });
  218. },
  219. error: function () {
  220. alert('Error loading departments.');
  221. }
  222. });
  223. });
  224. </script>
  225. </body>
  226. </html>