Compare commits

...

2 Commits

View File

@@ -942,10 +942,20 @@
.then(data => {
bootstrap.Modal.getInstance(document.getElementById('loginModal')).hide();
// Show/hide settings button according to permissions
if (!data.user.can_manage_settings) {
document.querySelectorAll('.settings-btn').forEach(b => b.style.display = 'none');
} else {
document.querySelectorAll('.settings-btn').forEach(b => b.style.display = '');
}
// Update user email in the dropdown and refresh profiles + projects
if (data.user && data.user.email) {
const userEl = document.getElementById('dropdownUserEmail');
if (userEl) userEl.textContent = data.user.email;
}
loadProfiles();
fetchProjects();
})
.catch(ex => {
@@ -1041,6 +1051,12 @@
// Clear UI
document.getElementById('projectGrid').innerHTML = '';
// Clear Profile List
document.getElementById('profileSelect').innerHTML = '';
// Clear User Email
document.getElementById('dropdownUserEmail').textContent = '';
// Show login modal
new bootstrap.Modal(document.getElementById('loginModal')).show();
})