()
| 1081 | } |
| 1082 | |
| 1083 | function updateDateFilterDisplay() { |
| 1084 | // Find all date cells and update their styling |
| 1085 | const dateCells = document.querySelectorAll(".date-text"); |
| 1086 | dateCells.forEach((cell) => { |
| 1087 | const cellDate = cell.textContent.trim().split(" ")[0]; |
| 1088 | if (selectedDate && cellDate === selectedDate) { |
| 1089 | cell.classList.add("date-selected"); |
| 1090 | } else { |
| 1091 | cell.classList.remove("date-selected"); |
| 1092 | } |
| 1093 | }); |
| 1094 | |
| 1095 | // Update the filter badge |
| 1096 | const badge = document.getElementById("date-filter-badge"); |
| 1097 | const badgeText = document.getElementById("date-filter-text"); |
| 1098 | const container = document.getElementById("active-filters-container"); |
| 1099 | |
| 1100 | if (selectedDate) { |
| 1101 | if (badgeText) badgeText.textContent = selectedDate; |
| 1102 | if (badge) badge.style.display = "inline-flex"; |
| 1103 | if (container) container.style.display = "flex"; |
| 1104 | } else { |
| 1105 | if (badge) badge.style.display = "none"; |
| 1106 | // Hide container if no filters are active |
| 1107 | if (container && !hasActiveFilters()) { |
| 1108 | container.style.display = "none"; |
| 1109 | } |
| 1110 | } |
| 1111 | |
| 1112 | // Update clear filters button visibility |
| 1113 | updateClearFiltersButton(); |
| 1114 | } |
| 1115 | |
| 1116 | function hasActiveFilters() { |
| 1117 | return ( |
no test coverage detected