fix: правильное отображение иконок категорий уведомлений
- Добавлен маппинг категорий на эмодзи-иконки
- Исправлено отображение текста вместо иконок (bi-chat-dots -> 💬)
- Увеличен размер иконок (text-xl)
- Добавлены эмодзи для всех основных категорий
This commit is contained in:
parent
30ba5bfceb
commit
bd1238b3da
@ -59,9 +59,21 @@ export default function NotificationsPage() {
|
||||
}
|
||||
};
|
||||
|
||||
const getCategoryIcon = (icon?: string) => {
|
||||
// Можно добавить маппинг иконок по необходимости
|
||||
return icon || '📋';
|
||||
const getCategoryIconEmoji = (categoryCode?: string, icon?: string) => {
|
||||
// Маппинг категорий на эмодзи
|
||||
const iconMap: Record<string, string> = {
|
||||
'communications': '💬',
|
||||
'messages': '💬',
|
||||
'requests': '📝',
|
||||
'documents': '📄',
|
||||
'calendar': '📅',
|
||||
'system': '⚙️',
|
||||
'finance': '💰',
|
||||
'procurement': '🛒',
|
||||
'equipment': '🖥️',
|
||||
};
|
||||
|
||||
return iconMap[categoryCode || ''] || '📋';
|
||||
};
|
||||
|
||||
return (
|
||||
@ -192,7 +204,7 @@ export default function NotificationsPage() {
|
||||
<div className="flex gap-4 p-4">
|
||||
{/* Иконка */}
|
||||
<div
|
||||
className={`flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-lg ${
|
||||
className={`flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-xl ${
|
||||
notification.is_read ? 'bg-gray-100' : 'bg-sky-100'
|
||||
}`}
|
||||
style={
|
||||
@ -201,7 +213,7 @@ export default function NotificationsPage() {
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{getCategoryIcon(notification.icon)}
|
||||
{getCategoryIconEmoji(notification.category, notification.icon)}
|
||||
</div>
|
||||
|
||||
{/* Содержимое */}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user