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.

250 lines
8.1 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
  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-8">
  18. <div class="page-header-title">
  19. <i class="fa fa-calendar bg-blue"></i>
  20. <div class="d-inline">
  21. <h5>PGR COMPLAINT AGE ANALYSIS</h5>
  22. <span>PGR COMPLAINT AGE ANALYSIS Reports list module</span>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="col-lg-4">
  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">AGE
  34. ANALYSIS</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. <br>
  70. <br>
  71. <div class="col-md-3"
  72. style="display: flex; justify-content: space-between; align-items: center; margin-top: 25px;">
  73. <button type="submit" style="height: auto; width: 100%;"
  74. class="btn btn-primary">Search</button>
  75. </div>
  76. </div>
  77. </form>
  78. <br> <br>
  79. <div>
  80. <table id="assetDatatable"
  81. class="table table-striped table-bordered table-hover dataTable"
  82. role="grid" width="100%">
  83. <thead class="thead-dark">
  84. <tr role="row">
  85. <th class="text-center no-sort" width="1%">S.No</th>
  86. <th class="text-center" width="10%">Department</th>
  87. <th class="text-center" width="10%">User Name</th>
  88. <th class="text-center" width="10%">Mobile Number</th>
  89. <th class="text-center" width="10%">Nos</th>
  90. </tr>
  91. </theadclass="thead-dark">
  92. <tbody>
  93. <tr th:each="ageanwise, i : ${ageanalysislist}"
  94. class="ageanalysisreportlist">
  95. <td th:text="${i.count}">0</td>
  96. <td class="text-center" th:text="${ageanwise.DEPT_NAME}"></td>
  97. <td class="text-center" th:text="${ageanwise.USER_NAME}"></td>
  98. <td class="text-center" th:text="${ageanwise.MOBILENO}"></td>
  99. <td style="text-align: center;"><a
  100. th:href="@{'/pgr/ageanalysiscomplaintslist/?Deptid=' + ${ageanwise.DEPTID} + '&PgrUserID=' + ${ageanwise.IDUSER} + '&nos=' + ${ageanwise.NOS}+ '&sFrDate=' + ${#strings.replace(sFrDate, '/', '%2F')} + '&sToDate=' + ${#strings.replace(sToDate, '/', '%2F')}}"
  101. target="_blank" th:text="${ageanwise.NOS}"
  102. style="color: blue; text-decoration: underline; cursor: default;">
  103. View details </a></td>
  104. </tr>
  105. </tbody>
  106. <tfoot class="thead-dark">
  107. <tr>
  108. <th class="text-center">S.No</th>
  109. <th class="text-center">Department</th>
  110. <th class="text-center">User Name</th>
  111. <th class="text-center">Mobile Number</th>
  112. <th class="text-center">Nos</th>
  113. </tr>
  114. </tfoot>
  115. </table>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  124. </div>
  125. </div>
  126. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  127. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  128. <script>
  129. $(document).ready(function () {
  130. $.ajax({
  131. url: '/pgr/useridwisereport/ageanalysis', // Change this URL to your endpoint
  132. type: 'GET',
  133. success: function (data) {
  134. var dropdown = $('#DepartmentDropdown')
  135. $.each(data, function (index, complaintdepartment) {
  136. dropdown.append($('<option></option>').attr('value', complaintdepartment.id).text(complaintdepartment.name));
  137. });
  138. },
  139. error: function () {
  140. alert('Error loading departments.');
  141. }
  142. });
  143. });
  144. $(document).ready(function() {
  145. // DataTables buttons configuration
  146. var buttons = [
  147. {
  148. extend: 'pageLength',
  149. className: 'btn btn-warning'
  150. },
  151. {
  152. title: 'Data export',
  153. extend: 'copyHtml5',
  154. text: 'Copy',
  155. className: 'btn btn-secondary',
  156. id: 'copyBtn'
  157. },
  158. {
  159. extend: 'excelHtml5',
  160. text: 'Excel',
  161. className: 'btn btn-secondary',
  162. id: 'excelBtn'
  163. },
  164. {
  165. extend: 'csvHtml5',
  166. text: 'CSV',
  167. className: 'btn btn-secondary',
  168. id: 'csvBtn'
  169. },
  170. {
  171. extend: 'pdfHtml5',
  172. text: 'PDF',
  173. className: 'btn btn-secondary',
  174. id: 'pdfBtn'
  175. },
  176. // Additional button
  177. /* {
  178. text: '<i class="far fa-plus-square"></i> Add New Asset',
  179. className: 'btn btn-warning',
  180. action: function () {
  181. callAdd();
  182. }
  183. } */
  184. ];
  185. $('#assetDatatable').DataTable( {
  186. dom: 'Bftip',
  187. columnDefs: [
  188. { targets: 'no-sort', orderable: false }
  189. ],
  190. lengthMenu: [
  191. [ 50, 100, 200, 500, -1 ],
  192. [ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
  193. ],
  194. scrollY: '50vh',
  195. fixedColumns: {
  196. left: 1,
  197. right: 1
  198. },
  199. buttons: [buttons],
  200. fixedHeader: true,
  201. autoWidth: true,
  202. responsive: true,
  203. searching: false,
  204. select: false,
  205. processing: false,
  206. } );
  207. } );
  208. function callAdd(){
  209. $('#addForm').modal({
  210. backdrop: 'static',
  211. keyboard: false
  212. })
  213. $('#addForm').modal('show');
  214. }
  215. </script>
  216. </body>
  217. </html>