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.

371 lines
17 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
  1. <!doctype html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="fragments/head-public :: head"></head>
  4. <!-- Page JS Plugins CSS -->
  5. <link rel="stylesheet" href="assets/js/plugins/raty-js/jquery.raty.css">
  6. <body>
  7. <!-- Page Container -->
  8. <div id="page-container" class="sidebar-o sidebar-dark enable-page-overlay side-scroll page-header-fixed page-header-dark">
  9. <header id="page-header">
  10. <!-- Header Content -->
  11. <div class="content-header p-0">
  12. <div class="row col-12 pt-1" style="margin:0px;">
  13. <div class="col-2 text-center">
  14. <img src="assets/media/images/tamilnadu-logo.png" style="padding-top:2px;" width="50px" alt="Tamilnadu Logo">
  15. </div>
  16. <div class="col-8 text-center">
  17. Government of Tamil Nadu<br>
  18. தமிழ்நாடு அரசு<br>
  19. பெருநகர சென்னை மாநகராட்சி
  20. </div>
  21. <div class="col-2 text-center">
  22. <img src='assets/media/images/logo-sm.png' width="55" alt="Logo Sm">
  23. </div>
  24. </div>
  25. </div>
  26. </header>
  27. <!-- Main Container -->
  28. <main id="main-container">
  29. <!-- Hero -->
  30. <div class="bg-image">
  31. <img src="/assets/media/images/chennai_bg.png" width="100%">
  32. </div>
  33. <!-- END Hero -->
  34. <!-- Page Content -->
  35. <div class="content">
  36. <div class="row">
  37. <div class="col-12">
  38. <!-- Content -->
  39. <div class="flex-grow-1 d-flex align-items-center p-5 bg-body-light" th:if="${assetId <= 0}">
  40. <div class="w-100">
  41. <p class="text-danger fs-4 fw-bold text-uppercase mb-2">
  42. 500 Error
  43. </p>
  44. <h1 class="fw-bold mb-2">
  45. Internal Server Error
  46. </h1>
  47. <p class="fs-4 fw-medium text-muted mb-5">
  48. We are sorry but there was an issue with our server and couldn’t fulfill your request.
  49. </p>
  50. </div>
  51. </div>
  52. <!-- END Content -->
  53. <form th:action="@{/gcc-complaint/save}" th:object="${saveFeedback}" id="saveFeedbackForm" method="post" onsubmit="return validate();" th:if="${assetId > 0}">
  54. <!-- Asset Details -->
  55. <div class="card alert-primary mb-3">
  56. <div class="card-header bg-secondary text-white">
  57. Gcc Asset Details
  58. </div>
  59. <div class="mb-3">
  60. <div class="card-body">
  61. <label for="assetId">Asset Id</label>
  62. <div class="mb-0 text-center">
  63. <!--<p class="card-title mb-0 text-center" th:text="${assetId}">Title</p>-->
  64. <input type="text" class="form-control text-center" name="person" id="person" th:value="${assetId}" readonly />
  65. </div>
  66. <div class="mb-0">
  67. <p class="card-title mb-0 text-center" th:text="${assetAddress}">Address</p>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="card">
  72. <div class="card-header bg-primary text-white">
  73. Employee Details
  74. </div>
  75. <div class="card-body">
  76. <div class="mb-3">
  77. <label for="person">Name (Optional):</label>
  78. <input type="text" class="form-control" name="person" id="person" placeholder="" required />
  79. <p class="card-title mb-0 text-center" th:text="${person}">Address</p>
  80. </div>
  81. <div class="mb-3">
  82. <label for="mobile">Mobile No:</label>
  83. <input type="text" minlength="10" maxlength="10" pattern="\d*" class="form-control" name="mobile" id="mobile" placeholder="" required />
  84. </div>
  85. </div>
  86. </div>
  87. <div class="card">
  88. <div class="card-header bg-warning text-white">
  89. Complaint Form
  90. </div>
  91. <div class="card-body">
  92. <div class="table-responsive">
  93. <table class="table mb-0" style="padding:0px;">
  94. <tbody>
  95. <!-- Category Questions -->
  96. <tr style="border-bottom:0px;" th:each="questions, i : ${feedbackquestionlist}">
  97. <td style="vertical-align:top"><span class="nav-main-link-badge badge rounded-pill bg-primary" th:text="${i.count}">.)</span></td>
  98. <td>
  99. <p style="margin-bottom: 0.430rem;" th:text="${questions.engQuestion}"></p>
  100. <p th:text="${questions.tamilQuestion}"></p>
  101. <div class="col-md-9 px-5 py-1">
  102. <div class="form-check form-check-inline">
  103. <input class="form-check-input" type="radio" th:name="'cq_' + ${questions.cmqId}" th:id="'cq_' + ${questions.cmqId} + '_1'" value="yes" required>
  104. <label class="form-check-label" th:for="'cq_' + ${questions.cmqId} + '_1'">ஆம் / Yes</label>
  105. </div>
  106. <div class="form-check form-check-inline" >
  107. <input class="form-check-input" type="radio" th:name="'cq_' + ${questions.cmqId}" th:id="'cq_' + ${questions.cmqId} + '_2'" value="no" required>
  108. <label class="form-check-label" th:for="'cq_' + ${questions.cmqId} + '_2'">இல்லை / NO</label>
  109. </div>
  110. </div>
  111. </td>
  112. </tr>
  113. <!-- Parameter Questions -->
  114. <tr style="border-bottom:0px;" th:each="paramQuestions, j : ${assetparameterquestionlist}">
  115. <td style="vertical-align:top" th:text="${j.count + feedbackquestionlist.size}">.)</td>
  116. <td>
  117. <p style="margin-bottom: 0.430rem;" th:text="${paramQuestions.engQuestion}"></p>
  118. <p th:text="${paramQuestions.tamilQuestion}"></p>
  119. <div class="col-md-9 px-5 py-1">
  120. <div class="form-check form-check-inline">
  121. <input class="form-check-input" type="radio" th:name="'pq_' + ${paramQuestions.apqId}" th:id="'pq_' + ${paramQuestions.apqId} + '_1'" value="yes" required>
  122. <label class="form-check-label" th:for="'pq_' + ${paramQuestions.apqId} + '_1'">Yes</label>
  123. </div>
  124. <div class="form-check form-check-inline">
  125. <input class="form-check-input" type="radio" th:name="'pq_' + ${paramQuestions.apqId}" th:id="'pq_' + ${paramQuestions.apqId} + '_2'" value="no" required>
  126. <label class="form-check-label" th:for="'pq_' + ${paramQuestions.apqId} + '_2'">NO</label>
  127. </div>
  128. </div>
  129. </td>
  130. </tr>
  131. <!-- Asset Questions -->
  132. <tr style="border-bottom:0px;" th:each="assetQuestion, k : ${assetquestionlist}">
  133. <td style="vertical-align:top" th:text="${k.count + feedbackquestionlist.size + assetparameterquestionlist.size}">.)</td>
  134. <td>
  135. <p style="margin-bottom: 0.430rem;" th:text="${assetQuestion.engQuestion}"></p>
  136. <p th:text="${assetQuestion.tamilQuestion}"></p>
  137. <div class="col-md-9 px-5 py-1">
  138. <div class="form-check form-check-inline">
  139. <input class="form-check-input" type="radio" th:name="'aq_' + ${assetQuestion.aqId}" th:id="'aq_' + ${assetQuestion.aqId} + '_1'" value="yes" required>
  140. <label class="form-check-label" th:for="'aq_' + ${assetQuestion.aqId} + '_1'">ஆம் / Yes</label>
  141. </div>
  142. <div class="form-check form-check-inline">
  143. <input class="form-check-input" type="radio" th:name="'aq_' + ${assetQuestion.aqId}" th:id="'aq_' + ${assetQuestion.aqId} + '_2'" value="on" required>
  144. <label class="form-check-label" th:for="'aq_' + ${assetQuestion.aqId} + '_2'">இல்லை / NO</label>
  145. </div>
  146. </div>
  147. </td>
  148. </tr>
  149. </tbody>
  150. </table><!--end /table-->
  151. </div>
  152. </div>
  153. </div>
  154. <div class="card">
  155. <div class="card-header bg-success text-white">
  156. Overall Satisfaction?
  157. </div>
  158. <div class="card-body text-center rating">
  159. <div class="js-rating" style="font-size:26px;"></div>
  160. </div><!---end card-body-->
  161. <div class="card-footer text-center">
  162. <button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Reset</button>
  163. <button type="submit" class="btn btn-primary btn-sm">Submit</button>
  164. </div><!--end modal-footer-->
  165. </div>
  166. </form>
  167. </div> <!-- end col -->
  168. </div> <!-- end row -->
  169. </div>
  170. <!-- END Page Content -->
  171. </main>
  172. <!-- END Main Container -->
  173. <!-- Footer -->
  174. <footer th:replace="fragments/footer :: footer"></footer>
  175. <!-- END Footer -->
  176. <!-- PopUp Modal Form -->
  177. <div class="modal fade" id="loginForm" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
  178. <div class="modal-dialog" role="document">
  179. <div class="modal-content">
  180. <form action="#" th:action="@{/updateParameterQuestion}" th:object="${parameterquestion}" method="post" onsubmit="return sendOTP();">
  181. <div class="block block-rounded block-themed block-transparent mb-0">
  182. <div class="block-header bg-primary-dark">
  183. <h3 class="block-title">OTP Login</h3>
  184. <div class="block-options">
  185. <button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
  186. <i class="fa fa-fw fa-times"></i>
  187. </button>
  188. </div>
  189. </div>
  190. <div class="block-content">
  191. <div class="row">
  192. <div class="mb-3 text-center">
  193. <img src="assets/media/images/mobileotp.png" width="50%" alt="Mobileotp">
  194. </div>
  195. <div class="mb-3 text-center">
  196. <h4>OTP Verification</h4>
  197. <p class="text-mute">We will send you a one-time password to<br>this mobile number</p>
  198. </div>
  199. <div class="mb-3 text-center">
  200. <label for="mobile">Enter Mobile Number</label>
  201. <input type="text" minlength="10" maxlength="10" pattern="\d*" class="form-control text-center" name="mobileNo" id="mobileNo" placeholder="" required />
  202. </div>
  203. </div><!--end row-->
  204. </div><!--end modal-body-->
  205. </div>
  206. <div class="block-content block-content-full text-end bg-body">
  207. <button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
  208. <button type="submit" class="btn btn-primary btn-sm">Get OTP</button>
  209. </div><!--end modal-footer-->
  210. </form>
  211. </div><!--end modal-content-->
  212. </div><!--end modal-dialog-->
  213. </div><!--end modal-->
  214. <!-- PopUp Modal OTP Form -->
  215. <div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel" aria-hidden="true">
  216. <div class="modal-dialog" role="document">
  217. <div class="modal-content">
  218. <form action="#" th:action="@{/updateParameterQuestion}" th:object="${parameterquestion}" method="post" onsubmit="return verifyOtp();">
  219. <div class="block block-rounded block-themed block-transparent mb-0">
  220. <div class="block-header bg-primary-dark">
  221. <h3 class="block-title">OTP Login</h3>
  222. <div class="block-options">
  223. <button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
  224. <i class="fa fa-fw fa-times"></i>
  225. </button>
  226. </div>
  227. </div>
  228. <div class="block-content">
  229. <div class="row">
  230. <div class="mb-3 text-center">
  231. <img src="assets/media/images/mobileotp.png" width="50%" alt="Mobileotp">
  232. </div>
  233. <div class="mb-1 text-center">
  234. <h4>OTP Verification</h4>
  235. <p class="text-mute">Enter the OTP sent to <b class="text-info" id="mobilenotxt"></b></p>
  236. </div>
  237. <div class="mb-3 text-center">
  238. <input type="text" minlength="5" maxlength="5" pattern="\d*" class="form-control text-center" name="otp" id="otp" placeholder="" required/>
  239. </div>
  240. <div class="mb-3 text-center">
  241. <p class="text-mute">Didn`t you receive the OTP? <a href="#" class="text-info" onclick="return validate();">Resend OTP</a></p>
  242. </div>
  243. </div><!--end row-->
  244. </div><!--end modal-body-->
  245. <div class="block-content block-content-full text-end bg-body">
  246. <button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
  247. <button type="submit" class="btn btn-primary btn-sm">Verify OTP</button>
  248. </div><!--end modal-footer-->
  249. </div><!--end modal-content-->
  250. </form>
  251. </div><!--end modal-content-->
  252. </div><!--end modal-dialog-->
  253. </div><!--end modal-->
  254. </div>
  255. <!-- END Page Container -->
  256. <!-- Scripts -->
  257. <script th:replace="fragments/script :: script"></script>
  258. <!-- Page JS Plugins -->
  259. <script src="assets/js/plugins/raty-js/jquery.raty.js"></script>
  260. <!-- Page JS Code -->
  261. <script src="assets/js/pages/be_comp_rating.min.js"></script>
  262. <script>
  263. function callLogin(){
  264. $('#loginForm').modal({
  265. backdrop: 'static',
  266. keyboard: false
  267. })
  268. $('#otpForm').modal({
  269. backdrop: 'static',
  270. keyboard: false
  271. })
  272. $('#otpForm').modal('hide');
  273. $('#loginForm').modal('show');
  274. }
  275. function validate()
  276. {
  277. var mobile = $("#mobile").val();
  278. //alert(mobile);
  279. $("#mobileNo").val(mobile);
  280. callLogin();
  281. return false;
  282. }
  283. function sendOTP(){
  284. var mobileNo = $("#mobileNo").val();
  285. $("#mobile").val(mobileNo); // Set final mobile number after request otp
  286. $("#mobilenotxt").html(mobileNo);
  287. $('#loginForm').modal('hide');
  288. $.ajax({
  289. type: "GET",
  290. url: '/api/sendOTP',
  291. data: {'mobileNo':mobileNo},
  292. dataType: 'json',
  293. success: function(bodyMessage) {
  294. if(bodyMessage!="Error"){
  295. //alert("OTP Send Successfully!!!");
  296. $('#otpForm').modal('show');
  297. }else{
  298. alert("Error on Sending OTP!!!");
  299. }
  300. }
  301. });
  302. return false;
  303. }
  304. //Verify OTP
  305. function verifyOtp(){
  306. var otp = $("#otp").val();
  307. //alert(otp);
  308. //document.getElementById("saveFeedbackForm").submit();
  309. $.ajax({
  310. type: "GET",
  311. url: '/api/verifyOTP',
  312. data: {'otp':otp},
  313. dataType: 'text',
  314. success: function(bodyMessage) {
  315. if(bodyMessage.trim() == "Success"){
  316. //alert("OTP is Verified!!!");
  317. document.getElementById("saveFeedbackForm").submit();
  318. } else {
  319. alert("OTP is Incorrect!!!");
  320. // do something here
  321. }
  322. },
  323. error: function() {
  324. alert("Error");// Handle error here
  325. }
  326. });
  327. return false;
  328. }
  329. </script>
  330. </body>
  331. </html>