diff --git a/static/admin/js/companies.js b/static/admin/js/companies.js index a1cae0b7..e8633c1f 100644 --- a/static/admin/js/companies.js +++ b/static/admin/js/companies.js @@ -190,7 +190,7 @@ function adminCompanies() { async deleteCompany(company) { if (company.vendor_count > 0) { companiesLog.warn('Cannot delete company with vendors'); - alert(`Cannot delete "${company.name}" because it has ${company.vendor_count} vendor(s). Please delete or reassign the vendors first.`); + Utils.showToast(`Cannot delete "${company.name}" because it has ${company.vendor_count} vendor(s). Please delete or reassign the vendors first.`, 'warning'); return; } @@ -214,10 +214,10 @@ function adminCompanies() { await this.loadCompanies(); await this.loadStats(); - alert(`Company "${company.name}" deleted successfully`); + Utils.showToast(`Company "${company.name}" deleted successfully`, 'success'); } catch (error) { companiesLog.error('Failed to delete company:', error); - alert(`Failed to delete company: ${error.message}`); + Utils.showToast(`Failed to delete company: ${error.message}`, 'error'); } }, diff --git a/static/admin/js/components.js b/static/admin/js/components.js index 8529b825..2d3b9fd4 100644 --- a/static/admin/js/components.js +++ b/static/admin/js/components.js @@ -557,7 +557,8 @@ function adminComponents() { Utils.showToast(messages[type] || messages.info, type); } else { componentsLog.error('Utils.showToast not available'); - alert(messages[type] || messages.info); // Fallback to alert + // noqa: JS-009 - Fallback for component showcase when Utils not loaded + alert(messages[type] || messages.info); } }, diff --git a/static/admin/js/content-pages.js b/static/admin/js/content-pages.js index 257a3b67..c4d9a132 100644 --- a/static/admin/js/content-pages.js +++ b/static/admin/js/content-pages.js @@ -130,7 +130,7 @@ function contentPagesManager() { } catch (err) { contentPagesLog.error('Error deleting page:', err); - alert(`Failed to delete page: ${err.message}`); + Utils.showToast(`Failed to delete page: ${err.message}`, 'error'); } }, diff --git a/static/admin/js/init-alpine.js b/static/admin/js/init-alpine.js index 12d1421a..42fcafb6 100644 --- a/static/admin/js/init-alpine.js +++ b/static/admin/js/init-alpine.js @@ -28,9 +28,11 @@ function data() { // Default state: Platform Administration open, others closed const defaultSections = { platformAdmin: true, + productCatalog: false, contentMgmt: false, devTools: false, - monitoring: false + monitoring: false, + settingsSection: false }; function getSidebarSectionsFromStorage() { @@ -60,7 +62,10 @@ function data() { vendors: 'platformAdmin', users: 'platformAdmin', customers: 'platformAdmin', - marketplace: 'platformAdmin', + // Product Catalog + 'marketplace-products': 'productCatalog', + 'vendor-products': 'productCatalog', + marketplace: 'productCatalog', // Content Management 'platform-homepage': 'contentMgmt', 'content-pages': 'contentMgmt', @@ -72,7 +77,12 @@ function data() { 'code-quality': 'devTools', // Platform Monitoring imports: 'monitoring', - logs: 'monitoring' + logs: 'monitoring', + // Settings + settings: 'settingsSection', + profile: 'settingsSection', + 'api-keys': 'settingsSection', + 'notifications-settings': 'settingsSection' }; return { diff --git a/static/shared/js/icons.js b/static/shared/js/icons.js index 185a5b9d..076e585a 100644 --- a/static/shared/js/icons.js +++ b/static/shared/js/icons.js @@ -90,6 +90,8 @@ const Icons = { 'folder': ``, 'folder-open': ``, 'download': ``, + 'cloud-download': ``, + 'cloud-upload': ``, 'upload': ``, 'save': ``, @@ -138,6 +140,7 @@ const Icons = { 'clock': ``, 'lock-closed': ``, 'lock-open': ``, + 'key': ``, 'database': ``, 'light-bulb': ``, 'book-open': ``,