unable to select a readed notification

This commit is contained in:
smanylov
2026-04-10 16:31:22 +07:00
parent 90903a67ac
commit 02b378612b
2 changed files with 25 additions and 12 deletions
+6 -1
View File
@@ -521,7 +521,7 @@
gap: 8px; gap: 8px;
} }
/* .upload-progress { /* .upload-progress {
font-weight: 500; font-weight: 500;
font-size: 18px; font-size: 18px;
margin-right: 16px; margin-right: 16px;
@@ -5250,6 +5250,11 @@
border: 2px solid v.$border-color-1-hover; border: 2px solid v.$border-color-1-hover;
} }
} }
.empty-block {
width: 24px;
height: 24px;
}
} }
} }
@@ -79,7 +79,11 @@ export function NotificationsList() {
} }
function selectAllHandler() { function selectAllHandler() {
setSelectedFiles(new Set(allNotifications?.notifications.map(item => item.id))); const idsToSelect = allNotifications?.notifications
.filter(item => item.status !== 'READIED')
.map(item => item.id);
setSelectedFiles(new Set(idsToSelect));
} }
async function notificationActionHandler(ids: number[], action: 'remove' | 'mark-as-read') { async function notificationActionHandler(ids: number[], action: 'remove' | 'mark-as-read') {
@@ -179,6 +183,7 @@ export function NotificationsList() {
<div <div
className="notification-check" className="notification-check"
> >
{item.status !== 'READIED' ? (
<button <button
onClick={() => { onClick={() => {
selectHandler(item.id); selectHandler(item.id);
@@ -188,6 +193,9 @@ export function NotificationsList() {
<IconCheck /> <IconCheck />
)} )}
</button> </button>
) : (
<div className="empty-block"></div>
)}
</div> </div>
<div <div
@@ -210,7 +218,7 @@ export function NotificationsList() {
<div <div
className="notification-text" className="notification-text"
> >
{norificationTranslate.has(item.message) ? norificationTranslate(item.message): item.message} {norificationTranslate.has(item.message) ? norificationTranslate(item.message) : item.message}
</div> </div>
<div <div
className="notification-footer" className="notification-footer"