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.

306 lines
13 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/modules/base/head :: head}"></head>
  4. <style>
  5. .required{
  6. color: red;
  7. }
  8. /* Mobile screens - targeting devices with a max width of 767px */
  9. @media (max-width: 767px)
  10. {
  11. #campaignrequestform label{
  12. margin-top: 10px;
  13. }
  14. }
  15. </style>
  16. <body>
  17. <!--[if lt IE 8]>
  18. <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>
  19. <![endif]-->
  20. <div class="wrapper">
  21. <!-- header top menu Start -->
  22. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  23. <!-- header top menu end -->
  24. <div class="page-wrap">
  25. <!--=============== Left Menu side Start ================-->
  26. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  27. <!--=============== Left side End ================-->
  28. <div class="main-content">
  29. <div class="container-fluid">
  30. <div class="page-header mb-2">
  31. <div class="row align-items-end">
  32. <div class="col-lg-8">
  33. <div class="page-header-title">
  34. <i class="far fa-calendar-plus bg-blue"></i>
  35. <div class="d-inline">
  36. <h5>Registration</h5>
  37. <span>C & D Waste Collectors Registrations</span>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="col-lg-4">
  42. <nav class="breadcrumb-container" aria-label="breadcrumb">
  43. <ol class="breadcrumb">
  44. <li class="breadcrumb-item"><a href="index"><i
  45. class="ik ik-home"></i></a></li>
  46. <li class="breadcrumb-item" aria-current="page">C & D Waste Collectors Registrations</li>
  47. <!-- <li class="breadcrumb-item active" aria-current="page">Create Campaign</li> -->
  48. </ol>
  49. </nav>
  50. </div>
  51. </div>
  52. </div>
  53. <h4 class="h4 text-right text-mute" style="font-size: 12px;">
  54. Auto refresh in <font id="refresh-countdown">00</font> seconds
  55. </h4>
  56. <div class="row">
  57. <div class="col-md-12">
  58. <div class="card" style="margin-top: 0px;">
  59. <div class="card-header justify-content-between align-items-center">
  60. <h3><b>Registration Form</b></h3>
  61. </div>
  62. <div class="card-body">
  63. <form id="cdwasteRegistrationForm">
  64. <div class="form-group">
  65. <div class="row">
  66. <div class="col-sm-12 col-md-6">
  67. <label for="name">Name<span class="required">*</span></label>
  68. <input type="text" class="form-control" id="name" placeholder="Enter Name" required>
  69. </div>
  70. <div class="col-sm-12 col-md-6">
  71. <label for="mobileNo">Mobile No<span class="required">*</span></label>
  72. <input type="number" class="form-control" id="mobileNo" placeholder="Mobile No" required>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <label for="address">Address<span class="required">*</span></label>
  78. <textarea class="form-control" id="address" rows="2" required></textarea>
  79. </div>
  80. <div class="form-group">
  81. <label for="adhaarFile">Upload Aadhaar:<span class="required">*</span></label>
  82. <input type="file" class="form-control" id="adhaar" name="adhaar" required>
  83. </div>
  84. <div class="form-group">
  85. <label for="vehicleRcBookFile">Upload Vehicle RC Book:<span class="required">*</span></label>
  86. <input type="file" class="form-control" id="vehicleRcBook" name="vehicleRcBook" required>
  87. </div>
  88. <div class="form-group text-center">
  89. <button type="submit" class="btn btn-primary" id="registerSubmit">Submit</button>
  90. <button type="reset" class="btn btn-secondary ml-2" onclick="resetForm()">Reset</button>
  91. </div>
  92. </form>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="col-md-12">
  97. <div class="card" style="display:none;">
  98. <div class="card-block">
  99. <div class="page-header-title" >
  100. <h5 style="margin: 0;font-weight: bold;">Registration Details</h5><hr>
  101. </div>
  102. <div>
  103. <table id="CDWasteDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid">
  104. <thead class="thead-dark">
  105. <tr role="row">
  106. <th class="text-center">S.No</th>
  107. <th class="text-center">Name</th>
  108. <th class="text-center">Mobile No</th>
  109. <th class="text-center">Address</th>
  110. <th class="text-center">Adhaar</th>
  111. <th class="text-center">Vechicle RC Book</th>
  112. <th class="text-center no-sort" width="%2">Action</th>
  113. </tr>
  114. </thead>
  115. <tbody>
  116. <tr th:each="campaign, i: ${campaigns}">
  117. <td th:text="${i.count}">0</td>
  118. <td th:text="${campaign.campaign_name}"></td>
  119. <td th:text="${campaign.event_dates}"></td>
  120. <td th:text="${campaign.description}"></td>
  121. <td th:text="${campaign.event_dates}"></td>
  122. <td th:text="${campaign.description}"></td>
  123. <td class="text-center">
  124. <a href="#" th:onclick="return callEdit([[${campaign.campaign_id}]])" data-animation="true" data-toggle="tooltip" data-placement="top" title="Edit" data-original-title="Edit">
  125. <i class="ik ik-edit f-16 mr-15 text-green"></i>
  126. </a>
  127. </td>
  128. </tr>
  129. </tbody>
  130. <tfoot class="thead-dark">
  131. <tr>
  132. <th class="text-center">S.No</th>
  133. <th class="text-center">Name</th>
  134. <th class="text-center">Event Date</th>
  135. <th class="text-center">Description</th>
  136. <th class="text-center">Adhaar</th>
  137. <th class="text-center">Vechicle RC Book</th>
  138. <th class="text-center no-sort" width="%2">Action</th>
  139. </tr>
  140. </tfoot>
  141. </table>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  150. </div>
  151. </div>
  152. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  153. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  154. <script src="node_modules/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.min.js"></script>
  155. <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
  156. <script type="text/javascript">
  157. $(document).ready(function() {
  158. var table = $('#CampaignDatatable').DataTable({
  159. dom: 'Bftip',
  160. columnDefs: [
  161. { targets: 'no-sort', orderable: false }
  162. ],
  163. lengthMenu: [
  164. [50, 100, 200, 500, -1],
  165. ['50 rows', '100 rows', '200 rows', 'Show all']
  166. ],
  167. scrollY: '50vh',
  168. fixedColumns: {
  169. left: 1,
  170. right: 1
  171. },
  172. buttons: [
  173. {
  174. extend: 'pageLength',
  175. className: 'btn btn-warning'
  176. },
  177. {
  178. title: 'Data export',
  179. extend: 'copyHtml5',
  180. text: 'Copy',
  181. className: 'btn btn-secondary',
  182. id: 'copyBtn'
  183. },
  184. {
  185. extend: 'excelHtml5',
  186. text: 'Excel',
  187. className: 'btn btn-secondary',
  188. id: 'excelBtn'
  189. },
  190. {
  191. extend: 'csvHtml5',
  192. text: 'CSV',
  193. className: 'btn btn-secondary',
  194. id: 'csvBtn'
  195. },
  196. {
  197. extend: 'pdfHtml5',
  198. text: 'PDF',
  199. className: 'btn btn-secondary',
  200. id: 'pdfBtn'
  201. }
  202. ],
  203. fixedHeader: true,
  204. autoWidth: true,
  205. responsive: true,
  206. searching: false,
  207. select: false,
  208. processing: false
  209. });
  210. });
  211. $(document).ready(function () {
  212. $('#cdwasteRegistrationForm').on('submit', function (event) {
  213. event.preventDefault(); // Prevent default form submission
  214. var name = $('#name').val();
  215. var mobileNo = $('#mobileNo').val();
  216. var address = $('#address').val();
  217. var adhaarFile = $('#adhaar')[0].files[0];
  218. var vehicleRcBookFile = $('#vehicleRcBook')[0].files[0];
  219. if (!name || !mobileNo || !address || !adhaarFile || !vehicleRcBookFile) {
  220. Swal.fire({
  221. icon: 'error',
  222. title: 'Error',
  223. text: 'All fields are required!'
  224. });
  225. return;
  226. }
  227. var formData = new FormData(this); // 'this' refers to the form element
  228. $.ajax({
  229. url: '/gcc/api/registration/register',
  230. type: 'POST',
  231. data: formData,
  232. processData: false, // Required for FormData
  233. contentType: false, // Required for FormData
  234. success: function (response) {
  235. if (response[0].status === 'success') {
  236. Swal.fire({
  237. icon: 'success',
  238. title: 'Success',
  239. text: response[0].message
  240. }).then((result) => {
  241. if (result.isConfirmed) {
  242. $('#cdwasteRegistrationForm')[0].reset();
  243. location.reload();
  244. }
  245. });
  246. } else {
  247. Swal.fire({
  248. icon: 'error',
  249. title: 'Error',
  250. text: response[0].message
  251. });
  252. }
  253. },
  254. error: function (xhr, status, error) {
  255. Swal.fire({
  256. icon: 'error',
  257. title: 'Error',
  258. text: 'An error occurred: ' + error
  259. });
  260. }
  261. });
  262. });
  263. });
  264. </script>
  265. </body>
  266. </html>