This portal only for GCC Officers. Based on there roles and Group ID they can view there module`s Like PGR, QR Public Asset Feedback, Makkalai Thedi Mayor,etc...
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.

258 lines
12 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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}">
  5. </head>
  6. <body>
  7. <!--[if lt IE 8]>
  8. <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>
  9. <![endif]-->
  10. <div class="wrapper">
  11. <!-- header top menu Start -->
  12. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  13. <!-- header top menu end -->
  14. <div class="page-wrap">
  15. <!--=============== Left Menu side Start ================-->
  16. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  17. <!--=============== Left side End ================-->
  18. <div class="main-content">
  19. <div class="container-fluid">
  20. <div class="page-header">
  21. <div class="row align-items-end">
  22. <div class="col-lg-6">
  23. <div class="page-header-title">
  24. <i class="ik ik-thumbs-up bg-blue"></i>
  25. <div class="d-inline">
  26. <h5>NULM STAFF</h5>
  27. <span>Self Help Group</span>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="col-lg-6">
  32. <nav class="breadcrumb-container" aria-label="breadcrumb">
  33. <ol class="breadcrumb">
  34. <li class="breadcrumb-item">
  35. <a href="/index"><i class="ik ik-home"></i></a>
  36. </li>
  37. <li class="breadcrumb-item active" aria-current="page">Self Help Group</li>
  38. </ol>
  39. </nav>
  40. </div>
  41. </div>
  42. </div>
  43. <hr>
  44. <div class="row align-items-center justify-content-center"
  45. style="color: white;background-color:#414f69 ;padding: 10px;">
  46. <h3 class="title resizable-content">Self Help Group</h3>
  47. </div>
  48. <div class="mt-1">
  49. </div>
  50. <!-- Card Section -->
  51. <div class="card p-3 resizable-content" style="margin-bottom: 8px;color: #414f69;">
  52. <!-- Add the resizable-content class to the card sections -->
  53. <div class="card mb-3 resizable-content">
  54. <div class="card-body">
  55. <div class="row">
  56. <div class="col-md-6 d-flex justify-content-between align-items-center">
  57. <label style="font-size: large; font-weight: 700; color: #414f69;">Self Help Group:</label>
  58. <input type="text" class="form-control" id="groupName" placeholder="Enter Scheme Group Name" style="font-size: large; width: 70%;margin-bottom: 15px;">
  59. </div>
  60. </div>
  61. <div class="row">
  62. <div class="col-md-6 d-flex justify-content-between align-items-center">
  63. <label style="font-size: large; font-weight: 700; color: #414f69;">Incharge Name:</label>
  64. <input type="text" class="form-control" id="inchargeName" placeholder="Enter Incharge Name" style="font-size: large; width: 70%;margin-bottom: 15px;">
  65. </div>
  66. </div>
  67. <div class="row">
  68. <div class="col-md-6 d-flex justify-content-between align-items-center">
  69. <label style="font-size: large; font-weight: 700; color: #414f69;">Incharge Phone Number:</label>
  70. <input type="text" class="form-control" id="inchargePhoneNo" placeholder="Enter Incharge Phone Number" style="font-size: large; width: 70%;margin-bottom: 15px;">
  71. </div>
  72. </div>
  73. <div class="row">
  74. <div class="col-md-6 d-flex justify-content-between align-items-center">
  75. <label style="font-size: large; font-weight: 700; color: #414f69;">Bank Name:</label>
  76. <input type="text" class="form-control" id="bankName" placeholder="Enter Incharge Phone Number" style="font-size: large; width: 70%;margin-bottom: 15px;">
  77. </div>
  78. </div>
  79. <div class="row">
  80. <div class="col-md-6 d-flex justify-content-between align-items-center">
  81. <label style="font-size: large; font-weight: 700; color: #414f69;">Bank Branch:</label>
  82. <input type="text" class="form-control" id="bankBranch" placeholder="Enter Incharge Phone Number" style="font-size: large; width: 70%;margin-bottom: 15px;">
  83. </div>
  84. </div>
  85. <div class="row">
  86. <div class="col-md-6 d-flex justify-content-between align-items-center">
  87. <label style="font-size: large; font-weight: 700; color: #414f69;">IFSC Code:</label>
  88. <input type="text" class="form-control" id="ifscCode" placeholder="Enter Incharge Phone Number" style="font-size: large; width: 70%;margin-bottom: 15px;">
  89. </div>
  90. </div>
  91. <div class="row">
  92. <div class="col-md-6 d-flex justify-content-between align-items-center">
  93. <label style="font-size: large; font-weight: 700; color: #414f69;">Bank Account Number:</label>
  94. <input type="text" class="form-control" id="bankAccountno" placeholder="Enter Incharge Phone Number" style="font-size: large; width: 70%;margin-bottom: 15px;">
  95. </div>
  96. </div>
  97. </div>
  98. <div class="d-flex justify-content-center">
  99. <button class="btn"
  100. style="background-color: #414f69; color: white; width: 200px;padding: 10px;margin-bottom: 10px;"
  101. onclick="saveSchemeGroup()">
  102. Submit
  103. </button>
  104. <button class="btn"
  105. style="background-color: #6c757d; color: white; width: 200px;padding: 10px;margin-bottom: 10px;margin-left: 10px;"
  106. onclick="viewDetails()">
  107. View Details
  108. </button>
  109. </div>
  110. </div>
  111. <div id="detailsContainer" style="margin-top: 20px;"></div>
  112. </div>
  113. </div>
  114. </div>
  115. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  116. </div>
  117. </div>
  118. <div th:replace="~{fragments/modules/pgr/modal-box :: div}"></div>
  119. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  120. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  121. <script th:replace="~{fragments/modules/pgr/script :: script}"></script>
  122. <script th:inline="javascript">
  123. function saveSchemeGroup() {
  124. const schemeData = {
  125. groupName: document.getElementById('groupName').value,
  126. inchargeName: document.getElementById('inchargeName').value,
  127. inchargePhoneNo: document.getElementById('inchargePhoneNo').value,
  128. bankName: document.getElementById('bankName').value,
  129. bankBranch: document.getElementById('bankBranch').value,
  130. ifscCode: document.getElementById('ifscCode').value,
  131. bankAccountno: document.getElementById('bankAccountno').value
  132. };
  133. $.ajax({
  134. type: "POST",
  135. url: "/gcc/api/nulm/saveGroup", // Ensure this matches the controller's mapping
  136. contentType: "application/json",
  137. data: JSON.stringify(schemeData),
  138. success: function(response) {
  139. Swal.fire({
  140. icon: 'success',
  141. title: 'Scheme Group Saved Successfully',
  142. text: response
  143. }).then((result) => {
  144. if (result.isConfirmed) {
  145. location.reload(); // Reload the page after the user confirms the alert
  146. }
  147. });
  148. },
  149. error: function(xhr) {
  150. Swal.fire({
  151. icon: 'error',
  152. title: 'Error',
  153. text: xhr.responseText
  154. });
  155. }
  156. });
  157. }
  158. function viewDetails() {
  159. $.ajax({
  160. type: "GET",
  161. url: "/gcc/api/nulm/getAllSchemeGroups",
  162. success: function(data) {
  163. displayTable(data);
  164. },
  165. error: function(xhr) {
  166. Swal.fire({
  167. icon: 'error',
  168. title: 'Error',
  169. text: 'Could not retrieve details'
  170. });
  171. }
  172. });
  173. }
  174. function displayTable(data) {
  175. let tableHtml = `
  176. <table class="table table-bordered">
  177. <thead>
  178. <tr>
  179. <th>Group Name</th>
  180. <th>Incharge Name</th>
  181. <th>Incharge Phone Number</th>
  182. <th>Appointed</th>
  183. <th>Available</th>
  184. <th>Dropout</th>
  185. <th>Created Date</th>
  186. </tr>
  187. </thead>
  188. <tbody>
  189. `;
  190. data.forEach(item => {
  191. tableHtml += `
  192. <tr>
  193. <td>${item.group_name}</td>
  194. <td>${item.incharge_name}</td>
  195. <td>${item.incharge_phoneno}</td>
  196. <td>${item.appointed_count}</td>
  197. <td>${item.available_count}</td>
  198. <td>${item.dropout_count}</td>
  199. <td>${item.created_date}</td>
  200. </tr>
  201. `;
  202. });
  203. tableHtml += `
  204. </tbody>
  205. </table>
  206. `;
  207. document.getElementById('detailsContainer').innerHTML = tableHtml;
  208. }
  209. </script>
  210. </body>
  211. </html>