Merge pull request #2794 from GSA/2085-conditional-within-the-my-activity-page-needs-to-be-fixed

Fix empty table display in My activity view when user has no jobs
This commit is contained in:
Beverly Nguyen
2025-07-31 12:15:28 -07:00
committed by GitHub
2 changed files with 67 additions and 3 deletions

View File

@@ -316,9 +316,18 @@
return rowSender === currentUserName;
});
userRows.slice(0, 5).forEach(row => {
row.style.display = '';
});
if (userRows.length > 0) {
userRows.slice(0, 5).forEach(row => {
row.style.display = '';
});
} else {
const emptyMessageRow = Array.from(allRows).find(row => {
return row.querySelector('.table-empty-message');
});
if (emptyMessageRow) {
emptyMessageRow.style.display = '';
}
}
} else {
tableHeading.textContent = 'Service activity';