Add click handler for refresh button in portal

The refresh button in the top bar had no click handler attached.
Now it reloads the current page data when clicked.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-02-23 14:13:47 -08:00
parent 802d48f049
commit 57ef40f737

View file

@ -39,6 +39,9 @@ const Portal = {
// Setup sidebar toggle // Setup sidebar toggle
this.setupSidebarToggle(); this.setupSidebarToggle();
// Setup refresh button
this.setupRefreshButton();
// Load initial data // Load initial data
await this.loadDashboard(); await this.loadDashboard();
@ -240,6 +243,16 @@ const Portal = {
}); });
}, },
// Setup refresh button
setupRefreshButton() {
const btn = document.getElementById('refreshBtn');
if (btn) {
btn.addEventListener('click', () => {
this.loadPageData(this.currentPage);
});
}
},
// Handle hash change // Handle hash change
handleHashChange() { handleHashChange() {
const hash = window.location.hash.slice(1) || 'dashboard'; const hash = window.location.hash.slice(1) || 'dashboard';