Завершена работа со складами

This commit is contained in:
2025-12-10 23:03:32 +03:00
parent 197a4d0b1e
commit fcbe25f7ec
14 changed files with 689 additions and 34 deletions
+7 -7
View File
@@ -18,28 +18,28 @@ export function showInfo(message, type = 'info') {
// Определяем классы в зависимости от типа
const typeConfig = {
'success': { bgClass: 'bg-success', icon: 'bi-check-circle', delay: 5000 },
'error': { bgClass: 'bg-danger', icon: 'bi-exclamation-circle', delay: 10000 },
'info': { bgClass: 'bg-info', icon: 'bi-info-circle', delay: 3000 },
'warning': { bgClass: 'bg-warning', icon: 'bi-exclamation-triangle', delay: 8000 }
'success': { bgClass: 'bg-success', icon: 'bi-check-circle', delay: 5000, textColor: 'text-white' },
'error': { bgClass: 'bg-danger', icon: 'bi-exclamation-circle', delay: 10000, textColor: 'text-white' },
'info': { bgClass: 'bg-info', icon: 'bi-info-circle', delay: 3000, textColor: 'text-dark' },
'warning': { bgClass: 'bg-warning', icon: 'bi-exclamation-triangle', delay: 8000, textColor: 'text-dark' }
};
const config = typeConfig[type] || typeConfig.info;
// Создаем тост
const toast = document.createElement('div');
toast.className = `toast ${config.bgClass} text-white`;
toast.className = `toast ${config.bgClass} ${config.textColor} shadow-sm`;
toast.id = toastId;
toast.setAttribute('role', 'alert');
toast.setAttribute('aria-live', 'assertive');
toast.setAttribute('aria-atomic', 'true');
toast.innerHTML = `
<div class="toast-header ${config.bgClass} text-white">
<div class="toast-header ${config.bgClass} ${config.textColor}">
<i class="bi ${config.icon} me-2"></i>
<strong class="me-auto">Уведомление</strong>
<small>Только что</small>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="toast"></button>
<button type="button" class="btn-close btn-close-dark" data-bs-dismiss="toast"></button>
</div>
<div class="toast-body">
${message}