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.

832 lines
35 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
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
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> Family Pension</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">Family Pension</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 - Family Pension</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 - Family Pension (<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. <!-- pending duration-->
  268. <div class="col-md-4">
  269. <label for="pendingDuration" class="form-label fw-bold">
  270. Pending Duration
  271. </label>
  272. <div class="d-flex align-items-center">
  273. <div class="form-check" style="padding-right:10px;">
  274. <input type="radio" id="yes" name="pendingDuration" value="yes"class="form-check-input" disabled>
  275. <label for="yes" class="form-check-label">Yes</label>
  276. </div>
  277. <div class="form-check">
  278. <input type="radio" id="no" name="pendingDuration" value="no"class="form-check-input" disabled>
  279. <label for="no" class="form-check-label">No</label>
  280. </div>
  281. </div>
  282. <div class="dropdown" id="pendingDurationInputContainer" style="display: none; margin-top: 10px;">
  283. <input type="text" id="pendingDurationInput" name="pendingDurationValue" class="form-control" placeholder="Enter details for pending duration" readonly>
  284. </div>
  285. </div>
  286. <!-- While in Service Death -->
  287. <div class="col-md-4">
  288. <label for="servicedeath" class="form-label fw-bold">While in Service Death </label>
  289. <input type="date" id="servicedeath" class="form-control" readonly>
  290. </div>
  291. <!-- Relationship of Deceased -->
  292. <div class="col-md-4">
  293. <label for="relationship" class="form-label fw-bold">Relationship of Deceased </label>
  294. <input type="text" id="relationship" class="form-control" readonly>
  295. </div>
  296. <div class="col-md-4">
  297. <label for="sanctionedgis" class="form-label fw-bold">Sanctioned GIS</label>
  298. <input type="text" id="sanctionedgis" class="form-control" readonly>
  299. </div>
  300. <!-- Date File Sent to Audit -->
  301. <div class="col-md-4">
  302. <label for="datefile_modal" class="form-label fw-bold">Date File Completed </label>
  303. <input type="date" id="datefile_modal" class="form-control" readonly>
  304. </div>
  305. <!-- Remarks -->
  306. <div class="col-md-12">
  307. <label for="remarks_modal" class="form-label fw-bold">Comments/Remarks </label>
  308. <textarea id="remarks_modal" class="form-control" rows="4" placeholder="Enter your remarks here" readonly></textarea>
  309. </div>
  310. <!-- new -->
  311. <div class="col-md-12 mt-4">
  312. <h5>File History</h5>
  313. <div id="fileHistoryContainer" class="file-history-list">
  314. <!-- File History will be dynamically loaded here -->
  315. </div>
  316. </div>
  317. <div class="col-md-12 ">
  318. <span style="font-weight: bold;font-size: medium;text-decoration: underline;">Department Benefits</span>
  319. </div>
  320. <!-- GPF -->
  321. <div class="col-md-4 mb-2">
  322. <label class="form-label fw-bold">GPF</label>
  323. <div class="d-flex align-items-center gap-5">
  324. <div class="form-check">
  325. <input class="form-check-input" type="radio" id="gpfYes" name="gpf" value="yes" disabled>
  326. <label class="form-check-label" for="gpfYes">Yes</label>
  327. </div>
  328. <div class="form-check">
  329. <input class="form-check-input" type="radio" id="gpfNo" name="gpf" value="no" disabled>
  330. <label class="form-check-label" for="gpfNo">No</label>
  331. </div>
  332. <div class="form-check">
  333. <input class="form-check-input" type="radio" id="gpf50" name="gpf" value="90" disabled>
  334. <label class="form-check-label" for="gpf50">90%</label>
  335. </div>
  336. </div>
  337. <!-- Placeholder for dynamically added input -->
  338. <div id="gpfAmountDiv" class="mt-3" style="display: none;">
  339. <label for="gpfAmount" class="form-label">Enter GPF Amount</label>
  340. <input type="number" id="gpfAmount" class="form-control" placeholder="Enter GPF amount" readonly>
  341. </div>
  342. </div>
  343. <!-- Earned Leave & Leave on Private Affairs -->
  344. <div class="col-md-4 mb-2">
  345. <label class="form-label fw-bold">Earned Leave & Leave on Private Affairs</label>
  346. <div class="d-flex align-items-center gap-5">
  347. <div class="form-check">
  348. <input class="form-check-input" type="radio" id="earnedleaveYes" name="earnedleave" value="yes" disabled>
  349. <label class="form-check-label" for="earnedleaveYes">Yes</label>
  350. </div>
  351. <div class="form-check">
  352. <input class="form-check-input" type="radio" id="earnedleaveNo" name="earnedleave" value="no" disabled>
  353. <label class="form-check-label" for="earnedleaveNo">No</label>
  354. </div>
  355. </div>
  356. <!-- Placeholder for dynamically added input -->
  357. <div id="earnedleaveAmountDiv" class="mt-3" style="display: none;">
  358. <label for="earnedleaveAmount" class="form-label">Enter EL and LPA Amount</label>
  359. <input type="number" id="earnedleaveAmount" class="form-control" placeholder="Enter Amount" readonly>
  360. </div>
  361. </div>
  362. <!-- SPFGS -->
  363. <div class="col-md-4 mb-2">
  364. <label class="form-label fw-bold">SPFGS</label>
  365. <div class="d-flex align-items-center gap-5">
  366. <div class="form-check">
  367. <input class="form-check-input" type="radio" id="spfgsYes" name="spfgs" value="yes" disabled>
  368. <label class="form-check-label" for="spfgsYes">Yes</label>
  369. </div>
  370. <div class="form-check">
  371. <input class="form-check-input" type="radio" id="spfgsNo" name="spfgs" value="no" disabled>
  372. <label class="form-check-label" for="spfgsNo">No</label>
  373. </div>
  374. </div>
  375. <!-- Placeholder for dynamically added input -->
  376. <div id="spfgsAmountDiv" class="mt-3" style="display: none;">
  377. <label for="spfgsAmount" class="form-label">Enter SPFGS Amount</label>
  378. <input type="number" id="spfgsAmount" class="form-control" placeholder="Enter spfgs Amount" readonly>
  379. </div>
  380. </div>
  381. <div class="col-md-4 mb-2">
  382. <label for="recoveryemployeevalue" class="form-label fw-bold">Recovery From Employee</label>
  383. <input type="text" id="recoveryemployeevalue" class="form-control" placeholder="Enter Recovery From Employee" readonly>
  384. </div>
  385. <!-- DCRF File is Ready -->
  386. <div class="col-md-4">
  387. <label class="form-label fw-bold">DCRG File is Ready</label>
  388. <div class="d-flex align-items-center gap-5">
  389. <div class="form-check">
  390. <input class="form-check-input" type="radio" id="dcrgYes" name="dcrg" value="yes" disabled>
  391. <label class="form-check-label" for="dcrgYes">Yes</label>
  392. </div>
  393. <div class="form-check">
  394. <input class="form-check-input" type="radio" id="dcrgNo" name="dcrg" value="no" disabled>
  395. <label class="form-check-label" for="dcrgNo">No</label>
  396. </div>
  397. </div>
  398. </div>
  399. <div class="col-md-12 ">
  400. <span style="font-weight: bold;font-size: medium;text-decoration: underline;">Pension Benefits</span>
  401. </div>
  402. <div class="col-md-6 mt-2 mb-2">
  403. <label for="pensionNumber" class="form-label">Pension Number</label>
  404. <input type="number" id="pensionNumber" class="form-control" placeholder="Enter Employee Pension Number" readonly>
  405. </div>
  406. <div class="col-md-6 mt-2 mb-2">
  407. <label for="ledgerNumber" class="form-label">Ledger Number</label>
  408. <input type="number" id="ledgerNumber" class="form-control" placeholder="Enter Ledger Number" readonly>
  409. </div>
  410. <div class="col-md-4 mb-2">
  411. <label class="form-label fw-bold">Sanctions Pensions Benefit-Pension</label>
  412. <div class="d-flex align-items-center gap-5">
  413. <div class="form-check">
  414. <input class="form-check-input" type="radio" id="bpYes" name="benefit_pension" value="yes" disabled>
  415. <label class="form-check-label" for="bpYes">Yes</label>
  416. </div>
  417. <div class="form-check">
  418. <input class="form-check-input" type="radio" id="bpNo" name="benefit_pension" value="no" disabled>
  419. <label class="form-check-label" for="bpNo">No</label>
  420. </div>
  421. </div>
  422. <!-- Placeholder for dynamically added input -->
  423. <div id="PbAmountDiv" class="mt-3" style="display: none;">
  424. <label for="benefit_pension_amount" class="form-label">Enter Pensions Benefit Amount</label>
  425. <input type="number" id="benefit_pension_amount" class="form-control" placeholder="Enter Pensions Benefit Amount" readonly>
  426. </div>
  427. </div>
  428. <div class="col-md-4 mb-2">
  429. <label class="form-label fw-bold">Sanctions Pensions Benefit-DCRG</label>
  430. <div class="d-flex align-items-center gap-5">
  431. <div class="form-check">
  432. <input class="form-check-input" type="radio" id="DcrgYes" name="benefit_dcrg" value="yes" disabled>
  433. <label class="form-check-label" for="DcrgYes">Yes</label>
  434. </div>
  435. <div class="form-check">
  436. <input class="form-check-input" type="radio" id="DcrgNo" name="benefit_dcrg" value="no" disabled>
  437. <label class="form-check-label" for="DcrgNo">No</label>
  438. </div>
  439. </div>
  440. <!-- Placeholder for dynamically added input -->
  441. <div id="dcrgAmountDiv" class="mt-3" style="display: none;">
  442. <label for="benefit_dcrg_amount" class="form-label">Enter Benefit DCRG Amount</label>
  443. <input type="number" id="benefit_dcrg_amount" class="form-control" placeholder="Enter Pensions Benefit DCRG Amount" readonly>
  444. </div>
  445. </div>
  446. <div class="col-md-4 mb-2">
  447. <label class="form-label fw-bold">Sanctions Pensions Benefit-Commutation</label>
  448. <div class="d-flex align-items-center gap-5">
  449. <div class="form-check">
  450. <input class="form-check-input" type="radio" id="commutationYes" name="benefit_commutation" value="yes" disabled>
  451. <label class="form-check-label" for="commutationYes">Yes</label>
  452. </div>
  453. <div class="form-check">
  454. <input class="form-check-input" type="radio" id="commutationNo" name="benefit_commutation" value="no" disabled>
  455. <label class="form-check-label" for="commutationNo">No</label>
  456. </div>
  457. </div>
  458. <!-- Placeholder for dynamically added input -->
  459. <div id="CommutationAmountDiv" class="mt-3" style="display: none;">
  460. <label for="benefit_commutation_amount" class="form-label">Enter Benefit Commutation Amount</label>
  461. <input type="number" id="benefit_commutation_amount" class="form-control" placeholder="Enter Pensions Benefit Commutation Amount" readonly>
  462. </div>
  463. </div>
  464. </div>
  465. <div class="row mb-2 mt-2">
  466. <div class="col-md-12 d-flex justify-content-center">
  467. <button type="button" class="btn btn-secondary" data-dismiss="modal" id="back">Back</button>
  468. </div>
  469. </div>
  470. </div>
  471. </div>
  472. </div>
  473. </div>
  474. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  475. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  476. <script src="node_modules/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.min.js"></script>
  477. <!-- Bootstrap 5 JS -->
  478. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
  479. <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  480. <script>
  481. // Initialize DataTable
  482. const table = $('#AuditDatatable').DataTable({
  483. dom: 'Bftip',
  484. columnDefs: [
  485. { targets: 'no-sort', orderable: false }
  486. ],
  487. lengthMenu: [
  488. [50, 100, 200, 500, -1],
  489. ['50 rows', '100 rows', '200 rows', 'Show all']
  490. ],
  491. scrollY: '50vh',
  492. buttons: [
  493. { extend: 'pageLength', className: 'btn btn-warning' },
  494. { title: 'Data export', extend: 'copyHtml5', text: 'Copy', className: 'btn btn-secondary' },
  495. { extend: 'excelHtml5', text: 'Excel', className: 'btn btn-secondary' },
  496. { extend: 'csvHtml5', text: 'CSV', className: 'btn btn-secondary' },
  497. { extend: 'pdfHtml5', text: 'PDF', className: 'btn btn-secondary' }
  498. ],
  499. fixedHeader: true,
  500. autoWidth: true,
  501. responsive: true,
  502. searching: true,
  503. select: false,
  504. processing: false
  505. });
  506. document.addEventListener("DOMContentLoaded", function() {
  507. // Get today's date
  508. const today = new Date();
  509. // Format the date as DD-MM-YYYY for display
  510. const day = String(today.getDate()).padStart(2, '0');
  511. const month = String(today.getMonth() + 1).padStart(2, '0'); // Months are 0-based
  512. const year = today.getFullYear();
  513. // Combine into DD-MM-YYYY format for display
  514. const formattedDateDisplay = `${day}-${month}-${year}`;
  515. // Set the value of the input field to the current date (in DD-MM-YYYY format for display)
  516. //document.getElementById("datefile").value = formattedDateDisplay;
  517. document.getElementById("servicedeath").value = formattedDateDisplay;
  518. });
  519. //model function
  520. function fetchEmployeeDetails(tempId) {
  521. $.ajax({
  522. url: '/gcc/api/department/audit/getpartialdetails', // API to fetch employee details
  523. type: 'GET',
  524. data: { tempId: tempId }, // Pass EMPLOYEE_CODE as a parameter
  525. success: function (response) {
  526. if (response && response.length > 0) {
  527. let employeeDetails = response[0]; // Access the first object in the array
  528. console.log("response:",response);
  529. // Populate modal fields
  530. $('#employeenomodel').val(employeeDetails.emp_no);
  531. $('#employeename').val(employeeDetails.emp_name);
  532. $('#department').val(employeeDetails.dept_name);
  533. $('#designation').val(employeeDetails.designation);
  534. $('#typeofretirement').val(employeeDetails.type_of_retirement);
  535. $('#servicedeath').val(employeeDetails.service_death);
  536. $('#relationship').val(employeeDetails.relationship_deceased);
  537. $('#sanctionedgis').val(employeeDetails.sanctioned_gis_amount);
  538. //$('#classes').val(employeeDetails.retirement_class);
  539. $('#datefile_modal').val(employeeDetails.file_moved_date);
  540. $('#remarks_modal').val(employeeDetails.remarks);
  541. //$('#retirementdate').val(employeeDetails.retirement_date);
  542. let pendingDuration = employeeDetails.pending_duration; // Assuming this comes from the response
  543. let pendingReason = employeeDetails.reason_for_pending; // Assuming this comes from the response
  544. if (pendingDuration === "yes") {
  545. $('#pendingDurationInputContainer').show(); // Show the text box
  546. $('#pendingDurationInput').val(pendingReason); // Populate the input field
  547. } else {
  548. $('#pendingDurationInputContainer').hide(); // Hide the text box
  549. }
  550. // Update radio button selection
  551. if (pendingDuration === "yes") {
  552. $('#yes').prop('checked', true);
  553. } else {
  554. $('#no').prop('checked', true);
  555. }
  556. // Update the modal title with the employee code
  557. $('#modalEmployeeCode').text(employeeDetails.emp_no);
  558. // Show the modal
  559. $('#returnretrieddetailsModal').modal('show');
  560. $('input[name="gpf"][value="' + employeeDetails.gpf + '"]').prop('checked', true);
  561. if (employeeDetails.gpf === "yes" || employeeDetails.gpf === "90") {
  562. $('#gpfAmountDiv').show();
  563. $('#gpfAmount').val(employeeDetails.gpf_amount);
  564. } else {
  565. $('#gpfAmountDiv').hide();
  566. }
  567. // Earned Leave & Leave on Private Affairs
  568. $('input[name="earnedleave"][value="' + employeeDetails.private_affairs + '"]').prop('checked', true);
  569. if (employeeDetails.private_affairs === "yes") {
  570. $('#earnedleaveAmountDiv').show();
  571. $('#earnedleaveAmount').val(employeeDetails.private_affairs_amount);
  572. } else {
  573. $('#earnedleaveAmountDiv').hide();
  574. }
  575. // SPFGS
  576. $('input[name="spfgs"][value="' + employeeDetails.spfgs + '"]').prop('checked', true);
  577. if (employeeDetails.spfgs === "yes") {
  578. $('#spfgsAmountDiv').show();
  579. $('#spfgsAmount').val(employeeDetails.spfgs_amount);
  580. } else {
  581. $('#spfgsAmountDiv').hide();
  582. }
  583. // DCRG File
  584. $('input[name="dcrg"][value="' + employeeDetails.dcrg + '"]').prop('checked', true);
  585. $('#pensionNumber').val(employeeDetails.pension_number);
  586. $('#ledgerNumber').val(employeeDetails.ledger_number);
  587. $('input[name="benefit_pension"][value="' + employeeDetails.benefit_pension + '"]').prop('checked', true);
  588. if (employeeDetails.benefit_pension === "yes") {
  589. $('#PbAmountDiv').show();
  590. $('#benefit_pension_amount').val(employeeDetails.benefit_pension_amount);
  591. } else {
  592. $('#PbAmountDiv').hide();
  593. }
  594. $('input[name="benefit_dcrg"][value="' + employeeDetails.benefit_dcrg + '"]').prop('checked', true);
  595. if (employeeDetails.benefit_dcrg === "yes") {
  596. $('#dcrgAmountDiv').show();
  597. $('#benefit_dcrg_amount').val(employeeDetails.benefit_dcrg_amount);
  598. } else {
  599. $('#dcrgAmountDiv').hide();
  600. }
  601. $('input[name="benefit_commutation"][value="' + employeeDetails.benefit_commutation + '"]').prop('checked', true);
  602. if (employeeDetails.benefit_commutation === "yes") {
  603. $('#CommutationAmountDiv').show();
  604. $('#benefit_commutation_amount').val(employeeDetails.benefit_commutation_amount);
  605. } else {
  606. $('#CommutationAmountDiv').hide();
  607. }
  608. } else {
  609. Swal.fire({
  610. icon: 'info',
  611. title: 'No Data',
  612. text: 'No details found for the selected employee.',
  613. confirmButtonText: 'OK',
  614. });
  615. }
  616. },
  617. error: function () {
  618. Swal.fire({
  619. icon: 'error',
  620. title: 'Error',
  621. text: 'Failed to fetch employee details. Please try again.',
  622. confirmButtonText: 'OK',
  623. });
  624. },
  625. });
  626. }
  627. $(document).ready(function () {
  628. $(document).on('click', '.view-btn', function () {
  629. const empCode = $(this).data('id'); // Fetch `data-id` value
  630. const tempId = $(this).data('temp-id'); // Fetch `data-temp-id` value
  631. console.log("empCode====="+empCode);
  632. // Hide the receivedcard section before showing the modal
  633. $("#receivedcard").hide();
  634. fetchEmployeeDetails(tempId); // Call the function to fetch employee details
  635. loadFileHistory(tempId); // Load the file history for the selected employee
  636. });
  637. // Initialize the modal with static backdrop and disabled keyboard closing
  638. $('#returnretrieddetailsModal').modal({
  639. backdrop: 'static',
  640. keyboard: false,
  641. show: false // Ensure it doesn't auto-show on page load
  642. });
  643. // Handle close button click
  644. $('#back').click(function () {
  645. $('#returnretrieddetailsModal').modal('hide');
  646. });
  647. $('.close').click(function () {
  648. $('#returnretrieddetailsModal').modal('hide');
  649. });
  650. });
  651. function loadFileHistory(tempId) {
  652. $.ajax({
  653. url: '/gcc/api/department/audit/fileMovementhistory', // API endpoint
  654. type: 'GET',
  655. data: { tempId: tempId }, // Pass empCode as a parameter
  656. success: function (response) {
  657. if (response.length > 0) {
  658. let historyHtml = '';
  659. response.forEach(item => {
  660. historyHtml += `
  661. <div class="file-history-item">
  662. <div class="file-history-date">${formatDateTime(item.fileMovedDateHistory)}</div>
  663. <div class="file-history-content">
  664. <div class="file-history-status">${item.fileStatusHistory}</div>
  665. <div class="file-history-remarks">Comments/Remarks: ${item.remarksHistory || 'N/A'}</div>
  666. </div>
  667. </div>
  668. `;
  669. });
  670. $('#fileHistoryContainer').html(historyHtml);
  671. } else {
  672. $('#fileHistoryContainer').html('<p>No file history available.</p>');
  673. }
  674. },
  675. error: function () {
  676. $('#fileHistoryContainer').html('<p>Failed to load file history. Please try again later.</p>');
  677. }
  678. });
  679. }
  680. // Function to format date and time
  681. function formatDateTime(dateString) {
  682. const options = {
  683. day: '2-digit',
  684. month: '2-digit',
  685. year: 'numeric',
  686. };
  687. return new Date(dateString).toLocaleDateString('en-GB', options); // Formats as dd-mm-yyyy
  688. }
  689. </script>
  690. </body>
  691. </html>