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.

138 lines
6.8 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org" lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Adjustment File Management System</title>
  7. <!-- Include CSS -->
  8. <link rel="stylesheet" type="text/css" th:href="@{/css/body-form-styles.css}">
  9. <link rel="stylesheet" type="text/css" th:href="@{/css/datatable-styles.css}">
  10. <link rel="stylesheet" type="text/css" th:href="@{/css/home-styles.css}">
  11. <link rel="stylesheet" type="text/css" th:href="@{/css/view-file-styles.css}">
  12. <link rel="stylesheet" type="text/css" th:href="@{/css/btn-secondary-styles.css}">
  13. <!-- CSRF Tokens -->
  14. <meta name="_csrf" th:content="${_csrf.token}" />
  15. <meta name="_csrf_header" th:content="${_csrf.headerName}" />
  16. <!-- Header Fragment -->
  17. <th:block th:replace="~{fragments/header :: header}"></th:block>
  18. </head>
  19. <body>
  20. <!-- Navigation -->
  21. <th:block th:replace="~{fragments/navbar :: navbar(${curPage})}"></th:block>
  22. <div class="container">
  23. <div class="form-container">
  24. <div class="header-row">
  25. <button class="back-button" onclick="goBack()">&#8592; Back</button>
  26. </div>
  27. <h2 class="form-title">Elcot OC Remainders Details</h2>
  28. <!-- Button and Filter Bar -->
  29. <div class="row mb-3">
  30. <!-- Adds spacing and a responsive layout -->
  31. <div class="col-12 col-md-8 mb-2 mb-md-0">
  32. <!-- Buttons on the left -->
  33. <div class="btn-group" role="group" aria-label="Options">
  34. <button type="button" th:onclick="|window.location.href='@{/oc-file/add-oc-file}'|"
  35. class="btn btn-secondary">
  36. <i class="fa-solid fa-file-pen"></i> Add OC File
  37. </button>
  38. <button class="btn btn-secondary" id="export-excel" name="export-excel">
  39. <i class="fas fa-file-excel"></i> Export Excel
  40. </button>
  41. <button class="btn btn-secondary" id="export-pdf" name="export-pdf">
  42. <i class="fas fa-file-pdf"></i> Export PDF
  43. </button>
  44. </div>
  45. </div>
  46. <!-- <div class="col-12 col-md-8 mb-2 mb-md-0" style="padding-top:5px">
  47. </div> -->
  48. </div>
  49. <div class="row mb-3">
  50. <div class="col-md-6 form-group">
  51. <label for="filter-file-num" id="filter-file-num-lbl">Filter By File Number : </label>
  52. <input list="file-num-list" class="form-control" id="filter-file-num" name="filter-file-num"
  53. autocomplete="off" placeholder="Select File Number">
  54. <datalist id="file-num-list">
  55. <!-- Options will be filled by JavaScript -->
  56. </datalist>
  57. </div>
  58. <div class="col-md-6 form-group">
  59. <label for="filter-vend-name" id="filter-vend-name-lbl">Filter By Vendor Name : </label>
  60. <input list="vend-name-list" class="form-control" id="filter-vend-name" name="filter-vend-name"
  61. autocomplete="off" placeholder="Select Vendor Name">
  62. <datalist id="vend-name-list">
  63. <!-- Options will be filled by JavaScript -->
  64. </datalist>
  65. </div>
  66. </div>
  67. <div class="row mb-3">
  68. <div class="col-md-4" id="custom-length"></div>
  69. </div>
  70. <div class="table-responsive">
  71. <table class="det-table" id="oc-file-det-tbl">
  72. <thead>
  73. <tr class="table-header">
  74. <th>S.No</th>
  75. <th class="text-center">File Number</th>
  76. <th class="text-center">Vendor Name</th>
  77. <th class="text-center">Subject</th>
  78. <th class="text-center">Upload Date</th>
  79. <th class="text-center">OC File</th>
  80. </tr>
  81. </thead>
  82. <tbody>
  83. <tr th:each="ocFile : ${ocFileDataList}" th:attr="data-file-num=${ocFile.fileDataNum}">
  84. <!-- <tr th:each="ocFile : ${ocFileDataList}" th:attr="data-file-num=${ocFile.fileDataNum}"
  85. onclick="if(!event.target.closest('button')) window.location.href='/file/view-file-det?file-num=' + this.dataset.fileNum"
  86. style="cursor: pointer;"> -->
  87. <td></td>
  88. <!-- File Number -->
  89. <td class="text-center" th:text="${ocFile.fileDataNum}"></td>
  90. <!-- Vendor Name -->
  91. <td
  92. th:text="${ocFile.vendName != null and ocFile.vendName != '-' ? ocFile.vendName : 'None'}">
  93. </td>
  94. <!-- Subject -->
  95. <td th:text="${ocFile.ocFileSub}"></td>
  96. <!-- Upload Date -->
  97. <td th:with="uplDate=${#dates.format(ocFile.ocFileUplDate, 'dd-MM-yyyy')}"
  98. th:text="${ocFile.ocFileUplDate != null and uplDate != '01-01-1970' ? uplDate : 'N/A'}">
  99. </td>
  100. <!-- OC File Link -->
  101. <td class="text-center">
  102. <button th:attr="data-path=${ocFile.ocFilePath}, data-file-num=${ocFile.fileDataNum}"
  103. onclick="viewFileInModal(this.dataset.fileNum, 'OC', this.dataset.path)" class="btn"
  104. type="button">
  105. <i class="fas fa-light fa-eye" style="cursor: pointer"></i>
  106. </button>
  107. </td>
  108. </tr>
  109. </tbody>
  110. </table>
  111. </div>
  112. <br />
  113. <div class="row mb-3">
  114. <div class="col-md-4 text-center" id="custom-info"></div>
  115. <div class="col-md-8" id="custom-pagination"></div>
  116. </div>
  117. <th:block th:replace="~{fragments/export-pdf :: export-pdf}"></th:block>
  118. </div>
  119. </div>
  120. <th:block th:replace="~{modal/pdf-modal :: pdf-modal}"></th:block>
  121. <!-- Footer Fragment -->
  122. <th:block th:replace="~{fragments/footer :: footer}"></th:block>
  123. <!-- Custom JS -->
  124. <script th:src="@{/js/view-oc-file-script.js}" type="text/javascript"></script>
  125. </body>
  126. </html>