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.

269 lines
14 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html lang="en" dir="">
  3. <html xmlns:th="http://www.thymeleaf.org">
  4. <head th:replace="~{fragments/modules/base/head :: head}"></head>
  5. <body>
  6. <!--[if lt IE 8]>
  7. <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
  8. <![endif]-->
  9. <div class="wrapper">
  10. <!-- header top menu Start -->
  11. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  12. <!-- header top menu end -->
  13. <div class="page-wrap">
  14. <!--=============== Left Menu side Start ================-->
  15. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  16. <!--=============== Left side End ================-->
  17. <div class="main-content">
  18. <div class="container-fluid">
  19. <div class="page-header">
  20. <div class="row align-items-end">
  21. <div class="col-lg-6">
  22. <div class="page-header-title">
  23. <i class="fas fa-question-circle bg-blue"></i>
  24. <div class="d-inline">
  25. <h5>Asset Parameter Questions</h5>
  26. <span>QR Asset Feedback Module</span>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="col-lg-6">
  31. <nav class="breadcrumb-container" aria-label="breadcrumb">
  32. <ol class="breadcrumb">
  33. <li class="breadcrumb-item">
  34. <a href="/index"><i class="ik ik-home"></i></a>
  35. </li>
  36. <li class="breadcrumb-item">Asset QR Feedback</li>
  37. <li class="breadcrumb-item">Master</li>
  38. <li class="breadcrumb-item active" aria-current="page">Parameter Questions</li>
  39. </ol>
  40. </nav>
  41. </div>
  42. </div>
  43. </div>
  44. <hr>
  45. <div class="row">
  46. <div class="col-md-12">
  47. <div class="card">
  48. <div class="card-block">
  49. <div>
  50. <table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="99.5%">
  51. <thead class="thead-dark">
  52. <tr role="row">
  53. <th class="text-center no-sort" width="1%">S.No</th>
  54. <th class="text-center" width="20%">Parameter</th>
  55. <th class="text-center">English Question</th>
  56. <th class="text-center">Tamil Question</th >
  57. <th class="text-center" width="10%">IsActive</th>
  58. <th class="text-center no-sort" width="10%">Action</th>
  59. </tr>
  60. </theadclass="thead-dark">
  61. <tbody>
  62. <tr th:each="parameterquestion, i : ${assetparameterquestionslist}" class="${assetparameterquestionslist}">
  63. <td th:text="${i.count}">0</td>
  64. <td class="text-center" th:text="${parameterquestion.assetParameter.paramName}"></td>
  65. <td th:text="${parameterquestion.engQuestion}"></td>
  66. <td th:text="${parameterquestion.tamilQuestion}"></td>
  67. <td class="text-center" th:if="${parameterquestion.isActive}"><span class="badge bg-success">Active</span></td>
  68. <td class="text-center" th:unless="${parameterquestion.isActive}"><span class="badge bg-warning">InActive</span></td>
  69. <td class="text-center">
  70. <a th:href="@{#}" th:onclick="return callEdit([[${parameterquestion.apqId}]])" data-toggle="tooltip" data-animation="true" data-placement="top" title="Edit" data-original-title="Edit"><i class="ik ik-edit f-16 mr-15 text-green"></i></a>
  71. <a th:href="@{#}" th:onclick="return callDelete( [[${parameterquestion.engQuestion}]], [[${parameterquestion.apqId}]] );" data-animation="true" data-toggle="tooltip" data-placement="top" title="Delete" data-original-title="Delete"><i class="ik ik-trash-2 f-16 mr-15 text-red"></i></a>
  72. <a th:href="@{#}" th:onclick="return callComplaints( [[${parameterquestion.engQuestion}]], [[${parameterquestion.apqId}]] );" data-animation="true" data-toggle="tooltip" data-placement="top" title="Complaint Assignment" data-original-title="Complaint Assignment"><i class="ik ik-tag f-16 text-purple"></i></a>
  73. </td>
  74. </tr>
  75. </tbody>
  76. <tfoot class="thead-dark">
  77. <tr>
  78. <th class="text-center">S.No</th>
  79. <th class="text-center">Parameter</th>
  80. <th class="text-center">English Question</th>
  81. <th class="text-center">Tamil Question</th>
  82. <th class="text-center">IsActive</th>
  83. <th class="text-center">Action</th>
  84. </tr>
  85. </tfoot>
  86. </table>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  95. </div>
  96. </div>
  97. <div class="modal fade" id="addForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
  98. <div class="modal-dialog modal-dialog-centered" role="document">
  99. <div class="modal-content">
  100. <div class="modal-header">
  101. <h5 class="modal-title" id="exampleModalCenterLabel">Master Category Form</h5>
  102. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  103. </div>
  104. <div class="modal-body">
  105. <div class="form-group row">
  106. <label for="catName" class="col-sm-12 col-form-label">Asset Category Name</label>
  107. <div class="col-sm-12">
  108. <input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
  109. </div>
  110. </div>
  111. <div class="form-group row">
  112. <label for="isActive" class="col-sm-12 col-form-label">IsActive</label>
  113. <div class="col-sm-12">
  114. <select class="form-control" id="isActive" name="isActive" >
  115. <option value=1>Yes</option>
  116. <option value=0>No</option>
  117. </select>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="modal-footer">
  122. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  123. <button type="button" class="btn btn-primary">Save changes</button>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="modal fade" id="addForm2" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
  129. <div class="modal-dialog" role="document">
  130. <div class="modal-content">
  131. <form action="#" th:action="@{/saveCategory}" method="post">
  132. <div class="block block-rounded block-themed block-transparent mb-0">
  133. <div class="block-header bg-primary-dark">
  134. <h3 class="block-title">Master Category Form</h3>
  135. <div class="block-options">
  136. <button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
  137. <i class="fa fa-fw fa-times"></i>
  138. </button>
  139. </div>
  140. </div>
  141. <div class="block-content">
  142. <div class="form-group row">
  143. <label for="exampleInputUsername2" class="col-sm-3 col-form-label">Username</label>
  144. <div class="col-sm-9">
  145. <input type="text" class="form-control" id="exampleInputUsername2" placeholder="Username">
  146. </div>
  147. </div>
  148. <div class="form-group row">
  149. <label for="exampleInputEmail2" class="col-sm-3 col-form-label">Email</label>
  150. <div class="col-sm-9">
  151. <input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email">
  152. </div>
  153. </div>
  154. <div class="row">
  155. <div class="mb-3">
  156. <label for="catName">Asset Category Name</label>
  157. <input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
  158. <!--<small id="emailHelp" class="form-text text-muted">Set of assets grouped under this unique category</small>-->
  159. </div>
  160. <div class="mb-3">
  161. <label class="form-check-label">IsActive</label>
  162. <select class="form-select" id="isActive" name="isActive" >
  163. <option value=1>Yes</option>
  164. <option value=0>No</option>
  165. </select>
  166. </div>
  167. </div><!--end row-->
  168. </div><!--end modal-body-->
  169. </div>
  170. <div class="block-content block-content-full text-end bg-body">
  171. <button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
  172. <button type="submit" class="btn btn-primary btn-sm">Save</button>
  173. </div><!--end modal-footer-->
  174. </form>
  175. </div><!--end modal-content-->
  176. </div><!--end modal-dialog-->
  177. </div><!--end modal-->
  178. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  179. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  180. <script>
  181. $(document).ready(function() {
  182. // DataTables buttons configuration
  183. var buttons = [
  184. {
  185. extend: 'pageLength',
  186. className: 'btn btn-warning'
  187. },
  188. {
  189. title: 'Data export',
  190. extend: 'copyHtml5',
  191. text: 'Copy',
  192. className: 'btn btn-secondary',
  193. id: 'copyBtn'
  194. },
  195. {
  196. extend: 'excelHtml5',
  197. text: 'Excel',
  198. className: 'btn btn-secondary',
  199. id: 'excelBtn'
  200. },
  201. {
  202. extend: 'csvHtml5',
  203. text: 'CSV',
  204. className: 'btn btn-secondary',
  205. id: 'csvBtn'
  206. },
  207. {
  208. extend: 'pdfHtml5',
  209. text: 'PDF',
  210. className: 'btn btn-secondary',
  211. id: 'pdfBtn'
  212. },
  213. // Additional button
  214. {
  215. text: '<i class="far fa-plus-square"></i> Add New Asset Parameter Question',
  216. className: 'btn btn-warning',
  217. action: function () {
  218. callAdd();
  219. }
  220. }
  221. ];
  222. $('#assetDatatable').DataTable( {
  223. dom: 'Bftip',
  224. columnDefs: [
  225. { targets: 'no-sort', orderable: false }
  226. ],
  227. lengthMenu: [
  228. [ 50, 100, 200, 500, -1 ],
  229. [ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
  230. ],
  231. scrollY: '50vh',
  232. fixedColumns: {
  233. left: 1,
  234. right: 1
  235. },
  236. buttons: [buttons],
  237. responsive: true,
  238. searching: false,
  239. select: false,
  240. processing: false,
  241. } );
  242. } );
  243. function callAdd(){
  244. $('#addForm').modal({
  245. backdrop: 'static',
  246. keyboard: false
  247. })
  248. $('#addForm').modal('show');
  249. }
  250. </script>
  251. </body>
  252. </html>