Fixed console errors

This commit is contained in:
Aakash Mittal 2025-12-22 16:42:14 +05:30
parent e96986923e
commit 1cdb7a1351
2 changed files with 11 additions and 5 deletions

View File

@ -631,7 +631,7 @@ select,
.data-table tbody tr { .data-table tbody tr {
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
transition: background-color 0.2s; transition: background-color 0.2s;
/* cursor: pointer; */ cursor: pointer;
} }
.data-table tbody tr:hover { .data-table tbody tr:hover {

View File

@ -24,7 +24,9 @@ function openVAModal(va) {
// Set projects // Set projects
const projects = va.projects || []; const projects = va.projects || [];
if(document.getElementById('projectsCountBadge')) {
document.getElementById('projectsCountBadge').textContent = projects.length; document.getElementById('projectsCountBadge').textContent = projects.length;
}
const projectsTableBody = document.getElementById('modalProjectsTableBody'); const projectsTableBody = document.getElementById('modalProjectsTableBody');
const noProjectsMessage = document.getElementById('modalNoProjects'); const noProjectsMessage = document.getElementById('modalNoProjects');
@ -45,10 +47,14 @@ function openVAModal(va) {
if (va.isCurrentlyActive && va.lastProjectId) { if (va.isCurrentlyActive && va.lastProjectId) {
viewSessionBtn.href = `/live/${va.lastProjectId}/${va.id}`; viewSessionBtn.href = `/live/${va.lastProjectId}/${va.id}`;
if(modalActions){
modalActions.style.display = 'block'; modalActions.style.display = 'block';
}
} else { } else {
if(modalActions){
modalActions.style.display = 'none'; modalActions.style.display = 'none';
} }
}
// Show modal // Show modal
vaModal.style.display = 'flex'; vaModal.style.display = 'flex';
@ -161,7 +167,7 @@ async function loadDashboardData() {
document.querySelectorAll('.va-row').forEach((row, index) => { document.querySelectorAll('.va-row').forEach((row, index) => {
row.addEventListener('click', function (e) { row.addEventListener('click', function (e) {
// Don't open modal if clicking on view link // Don't open modal if clicking on view link
if (!e.target.closest('.view-link')) { if (!e.target.closest('.view-link, .va-logs')) {
const va = allVAs[index]; const va = allVAs[index];
openVAModal(va); openVAModal(va);
} }