URL tidy
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<button class="btn btn-info" onclick="openBookInModal()">
|
||||
🛬 Book In
|
||||
</button>
|
||||
<button class="btn btn-primary" onclick="window.open('reports.html', '_blank')">
|
||||
<button class="btn btn-primary" onclick="window.location.href = '/reports'">
|
||||
📊 Reports
|
||||
</button>
|
||||
<button class="btn btn-warning" onclick="openUserManagementModal()" id="user-management-btn" style="display: none;">
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
<h1>📊 PPR Reports</h1>
|
||||
</div>
|
||||
<div class="menu-buttons">
|
||||
<button class="btn btn-secondary" onclick="window.location.href='admin.html'">
|
||||
<button class="btn btn-secondary" onclick="window.location.href='admin'">
|
||||
← Back to Admin
|
||||
</button>
|
||||
</div>
|
||||
@@ -466,7 +466,7 @@
|
||||
}
|
||||
|
||||
// No valid cached token, redirect to admin
|
||||
window.location.href = 'admin.html';
|
||||
window.location.href = 'admin';
|
||||
}
|
||||
|
||||
function logout() {
|
||||
@@ -475,13 +475,13 @@
|
||||
localStorage.removeItem('ppr_token_expiry');
|
||||
accessToken = null;
|
||||
currentUser = null;
|
||||
window.location.href = 'admin.html';
|
||||
window.location.href = 'admin';
|
||||
}
|
||||
|
||||
// Enhanced fetch wrapper with token expiry handling
|
||||
async function authenticatedFetch(url, options = {}) {
|
||||
if (!accessToken) {
|
||||
window.location.href = 'admin.html';
|
||||
window.location.href = 'admin';
|
||||
throw new Error('No access token available');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user