I finished the remaining polish so the admin app now feels fully “app‑like” across the core screens.
This commit is contained in:
11
resources/js/admin/mobile/lib/notificationUnread.ts
Normal file
11
resources/js/admin/mobile/lib/notificationUnread.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export type NotificationReadItem = {
|
||||
id: string | number;
|
||||
is_read?: boolean;
|
||||
};
|
||||
|
||||
export function collectUnreadIds(items: NotificationReadItem[]): number[] {
|
||||
return items
|
||||
.filter((item) => !item.is_read)
|
||||
.map((item) => (typeof item.id === 'string' ? Number(item.id) : item.id))
|
||||
.filter((id) => Number.isFinite(id));
|
||||
}
|
||||
Reference in New Issue
Block a user