Browse Source

minor changes in payment tracker dashboard page

master
yoganandhank 3 months ago
parent
commit
0d17d8b3c4
  1. 28
      src/main/resources/templates/gccservicepaymenttracker/dashboard.html
  2. 12
      src/main/resources/templates/home/view-login-details.html

28
src/main/resources/templates/gccservicepaymenttracker/dashboard.html

@ -1098,8 +1098,8 @@
<thead class="table-light text-secondary fw-bold" style="font-size: 0.75rem;">
<tr id="summary-thead-tr">
<th style="background-color: #f8fafc; color: #475569;">Total No of Bills</th>
<th style="background-color: #f0fdf4; color: #166534;">Completed Files</th>
<th style="background-color: #fef2f2; color: #991b1b;">Pending Files</th>
<th style="background-color: #f0fdf4; color: #166534;">Completed Bills</th>
<th style="background-color: #fef2f2; color: #991b1b;">Pending Bills</th>
<th style="background-color: #fafaf9; color: #44403c;">1 to 15 Days</th>
<th style="background-color: #fafaf9; color: #44403c;">16 to 30 Days</th>
<th style="background-color: #fafaf9; color: #44403c;">31 to 60 Days</th>
@ -1114,11 +1114,11 @@
style="background-color: #f8fafc;"
onclick="openModalForCount('total', null, 'Total No of Bills')">0</td>
<td id="summary-completed" class="cursor-pointer text-success"
onclick="openModalForCount('completed_custom', null, 'Completed Files')">0
onclick="openModalForCount('completed_custom', null, 'Completed Bills')">0
</td>
<td id="summary-pending" class="cursor-pointer text-danger"
style="color: #991b1b; font-weight: bold;"
onclick="openModalForCount('pending_custom', null, 'Pending Files')">0</td>
onclick="openModalForCount('pending_custom', null, 'Pending Bills')">0</td>
<td id="summary-1-15" class="cursor-pointer"
onclick="openModalForCount('age', [1, 15], 'Age: 1 to 15 Days')">0</td>
<td id="summary-16-30" class="cursor-pointer"
@ -1183,7 +1183,7 @@
<tr id="vendor-breakdown-thead-tr">
<th style="text-align: left; background-color: #f8fafc;">Vendor Name</th>
<th style="background-color: #f8fafc;">Total No of Bills</th>
<th style="background-color: #f0fdf4;">Completed Files</th>
<th style="background-color: #f0fdf4;">Completed Bills</th>
<th style="background-color: #fffbeb;">Awaiting Details</th>
<th style="background-color: #f0f9ff;">Pending with Dept</th>
<th style="background-color: #fef2f2;">Pending</th>
@ -2024,8 +2024,8 @@
if (summaryTheadTr) {
let summaryHeadHtml = `
<th style="background-color: #f8fafc; color: #475569;">Total No of Bills</th>
<th style="background-color: #f0fdf4; color: #166534;">Completed Files</th>
<th style="background-color: #fef2f2; color: #991b1b;">Pending Files</th>
<th style="background-color: #f0fdf4; color: #166534;">Completed Bills</th>
<th style="background-color: #fef2f2; color: #991b1b;">Pending Bills</th>
`;
summaryHeadHtml += `
<th style="background-color: #fafaf9; color: #44403c;">1 to 15 Days</th>
@ -2053,14 +2053,14 @@
vendorHeadHtml += `<th style="background-color: ${style.bg}; color: ${style.text};">${escapeHtml(s.status_name)}</th>`;
});
// Pending files column header with click toggle icon
// Pending Bills column header with click toggle icon
const toggleIcon = showPendingSubBreakdown ? 'fa-angles-left' : 'fa-angles-right';
const titleText = showPendingSubBreakdown ? 'Click to hide status breakdown' : 'Click to show Pending with IT Cell & Pending with Others breakdown';
const subDNone = showPendingSubBreakdown ? '' : 'd-none';
vendorHeadHtml += `
<th class="cursor-pointer" style="background-color: #fef2f2; color: #991b1b; cursor: pointer;" onclick="togglePendingSubBreakdown()" title="${titleText}">
Pending files <i class="fa-solid ${toggleIcon} ms-1 text-muted" style="transition: transform 0.2s;"></i>
Pending Bills <i class="fa-solid ${toggleIcon} ms-1 text-muted" style="transition: transform 0.2s;"></i>
</th>
`;
@ -3219,8 +3219,8 @@
let summaryBodyHtml = `
<td id="summary-total" class="cursor-pointer text-primary" style="background-color: #f8fafc;" onclick="openModalForCount('total', null, 'Total No of Bills')">${total}</td>
<td id="summary-completed" class="cursor-pointer text-success-dark" onclick="openModalForCount('completed_custom', null, 'Completed Files')">${completedTotal}</td>
<td id="summary-pending" class="cursor-pointer text-danger-dark" onclick="openModalForCount('pending_custom', null, 'Pending Files')">${pendingTotal}</td>
<td id="summary-completed" class="cursor-pointer text-success-dark" onclick="openModalForCount('completed_custom', null, 'Completed Bills')">${completedTotal}</td>
<td id="summary-pending" class="cursor-pointer text-danger-dark" onclick="openModalForCount('pending_custom', null, 'Pending Bills')">${pendingTotal}</td>
`;
summaryBodyHtml += `
<td id="summary-1-15" class="cursor-pointer" onclick="openModalForCount('age', [1, 15], 'Age: 1 to 15 Days')">${age_1_15}</td>
@ -3442,7 +3442,7 @@
// 2. Custom "Pending" column
const sumPending = sumTotal - sumCompleted;
totalTrHtml += `<td class="cursor-pointer text-danger-dark fw-bold" onclick="openModalForCount('pending_custom', null, 'Pending Files')">${sumPending}</td>`;
totalTrHtml += `<td class="cursor-pointer text-danger-dark fw-bold" onclick="openModalForCount('pending_custom', null, 'Pending Bills')">${sumPending}</td>`;
// 3. Sub-breakdown: Pending with IT Cell & Pending with Others
totalTrHtml += `
@ -3797,7 +3797,7 @@
}
if (clickType === 'age') {
// Exclude completed files for pending age column clicks
// Exclude Completed Bills for pending age column clicks
const rowStatusStr = String(row.status || '').trim();
const isCompleted = activeStatus.filter(s => getStatusKey(s.status_name) === 'completed').some(s =>
rowStatusStr === String(s.id) ||
@ -3893,7 +3893,7 @@
const rowVendor = String(row.resolved_vendor || row.vendor_name || 'Unknown').trim();
if (rowVendor !== vendorName) return false;
// Exclude completed files for pending vendor age clicks
// Exclude Completed Bills for pending vendor age clicks
const rowStatusStr = String(row.status || '').trim();
const isCompleted = activeStatus.filter(s => getStatusKey(s.status_name) === 'completed').some(s =>
rowStatusStr === String(s.id) ||

12
src/main/resources/templates/home/view-login-details.html

@ -3,7 +3,7 @@
<head>
<script th:inline="javascript">
(function() {
(function () {
const currentUser = /*[[${session.usrName}]]*/ null;
if (currentUser && sessionStorage.getItem("usrName") !== currentUser) {
window.location.replace(/*[[@{/login}]]*/ '/login');
@ -594,12 +594,14 @@
</div>
<div class="d-flex align-items-center gap-2 w-100 w-md-auto justify-content-md-end">
<!-- Work Order PDF Link -->
<a id="modal-workorder-file-link" href="#" target="_blank" class="btn btn-danger text-nowrap align-items-center justify-content-center gap-2" style="height: 44px; border-radius: 8px; font-weight: 600; display: none; padding: 0 15px; background-color: #c0392b; border-color: #c0392b; color: white;">
<a id="modal-workorder-file-link" href="#" target="_blank"
class="btn btn-danger text-nowrap align-items-center justify-content-center gap-2"
style="height: 44px; border-radius: 8px; font-weight: 600; display: none; padding: 0 15px; background-color: #c0392b; border-color: #c0392b; color: white;">
<i class="fa-solid fa-file-pdf"></i> Work Order File
</a>
<select id="modal-designation-filter" class="form-select form-select-sm"
style="height: 44px; border-radius: 8px; border: 1px solid #cbd5e1; padding: 0 35px 0 15px; font-weight: 600; min-width: 200px;"
<select id="modal-designation-filter" class="form-select form-select-sm"
style="height: 44px; border-radius: 8px; border: 1px solid #cbd5e1; padding: 0 35px 0 15px; font-weight: 600; min-width: 200px;"
onchange="filterEmployees()">
<option value="">- All Designations -</option>
</select>
@ -687,7 +689,7 @@
vendor.designationDetails.forEach(des => {
const opt = document.createElement("option");
opt.value = des.designation;
let displayText = des.designation;
const fileNo = des.File_no || des.file_no;
if (fileNo && fileNo !== '-' && fileNo !== '') {

Loading…
Cancel
Save