fix: add missing icons and use Utils.showToast() for notifications

Icons:
- Add cloud-download, cloud-upload, and key icons

Notifications:
- Replace alert() with Utils.showToast() in companies.js
- Replace alert() with Utils.showToast() in content-pages.js
- Add noqa comment for intentional fallback in components.js

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-12 22:37:10 +01:00
parent 65f296e883
commit 4e8ea8151c
5 changed files with 22 additions and 8 deletions

View File

@@ -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');
}
},