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.

415 lines
14 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/modules/base/head :: head}">
  4. </head>
  5. <style>
  6. .required {
  7. color: red;
  8. }
  9. .card-box {
  10. box-shadow: rgba(0, 0, 0, 0.5) 0px 3px 8px;
  11. }
  12. </style>
  13. <body>
  14. <div class="wrapper">
  15. <!-- header top menu Start -->
  16. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  17. <!-- header top menu end -->
  18. <div class="page-wrap">
  19. <!--=============== Left Menu side Start ================-->
  20. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  21. <!--=============== Left side End ================-->
  22. <div class="main-content">
  23. <div class="container-fluid">
  24. <div class="page-header mb-2">
  25. <div class="row align-items-end">
  26. <div class="col-lg-8">
  27. <div class="page-header-title">
  28. <i class="far fa-calendar-plus bg-blue"></i>
  29. <div class="d-inline">
  30. <h5>Dashboard QAQC</h5>
  31. <span>1913 QAQC Dashboard</span>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="col-lg-4">
  36. <nav class="breadcrumb-container" aria-label="breadcrumb">
  37. <ol class="breadcrumb">
  38. <li class="breadcrumb-item"><a href="/gcc/index"><i
  39. class="ik ik-home"></i></a></li>
  40. <li class="breadcrumb-item" aria-current="page">1913 QAQC</li>
  41. <li class="breadcrumb-item" aria-current="page">Agents
  42. QAQC</li>
  43. <li class="breadcrumb-item active" aria-current="page">Dashboard</li>
  44. </ol>
  45. </nav>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="row mt-4">
  50. <div class="col-12">
  51. <div class="card">
  52. <div
  53. class="card-header d-flex justify-content-between align-items-center">
  54. <h3 class="mb-0" style="font-weight: bold;font-size: large;"><span th:text="${agent[0]['agent_name']}" style="font-weight: bold;font-size: large;"></span>'s Task Dashboard</h3>
  55. <form id="dateForm" method="POST"
  56. action="/gcc/callcenterqaqc/agent/agentgrievancedashboard">
  57. <div class="d-flex">
  58. <!-- Date input fields for start and end dates -->
  59. <input type="date" class="form-control mr-2" id="startDate"
  60. name="startDate" placeholder="Start Date"> <input
  61. type="date" class="form-control mr-2" id="endDate"
  62. name="endDate" placeholder="Start Date">
  63. <!-- Hidden form to submit the selected dates -->
  64. <!-- <input type="hidden" id="hiddenStartDate" name="startDate">
  65. <input type="hidden" id="hiddenEndDate" name="endDate"> -->
  66. <button type="submit" class="btn btn-primary" id="searchBtn">Search</button>
  67. <button type="button" class="btn btn-secondary ml-2"
  68. id="resetBtn">Reset</button>
  69. </div>
  70. </form>
  71. </div>
  72. <div class="card-body">
  73. <div class="row mt-2">
  74. <!-- Total Calls Assigned -->
  75. <div class="col-xl-3 col-md-6 col-sm-12">
  76. <div class="card card-box p-3 text-center h-100">
  77. <h6 class="text-facebook mb-2">
  78. <b>Total Calls Assigned</b>
  79. </h6>
  80. <h4 class="text-twitter fw-700 mt-3"
  81. th:text="${details[0]?.Total_Calls_assigned}">
  82. <!-- Display Total Calls Assigned -->
  83. </h4>
  84. </div>
  85. </div>
  86. <!-- QA&QC Calls -->
  87. <div class="col-xl-3 col-md-6 col-sm-12">
  88. <div class="card card-box p-3 text-center h-100">
  89. <h6 class="text-facebook mb-2">
  90. <b>QA&QC Calls</b>
  91. </h6>
  92. <h4 class="text-twitter fw-700 mt-3"
  93. th:text=" ${details[0]?.Closed_Call_count}">
  94. <!-- Display Closed Calls Count -->
  95. </h4>
  96. </div>
  97. </div>
  98. <!-- In-progress Calls -->
  99. <div class="col-xl-2 col-md-6 col-sm-12">
  100. <div class="card card-box p-3 text-center h-100">
  101. <h6 class="text-facebook mb-2">
  102. <b>In-progress Calls</b>
  103. </h6>
  104. <h4 class="text-twitter fw-700 mt-3"
  105. th:text="${details[0]?.Inprogress_Call_count}">
  106. <!-- Display In-progress Calls Count -->
  107. </h4>
  108. </div>
  109. </div>
  110. <!-- Follow-up Calls -->
  111. <div class="col-xl-2 col-md-6 col-sm-12">
  112. <div class="card card-box p-3 text-center h-100">
  113. <h6 class="text-facebook mb-2">
  114. <b>Official Follow-up Calls</b>
  115. </h6>
  116. <h4 class="text-twitter fw-700 mt-3"
  117. th:text="${details[0]?.Followup_Call_count}">
  118. <!-- Display Follow-up Calls Count -->
  119. </h4>
  120. </div>
  121. </div>
  122. <div class="col-xl-2 col-md-6 col-sm-12">
  123. <div class="card card-box p-3 text-center h-100">
  124. <h6 class="text-facebook mb-2">
  125. <b>Public Follow-up Calls</b>
  126. </h6>
  127. <h4 class="text-twitter fw-700 mt-3"
  128. th:text="${details[0]?.PublicFollowup_Call_count}">
  129. <!-- Display Follow-up Calls Count -->
  130. </h4>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="card-block">
  136. <div class="card-header">
  137. <h3 style="font-weight: bold;">Your Performance Overview</h3>
  138. </div>
  139. <div class="card-body">
  140. <div class="row mt-2">
  141. <div class="col-xl-3 col-md-6 col-sm-12">
  142. <div class="card card-box p-3 text-center h-100">
  143. <h6 class="text-facebook mb-2">
  144. <b>Total Assigned</b>
  145. </h6>
  146. <h4 class="text-twitter fw-700 mt-3"
  147. th:text="${details2[0]?.total_data_count}"></h4>
  148. </div>
  149. </div>
  150. <!-- QA&QC Calls -->
  151. <div class="col-xl-3 col-md-6 col-sm-12">
  152. <div class="card card-box p-3 text-center h-100">
  153. <h6 class="text-facebook mb-2">
  154. <b>Finished</b>
  155. </h6>
  156. <h4 class="text-twitter fw-700 mt-3"
  157. th:text="${details2[0]?.completed_count}"></h4>
  158. </div>
  159. </div>
  160. <!-- In-progress Calls -->
  161. <div class="col-xl-3 col-md-6 col-sm-12">
  162. <div class="card card-box p-3 text-center h-100">
  163. <h6 class="text-facebook mb-2">
  164. <b>Pending</b>
  165. </h6>
  166. <h4 class="text-twitter fw-700 mt-3"
  167. th:text="${details2[0]?.pending_count}"></h4>
  168. </div>
  169. </div>
  170. <!-- Follow-up Calls -->
  171. <div class="col-xl-3 col-md-6 col-sm-12">
  172. <div class="card card-box p-3 text-center h-100">
  173. <h6 class="text-facebook mb-2">
  174. <b>Completion (%)</b>
  175. </h6>
  176. <h4 class="text-twitter fw-700 mt-3"
  177. th:text="${details2[0]?.completed_percentage}+ '%'"></h4>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. <div class="row mt-4">
  187. <div class="col-md-12">
  188. <div class="card">
  189. <div class="card-header"><h3><b>Your Task lists</b></h3></div>
  190. <div class="card-body">
  191. <div class="table-responsive">
  192. <table id="AgentQaqcDatatable"
  193. class="table table-striped table-bordered table-hover dataTable"
  194. role="grid">
  195. <thead class="thead-dark">
  196. <tr>
  197. <th rowspan="2" class="text-center">S.No</th>
  198. <th rowspan="2" class="text-center">Task ID</th>
  199. <th rowspan="2" class="text-center">Date</th>
  200. <th rowspan="2" class="text-center">Type</th>
  201. <th class="text-center" colspan="4">Performance</th>
  202. </tr>
  203. <tr>
  204. <th class="text-center">Assigned</th>
  205. <th class="text-center">Completed</th>
  206. <th class="text-center">Pending</th>
  207. <th class="text-center">Completion Percentage(%)</th>
  208. </tr>
  209. </thead>
  210. <tbody>
  211. <tr th:each="task, iterStat : ${tasks}">
  212. <td class="text-center" th:text="${iterStat.count}"></td>
  213. <td class="text-center" th:text="${task['taskid']}"></td>
  214. <td class="text-center" th:text="${task['cdate']}"></td>
  215. <td class="text-center" th:text="${task['call_category']}"></td>
  216. <td class="text-center" th:text="${task['assigned']}"></td>
  217. <td class="text-center" th:text="${task['callstaken']}"></td>
  218. <td class="text-center" th:text="${task['pending']}"></td>
  219. <td class="text-center"
  220. th:text="${task['percentage'] + '%'}"></td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  232. </div>
  233. </div>
  234. <!-- in the code use to show the download different type microsoft -->
  235. <!-- Include jQuery and Bootstrap JavaScript -->
  236. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  237. <script
  238. src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
  239. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  240. <!-- sweet alert -->
  241. <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  242. <script type="text/javascript">
  243. $(document).ready(function() {
  244. var table = $('#AgentQaqcDatatable').DataTable({
  245. dom: 'Bftip',
  246. columnDefs: [
  247. { targets: 'no-sort', orderable: false }
  248. ],
  249. lengthMenu: [
  250. [50, 100, 200, 500, -1],
  251. ['50 rows', '100 rows', '200 rows', 'Show all']
  252. ],
  253. scrollY: '50vh',
  254. fixedColumns: {
  255. left: 1,
  256. right: 1
  257. },
  258. buttons: [
  259. {
  260. extend: 'pageLength',
  261. className: 'btn btn-warning'
  262. },
  263. {
  264. title: 'Data export',
  265. extend: 'copyHtml5',
  266. text: 'Copy',
  267. className: 'btn btn-secondary',
  268. id: 'copyBtn'
  269. },
  270. {
  271. extend: 'excelHtml5',
  272. text: 'Excel',
  273. className: 'btn btn-secondary',
  274. id: 'excelBtn'
  275. },
  276. {
  277. extend: 'csvHtml5',
  278. text: 'CSV',
  279. className: 'btn btn-secondary',
  280. id: 'csvBtn'
  281. },
  282. {
  283. extend: 'pdfHtml5',
  284. text: 'PDF',
  285. className: 'btn btn-secondary',
  286. id: 'pdfBtn'
  287. }
  288. ],
  289. fixedHeader: true,
  290. autoWidth: true,
  291. responsive: true,
  292. searching: true,
  293. select: false,
  294. processing: false
  295. });
  296. /* let startDate = new Date().toISOString().split('T')[0]; // Current date in 'yyyy-mm-dd' format
  297. let endDate = new Date().toISOString().split('T')[0]; // Current date in 'yyyy-mm-dd' format
  298. console.log("Start Date:", startDate); // Logs the current date
  299. console.log("End Date:", endDate); */ // Logs the current date
  300. /* $.ajax({
  301. url: '/gcc/api/callcenterqaqc/agent/getAgentDashboardData',
  302. method: 'GET',
  303. success: function(response) {
  304. console.log("Response:", response);
  305. },
  306. error: function(xhr, status, error) {
  307. console.error("Error occurred: ", error);
  308. }
  309. }); */
  310. /* window.onload = function () {
  311. // Get the current date in YYYY-MM-DD format
  312. const today = new Date().toISOString().split('T')[0];
  313. //Set the hidden inputs with the current date
  314. document.getElementById('hiddenStartDate').value = today;
  315. document.getElementById('hiddenEndDate').value = today;
  316. // Set the date input fields to empty
  317. document.getElementById('startDate').value = '';
  318. document.getElementById('endDate').value = '';
  319. // Retrieve stored start and end date from sessionStorage (only for the current session)
  320. const storedStartDate = sessionStorage.getItem('startDate');
  321. const storedEndDate = sessionStorage.getItem('endDate');
  322. if (storedStartDate && storedEndDate) {
  323. document.getElementById('startDate').value = storedStartDate;
  324. document.getElementById('endDate').value = storedEndDate;
  325. }
  326. }; */
  327. document.getElementById('resetBtn').addEventListener('click', function () {
  328. event.preventDefault();
  329. window.location.href="/gcc/callcenterqaqc/agent/agentgrievancedashboard";
  330. });
  331. document.getElementById('searchBtn').addEventListener('click', function (e) {
  332. const startDate = document.getElementById('startDate').value;
  333. const endDate = document.getElementById('endDate').value;
  334. //console.log("startdate: ", startDate);
  335. //console.log("enddate: ", endDate);
  336. if (!startDate || !endDate) {
  337. // Show SweetAlert if dates are missing
  338. Swal.fire({
  339. icon: 'warning', // Warning icon
  340. title: 'Please select both start and end dates.',
  341. showConfirmButton: true, // Show a confirmation button
  342. timer: 3000 // Optional: Auto-close after 3 seconds
  343. });
  344. e.preventDefault(); // Prevent form submission if validation fails
  345. return;
  346. }
  347. // Submit the form to fetch the data based on the selected date range
  348. document.getElementById('dateForm').submit(); // This will submit the form
  349. });
  350. });
  351. </script>
  352. </body>
  353. </html>