Working state before icon/utils fixes - Oct 22
This commit is contained in:
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user