Working state before icon/utils fixes - Oct 22

This commit is contained in:
2025-10-21 21:56:54 +02:00
parent a7d9d44a13
commit 5be47b91a2
39 changed files with 6017 additions and 508 deletions

View File

@@ -46,7 +46,7 @@ function vendorEdit() {
// Check authentication
if (!Auth.isAuthenticated() || !Auth.isAdmin()) {
console.log('Not authenticated as admin, redirecting to login');
window.location.href = '/static/admin/login.html';
window.location.href = '/admin/login';
return;
}
@@ -60,7 +60,7 @@ function vendorEdit() {
if (!this.vendorId) {
console.error('No vendor ID in URL');
alert('No vendor ID provided');
window.location.href = '/static/admin/dashboard.html#vendors';
window.location.href = '/admin/dashboard.html#vendors';
return;
}
@@ -95,7 +95,7 @@ function vendorEdit() {
} catch (error) {
console.error('❌ Failed to load vendor:', error);
Utils.showToast('Failed to load vendor details: ' + (error.message || 'Unknown error'), 'error');
window.location.href = '/static/admin/dashboard.html#vendors';
window.location.href = '/admin/dashboard';
} finally {
this.loadingVendor = false;
}
@@ -331,7 +331,7 @@ function vendorEdit() {
// Redirect to login after brief delay
setTimeout(() => {
window.location.href = '/static/admin/login.html';
window.location.href = '/admin/login';
}, 500);
},
};