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.

821 lines
34 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
2 years ago
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 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. <style>
  6. .required{
  7. color: red;
  8. }
  9. #modalBody h4 {
  10. font-weight: bold;
  11. margin-top: 15px;
  12. margin-bottom: 10px;
  13. }
  14. #modalBody p {
  15. margin: 5px 0;
  16. }
  17. #modalBody hr {
  18. margin: 15px 0;
  19. }
  20. .comment {
  21. margin-bottom: 20px;
  22. }
  23. .comment p {
  24. margin: 0;
  25. }
  26. hr {
  27. border: 1px solid #ccc;
  28. margin-top: 20px;
  29. margin-bottom: 20px;
  30. }
  31. h5 {
  32. font-size: bold;
  33. }
  34. /* Limit the height of the dropdown menu and make it scrollable */
  35. .dropdown-menu {
  36. max-height: 200px; /* Adjust this value as needed */
  37. overflow-y: auto;
  38. }
  39. .col-4 {
  40. font-weight: bold;
  41. text-align: right;
  42. }
  43. .col-8 {
  44. padding-left: 20px;
  45. }
  46. .comment {
  47. padding: 10px 0;
  48. }
  49. .comment .text-muted {
  50. font-size: 0.9em;
  51. color: #6c757d;
  52. }
  53. .comment hr {
  54. border-top: 1px solid #ccc;
  55. }
  56. .comment .btn-link {
  57. font-size: 0.9em;
  58. text-decoration: underline;
  59. color: #007bff;
  60. }
  61. /* Make the modal body scrollable */
  62. #returnretrieddetailsModal .modal-body {
  63. max-height: 80vh; /* Limit the height to 70% of the viewport */
  64. overflow-y: auto; /* Enable vertical scrolling */
  65. }
  66. .card-box {
  67. border-radius: 20px;
  68. box-shadow: rgba(0, 0, 0, 0.5) 0px 3px 8px;
  69. }
  70. #followupCard {
  71. transition: transform 0.2s ease; /* Smooth scaling transition */
  72. cursor: pointer; /* Default cursor change */
  73. }
  74. #followupCard:hover {
  75. transform: scale(1.05); /* Slightly scale up on hover */
  76. cursor: pointer; /* Change cursor to hand symbol */
  77. }
  78. #receivedprovisionalModal .modal-body{
  79. max-height:80vh;
  80. overflow-y:auto;
  81. }
  82. .file-history-list {
  83. margin-top: 10px;
  84. padding-left: 0;
  85. }
  86. .file-history-item {
  87. display: flex;
  88. padding: 5px 10px;
  89. align-items: flex-start;
  90. position: relative; /* For vertical line positioning */
  91. margin-bottom: 1px; /* Add space between items */
  92. }
  93. .file-history-item::before {
  94. content: '';
  95. position: absolute;
  96. top: 0;
  97. bottom: 0;
  98. left: 120px; /* Position of the vertical line */
  99. width: 1px;
  100. background-color: #ddd;
  101. }
  102. .file-history-date {
  103. margin-top: 10px;
  104. flex: 0 0 100px;
  105. font-weight: bold;
  106. font-size: 0.8rem;
  107. color: #333;
  108. text-align: center;
  109. white-space: nowrap; /* Prevent wrapping */
  110. }
  111. .file-history-content {
  112. flex: 5;
  113. padding-left: 20px; /* Adds space after the vertical line */
  114. display: flex;
  115. flex-direction: column;
  116. gap: 5px; /* Adds spacing between status and remarks */
  117. white-space: pre-wrap; /* Prevents wrapping */
  118. overflow: visible; /* Prevents content overflow */
  119. text-overflow: ellipsis; /* Adds ellipsis if content exceeds container width */
  120. }
  121. .file-history-status {
  122. font-size: 0.8rem;
  123. font-weight: bold;
  124. color: #555;
  125. white-space:pre-wrap; /* Prevent wrapping */
  126. overflow: visible;
  127. text-overflow: ellipsis;
  128. }
  129. .file-history-remarks {
  130. font-size: 0.8rem;
  131. color: #777;
  132. white-space: pre-wrap; /* Prevent wrapping */
  133. overflow: visible;
  134. text-overflow: ellipsis;
  135. }
  136. #sec1 .col-md-4,.col-md-12{
  137. padding-top: 1%;
  138. }
  139. .col-md-4 .form-check{
  140. width: 25%;
  141. }
  142. .col-md-6 .form-check{
  143. width: 25%;
  144. }
  145. </style>
  146. <body>
  147. <!--[if lt IE 8]>
  148. <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>
  149. <![endif]-->
  150. <div class="wrapper">
  151. <!-- header top menu Start -->
  152. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  153. <!-- header top menu end -->
  154. <div class="page-wrap">
  155. <!--=============== Left Menu side Start ================-->
  156. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  157. <!--=============== Left side End ================-->
  158. <div class="main-content">
  159. <div class="container-fluid">
  160. <div class="page-header mb-2">
  161. <div class="row align-items-end">
  162. <div class="col-lg-8">
  163. <div class="page-header-title">
  164. <i class="fa fa-list-alt bg-blue"></i>
  165. <div class="d-inline">
  166. <h5> Pendency</h5>
  167. <span>Department Entries</span>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="col-lg-4">
  172. <nav class="breadcrumb-container" aria-label="breadcrumb">
  173. <ol class="breadcrumb">
  174. <li class="breadcrumb-item"><a href="/gcc/index"><i class="ik ik-home"></i></a></li>
  175. <li class="breadcrumb-item" aria-current="page">Department Entries</li>
  176. <li class="breadcrumb-item" aria-current="page">Completed</li>
  177. <li class="breadcrumb-item active" aria-current="page">Pendency</li>
  178. </ol>
  179. </nav>
  180. </div>
  181. </div>
  182. </div>
  183. <div class="row mt-4">
  184. <div class="col-md-12">
  185. <div class="card">
  186. <div class="card-block">
  187. <span th:text="${filecategory}" id="filecategory" style="display:none"></span>
  188. <h5 style="font-weight:bold;"> <span th:text="${deptname}" id="deptname"></span>&nbsp;Department</h5>
  189. <h5 style="font-weight:bold;"><span th:text="${deptId}" id="deptId" style="display:none"></span>Completed - Pendency</h5>
  190. <span th:text="${userId}" id="userId" style="display:none"></span>
  191. <div id="audittable">
  192. <table id="AuditDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid">
  193. <thead class="thead-dark">
  194. <tr role="row">
  195. <th class="text-center">S.No</th>
  196. <th class="text-center">Employee Code</th>
  197. <th class="text-center">Name </th>
  198. <th class="text-center">Department</th>
  199. <th class="text-center">Designation</th>
  200. <th class="text-center">File Sent Date</th>
  201. <th class="text-center">File Type</th>
  202. <th class="text-center">View</th>
  203. </tr>
  204. </thead>
  205. <tbody style="text-align:center;">
  206. <!-- Thymeleaf loop to populate data -->
  207. <tr th:each="provisional, iterStat : ${provisionallist}">
  208. <td th:text="${iterStat.index + 1}" class="text-center"></td>
  209. <td th:text="${provisional['emp_no']}" class="text-center"></td>
  210. <td th:text="${provisional['emp_name']}" class="text-center"></td>
  211. <td th:text="${provisional['dept_name']}" class="text-center"></td>
  212. <td th:text="${provisional['designation']}" class="text-center"></td>
  213. <td th:text="${provisional['file_moved_date'] != null ? #dates.format(provisional['file_moved_date'], 'dd-MM-yyyy') : 'N/A'}" class="text-center"></td>
  214. <td th:text="${provisional['file_entry_type']}" class="text-center"></td>
  215. <td class="text-center">
  216. <button class="btn btn-primary btn-sm view-btn" th:attr="data-id=${provisional['emp_no']}, data-temp-id=${provisional['temp_id']}">
  217. View
  218. </button>
  219. </td>
  220. </tr>
  221. </tbody>
  222. </table>
  223. </div>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  231. </div>
  232. </div>
  233. <!-- Modal Box -->
  234. <div class="modal fade" id="returnretrieddetailsModal" tabindex="-1" role="dialog" aria-labelledby="detailsModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
  235. <div class="modal-dialog modal-xl" role="document">
  236. <div class="modal-content">
  237. <div class="modal-header">
  238. <h5 class="modal-title" id="detailsModalLabel">
  239. Completed - Pendency (<span id="modalEmployeeCode"></span>)
  240. </h5>
  241. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  242. <span aria-hidden="true">&times;</span>
  243. </button>
  244. </div>
  245. <div class="modal-body">
  246. <div class="row" id="sec1">
  247. <!-- Employee No -->
  248. <div class="col-md-4">
  249. <label for="employeenomodel" class="form-label fw-bold">Employee No </label>
  250. <input type="number" id="employeenomodel" class="form-control" readonly>
  251. </div>
  252. <!-- Employee Name -->
  253. <div class="col-md-4">
  254. <label for="employeename" class="form-label fw-bold">Employee Name </label>
  255. <input type="text" id="employeename" class="form-control" readonly>
  256. </div>
  257. <!-- Department -->
  258. <div class="col-md-4">
  259. <label for="department" class="form-label fw-bold">Department </label>
  260. <input type="text" id="department" class="form-control" readonly>
  261. </div>
  262. <!-- Designation -->
  263. <div class="col-md-4">
  264. <label for="designation" class="form-label fw-bold">Designation </label>
  265. <input type="text" id="designation" class="form-control" readonly>
  266. </div>
  267. <div class="col-md-4">
  268. <label for="classes" class="form-label fw-bold">Class</label>
  269. <input type="text" id="classes" class="form-control" readonly>
  270. </div>
  271. <div class="col-md-4">
  272. <label for="retirementdate" class="form-label fw-bold">Retirement Date </label>
  273. <input type="date" id="retirementdate" class="form-control" readonly>
  274. </div>
  275. <div class="col-md-4">
  276. <label for="pendingDuration" class="form-label fw-bold">
  277. Pending Duration
  278. </label>
  279. <div class="d-flex align-items-center">
  280. <div class="form-check" style="padding-right:10px;">
  281. <input type="radio" id="yes" name="pendingDuration" value="yes"class="form-check-input" disabled>
  282. <label for="yes" class="form-check-label">Yes</label>
  283. </div>
  284. <div class="form-check">
  285. <input type="radio" id="no" name="pendingDuration" value="no"class="form-check-input" disabled>
  286. <label for="no" class="form-check-label">No</label>
  287. </div>
  288. </div>
  289. <div class="text" id="pendingDurationInputContainer" style="display: none; margin-top: 10px;">
  290. <input type="text" id="pendingDurationInput" name="pendingDurationValue" class="form-control" placeholder="Enter details for pending duration" readonly>
  291. </div>
  292. </div>
  293. <!-- Type of Retirement -->
  294. <div class="col-md-4">
  295. <label for="typeofretirement" class="form-label fw-bold">Type of Retirement </label>
  296. <input type="text" id="typeofretirement" class="form-control" readonly>
  297. </div>
  298. <!-- Date File Sent to Audit -->
  299. <div class="col-md-4">
  300. <label for="datefile_modal" class="form-label fw-bold">Date File Completed </label>
  301. <input type="date" id="datefile_modal" class="form-control" readonly>
  302. </div>
  303. <!-- Remarks -->
  304. <div class="col-md-12">
  305. <label for="remarks_modal" class="form-label fw-bold">Comments/Remarks </label>
  306. <textarea id="remarks_modal" class="form-control" rows="4" placeholder="Enter your remarks here" readonly></textarea>
  307. </div>
  308. <!-- new -->
  309. <div class="col-md-12 mt-4">
  310. <h5>File History</h5>
  311. <div id="fileHistoryContainer" class="file-history-list">
  312. <!-- File History will be dynamically loaded here -->
  313. </div>
  314. </div>
  315. <div class="col-md-12 ">
  316. <span style="font-weight: bold;font-size: medium;text-decoration: underline;">Department Benefits</span>
  317. </div>
  318. <!-- GPF -->
  319. <div class="col-md-4 mb-2">
  320. <label class="form-label fw-bold">GPF</label>
  321. <div class="d-flex align-items-center gap-5">
  322. <div class="form-check">
  323. <input class="form-check-input" type="radio" id="gpfYes" name="gpf" value="yes" disabled>
  324. <label class="form-check-label" for="gpfYes">Yes</label>
  325. </div>
  326. <div class="form-check">
  327. <input class="form-check-input" type="radio" id="gpfNo" name="gpf" value="no" disabled>
  328. <label class="form-check-label" for="gpfNo">No</label>
  329. </div>
  330. <div class="form-check">
  331. <input class="form-check-input" type="radio" id="gpf50" name="gpf" value="90" disabled>
  332. <label class="form-check-label" for="gpf50">90%</label>
  333. </div>
  334. </div>
  335. <!-- Placeholder for dynamically added input -->
  336. <div id="gpfAmountDiv" class="mt-3" style="display: none;">
  337. <label for="gpfAmount" class="form-label">Enter GPF Amount</label>
  338. <input type="number" id="gpfAmount" class="form-control" placeholder="Enter GPF amount" readonly>
  339. </div>
  340. </div>
  341. <!-- Earned Leave & Leave on Private Affairs -->
  342. <div class="col-md-4 mb-2">
  343. <label class="form-label fw-bold">Earned Leave & Leave on Private Affairs</label>
  344. <div class="d-flex align-items-center gap-5">
  345. <div class="form-check">
  346. <input class="form-check-input" type="radio" id="earnedleaveYes" name="earnedleave" value="yes" disabled>
  347. <label class="form-check-label" for="earnedleaveYes">Yes</label>
  348. </div>
  349. <div class="form-check">
  350. <input class="form-check-input" type="radio" id="earnedleaveNo" name="earnedleave" value="no" disabled>
  351. <label class="form-check-label" for="earnedleaveNo">No</label>
  352. </div>
  353. </div>
  354. <!-- Placeholder for dynamically added input -->
  355. <div id="earnedleaveAmountDiv" class="mt-3" style="display: none;">
  356. <label for="earnedleaveAmount" class="form-label">Enter EL and LPA Amount</label>
  357. <input type="number" id="earnedleaveAmount" class="form-control" placeholder="Enter Amount" readonly>
  358. </div>
  359. </div>
  360. <!-- SPFGS -->
  361. <div class="col-md-4 mb-2">
  362. <label class="form-label fw-bold">SPFGS</label>
  363. <div class="d-flex align-items-center gap-5">
  364. <div class="form-check">
  365. <input class="form-check-input" type="radio" id="spfgsYes" name="spfgs" value="yes" disabled>
  366. <label class="form-check-label" for="spfgsYes">Yes</label>
  367. </div>
  368. <div class="form-check">
  369. <input class="form-check-input" type="radio" id="spfgsNo" name="spfgs" value="no" disabled>
  370. <label class="form-check-label" for="spfgsNo">No</label>
  371. </div>
  372. </div>
  373. <!-- Placeholder for dynamically added input -->
  374. <div id="spfgsAmountDiv" class="mt-3" style="display: none;">
  375. <label for="spfgsAmount" class="form-label">Enter SPFGS Amount</label>
  376. <input type="number" id="spfgsAmount" class="form-control" placeholder="Enter spfgs Amount" readonly>
  377. </div>
  378. </div>
  379. <div class="col-md-4 mb-2">
  380. <label for="recoveryemployeevalue" class="form-label fw-bold">Recovery From Employee</label>
  381. <input type="text" id="recoveryemployeevalue" class="form-control" readonly>
  382. </div>
  383. <!-- DCRF File is Ready -->
  384. <div class="col-md-4">
  385. <label class="form-label fw-bold">DCRG File is Ready</label>
  386. <div class="d-flex align-items-center gap-5">
  387. <div class="form-check">
  388. <input class="form-check-input" type="radio" id="dcrgYes" name="dcrg" value="yes" disabled>
  389. <label class="form-check-label" for="dcrgYes">Yes</label>
  390. </div>
  391. <div class="form-check">
  392. <input class="form-check-input" type="radio" id="dcrgNo" name="dcrg" value="no" disabled>
  393. <label class="form-check-label" for="dcrgNo">No</label>
  394. </div>
  395. </div>
  396. </div>
  397. <div class="col-md-12 ">
  398. <span style="font-weight: bold;font-size: medium;text-decoration: underline;">Pension Benefits</span>
  399. </div>
  400. <!-- <div class="col-md-6 mt-2 mb-2">
  401. <label for="pensionNumber" class="form-label">Pension Number</label>
  402. <input type="number" id="pensionNumber" class="form-control" placeholder="Enter Employee Pension Number" readonly>
  403. </div>
  404. <div class="col-md-6 mt-2 mb-2">
  405. <label for="ledgerNumber" class="form-label">Ledger Number</label>
  406. <input type="number" id="ledgerNumber" class="form-control" placeholder="Enter Ledger Number" readonly>
  407. </div> -->
  408. <div class="col-md-4 mb-2">
  409. <label for="pensionNumber" class="form-label">Pension Number</label>
  410. <input type="number" id="pensionNumber" class="form-control" placeholder="Enter Employee Pension Number" readonly>
  411. </div>
  412. <div class="col-md-4 mb-2">
  413. <label for="ledgerNumber" class="form-label">Ledger Number</label>
  414. <input type="text" id="ledgerNumber" class="form-control" placeholder="Enter Ledger Number" readonly>
  415. </div>
  416. <div class="col-md-4 mb-2">
  417. <label class="form-label fw-bold">Sanctions Pensions Benefit-Pension</label>
  418. <div class="d-flex align-items-center gap-5">
  419. <div class="form-check">
  420. <input class="form-check-input" type="radio" id="bpYes" name="benefit_pension" value="yes" disabled>
  421. <label class="form-check-label" for="bpYes">Yes</label>
  422. </div>
  423. <div class="form-check">
  424. <input class="form-check-input" type="radio" id="bpNo" name="benefit_pension" value="no" disabled>
  425. <label class="form-check-label" for="bpNo">No</label>
  426. </div>
  427. </div>
  428. <!-- Placeholder for dynamically added input -->
  429. <div id="PbAmountDiv" class="mt-3" style="display: none;">
  430. <label for="benefit_pension_amount" class="form-label">Enter Pensions Benefit Amount</label>
  431. <input type="number" id="benefit_pension_amount" class="form-control" placeholder="Enter Pensions Benefit Amount" readonly>
  432. </div>
  433. </div>
  434. <div class="col-md-4 mb-2">
  435. <label class="form-label fw-bold">Sanctions Pensions Benefit-DCRG</label>
  436. <div class="d-flex align-items-center gap-5">
  437. <div class="form-check">
  438. <input class="form-check-input" type="radio" id="DcrgYes" name="benefit_dcrg" value="yes" disabled>
  439. <label class="form-check-label" for="DcrgYes">Yes</label>
  440. </div>
  441. <div class="form-check">
  442. <input class="form-check-input" type="radio" id="DcrgNo" name="benefit_dcrg" value="no" disabled>
  443. <label class="form-check-label" for="DcrgNo">No</label>
  444. </div>
  445. </div>
  446. <!-- Placeholder for dynamically added input -->
  447. <div id="dcrgAmountDiv" class="mt-3" style="display: none;">
  448. <label for="benefit_dcrg_amount" class="form-label">Enter Benefit DCRG Amount</label>
  449. <input type="number" id="benefit_dcrg_amount" class="form-control" placeholder="Enter Pensions Benefit DCRG Amount" readonly>
  450. </div>
  451. </div>
  452. <div class="col-md-4 mb-2">
  453. <label class="form-label fw-bold">Sanctions Pensions Benefit-Commutation</label>
  454. <div class="d-flex align-items-center gap-5">
  455. <div class="form-check">
  456. <input class="form-check-input" type="radio" id="commutationYes" name="benefit_commutation" value="yes" disabled>
  457. <label class="form-check-label" for="commutationYes">Yes</label>
  458. </div>
  459. <div class="form-check">
  460. <input class="form-check-input" type="radio" id="commutationNo" name="benefit_commutation" value="no" disabled>
  461. <label class="form-check-label" for="commutationNo">No</label>
  462. </div>
  463. </div>
  464. <!-- Placeholder for dynamically added input -->
  465. <div id="CommutationAmountDiv" class="mt-3" style="display: none;">
  466. <label for="benefit_commutation_amount" class="form-label">Enter Benefit Commutation Amount</label>
  467. <input type="number" id="benefit_commutation_amount" class="form-control" placeholder="Enter Pensions Benefit Commutation Amount" readonly>
  468. </div>
  469. </div>
  470. </div>
  471. <div class="row mb-2 mt-2">
  472. <div class="col-md-12 d-flex justify-content-center">
  473. <button type="button" class="btn btn-secondary" data-dismiss="modal" id="back">Back</button>
  474. </div>
  475. </div>
  476. </div>
  477. </div>
  478. </div>
  479. </div>
  480. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  481. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  482. <script src="node_modules/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.min.js"></script>
  483. <!-- Bootstrap 5 JS -->
  484. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
  485. <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  486. <script>
  487. // Initialize DataTable
  488. const table = $('#AuditDatatable').DataTable({
  489. dom: 'Bftip',
  490. columnDefs: [
  491. { targets: 'no-sort', orderable: false }
  492. ],
  493. lengthMenu: [
  494. [50, 100, 200, 500, -1],
  495. ['50 rows', '100 rows', '200 rows', 'Show all']
  496. ],
  497. scrollY: '50vh',
  498. buttons: [
  499. { extend: 'pageLength', className: 'btn btn-warning' },
  500. { title: 'Data export', extend: 'copyHtml5', text: 'Copy', className: 'btn btn-secondary' },
  501. { extend: 'excelHtml5', text: 'Excel', className: 'btn btn-secondary' },
  502. { extend: 'csvHtml5', text: 'CSV', className: 'btn btn-secondary' },
  503. { extend: 'pdfHtml5', text: 'PDF', className: 'btn btn-secondary' }
  504. ],
  505. fixedHeader: true,
  506. autoWidth: true,
  507. responsive: true,
  508. searching: true,
  509. select: false,
  510. processing: false
  511. });
  512. //model function
  513. function fetchEmployeeDetails(tempId) {
  514. $.ajax({
  515. url: '/gcc/api/department/audit/getpartialdetails', // API to fetch employee details
  516. type: 'GET',
  517. data: { tempId: tempId }, // Pass EMPLOYEE_CODE as a parameter
  518. success: function (response) {
  519. if (response && response.length > 0) {
  520. let employeeDetails = response[0]; // Access the first object in the array
  521. console.log("response:",response);
  522. // Populate modal fields
  523. $('#employeenomodel').val(employeeDetails.emp_no);
  524. $('#employeename').val(employeeDetails.emp_name);
  525. $('#department').val(employeeDetails.dept_name);
  526. $('#designation').val(employeeDetails.designation);
  527. $('#typeofretirement').val(employeeDetails.type_of_retirement);
  528. $('#classes').val(employeeDetails.retirement_class);
  529. $('#datefile_modal').val(employeeDetails.file_moved_date);
  530. $('#remarks_modal').val(employeeDetails.remarks);
  531. $('#retirementdate').val(employeeDetails.retirement_date);
  532. let pendingDuration = employeeDetails.pending_duration; // Assuming this comes from the response
  533. let pendingReason = employeeDetails.reason_for_pending; // Assuming this comes from the response
  534. if (pendingDuration === "yes") {
  535. $('#pendingDurationInputContainer').show(); // Show the text box
  536. $('#pendingDurationInput').val(pendingReason); // Populate the input field
  537. } else {
  538. $('#pendingDurationInputContainer').hide(); // Hide the text box
  539. }
  540. // Update radio button selection
  541. if (pendingDuration === "yes") {
  542. $('#yes').prop('checked', true);
  543. } else {
  544. $('#no').prop('checked', true);
  545. }
  546. // Update the modal title with the employee code
  547. $('#modalEmployeeCode').text(employeeDetails.emp_no);
  548. // Show the modal
  549. $('#returnretrieddetailsModal').modal('show');
  550. $('input[name="gpf"][value="' + employeeDetails.gpf + '"]').prop('checked', true);
  551. if (employeeDetails.gpf === "yes" || employeeDetails.gpf === "90") {
  552. $('#gpfAmountDiv').show();
  553. $('#gpfAmount').val(employeeDetails.gpf_amount);
  554. } else {
  555. $('#gpfAmountDiv').hide();
  556. }
  557. // Earned Leave & Leave on Private Affairs
  558. $('input[name="earnedleave"][value="' + employeeDetails.private_affairs + '"]').prop('checked', true);
  559. if (employeeDetails.private_affairs === "yes") {
  560. $('#earnedleaveAmountDiv').show();
  561. $('#earnedleaveAmount').val(employeeDetails.private_affairs_amount);
  562. } else {
  563. $('#earnedleaveAmountDiv').hide();
  564. }
  565. // SPFGS
  566. $('input[name="spfgs"][value="' + employeeDetails.spfgs + '"]').prop('checked', true);
  567. if (employeeDetails.spfgs === "yes") {
  568. $('#spfgsAmountDiv').show();
  569. $('#spfgsAmount').val(employeeDetails.spfgs_amount);
  570. } else {
  571. $('#spfgsAmountDiv').hide();
  572. }
  573. //recover emp
  574. $('#recoveryemployeevalue').val(employeeDetails.recovery_emp);
  575. // DCRG File
  576. $('input[name="dcrg"][value="' + employeeDetails.dcrg + '"]').prop('checked', true);
  577. $('#pensionNumber').val(employeeDetails.pension_number);
  578. $('#ledgerNumber').val(employeeDetails.ledger_number);
  579. $('input[name="benefit_pension"][value="' + employeeDetails.benefit_pension + '"]').prop('checked', true);
  580. if (employeeDetails.benefit_pension === "yes") {
  581. $('#PbAmountDiv').show();
  582. $('#benefit_pension_amount').val(employeeDetails.benefit_pension_amount);
  583. } else {
  584. $('#PbAmountDiv').hide();
  585. }
  586. $('input[name="benefit_dcrg"][value="' + employeeDetails.benefit_dcrg + '"]').prop('checked', true);
  587. if (employeeDetails.benefit_dcrg === "yes") {
  588. $('#dcrgAmountDiv').show();
  589. $('#benefit_dcrg_amount').val(employeeDetails.benefit_dcrg_amount);
  590. } else {
  591. $('#dcrgAmountDiv').hide();
  592. }
  593. $('input[name="benefit_commutation"][value="' + employeeDetails.benefit_commutation + '"]').prop('checked', true);
  594. if (employeeDetails.benefit_commutation === "yes") {
  595. $('#CommutationAmountDiv').show();
  596. $('#benefit_commutation_amount').val(employeeDetails.benefit_commutation_amount);
  597. } else {
  598. $('#CommutationAmountDiv').hide();
  599. }
  600. } else {
  601. Swal.fire({
  602. icon: 'info',
  603. title: 'No Data',
  604. text: 'No details found for the selected employee.',
  605. confirmButtonText: 'OK',
  606. });
  607. }
  608. },
  609. error: function () {
  610. Swal.fire({
  611. icon: 'error',
  612. title: 'Error',
  613. text: 'Failed to fetch employee details. Please try again.',
  614. confirmButtonText: 'OK',
  615. });
  616. },
  617. });
  618. }
  619. $(document).ready(function () {
  620. $(document).on('click', '.view-btn', function () {
  621. const empCode = $(this).data('id'); // Fetch `data-id` value
  622. const tempId = $(this).data('temp-id'); // Fetch `data-temp-id` value
  623. console.log("empCode====="+empCode);
  624. // Hide the receivedcard section before showing the modal
  625. $("#receivedcard").hide();
  626. fetchEmployeeDetails(tempId); // Call the function to fetch employee details
  627. loadFileHistory(tempId); // Load the file history for the selected employee
  628. });
  629. // Initialize the modal with static backdrop and disabled keyboard closing
  630. $('#returnretrieddetailsModal').modal({
  631. backdrop: 'static',
  632. keyboard: false,
  633. show: false // Ensure it doesn't auto-show on page load
  634. });
  635. // Handle close button click
  636. $('#back').click(function () {
  637. $('#returnretrieddetailsModal').modal('hide');
  638. });
  639. $('.close').click(function () {
  640. $('#returnretrieddetailsModal').modal('hide');
  641. });
  642. });
  643. function loadFileHistory(tempId) {
  644. $.ajax({
  645. url: '/gcc/api/department/audit/fileMovementhistory', // API endpoint
  646. type: 'GET',
  647. data: { tempId: tempId }, // Pass empCode as a parameter
  648. success: function (response) {
  649. if (response.length > 0) {
  650. let historyHtml = '';
  651. response.forEach(item => {
  652. historyHtml += `
  653. <div class="file-history-item">
  654. <div class="file-history-date">${formatDateTime(item.fileMovedDateHistory)}</div>
  655. <div class="file-history-content">
  656. <div class="file-history-status">${item.fileStatusHistory}</div>
  657. <div class="file-history-remarks">Comments/Remarks: ${item.remarksHistory || 'N/A'}</div>
  658. </div>
  659. </div>
  660. `;
  661. });
  662. $('#fileHistoryContainer').html(historyHtml);
  663. } else {
  664. $('#fileHistoryContainer').html('<p>No file history available.</p>');
  665. }
  666. },
  667. error: function () {
  668. $('#fileHistoryContainer').html('<p>Failed to load file history. Please try again later.</p>');
  669. }
  670. });
  671. }
  672. // Function to format date and time
  673. function formatDateTime(dateString) {
  674. const options = {
  675. day: '2-digit',
  676. month: '2-digit',
  677. year: 'numeric',
  678. };
  679. return new Date(dateString).toLocaleDateString('en-GB', options); // Formats as dd-mm-yyyy
  680. }
  681. </script>
  682. </body>
  683. </html>