feat: add notification center with bell dropdown, full page, and workspace scoping (Story 3.3)
Enhance NotificationDropdown with type-specific icons, French description builder, click-to-navigate with mark-as-read, and "Voir toutes les notifications" link. Add full notifications page at /notifications with pagination (25/page), individual mark-as-read, and empty state. Includes code review fixes: workspace-scoped unread count and dropdown items, race condition fix (mark-as-read before navigate), efficient markAllAsRead via direct update, deleted declaration URL handling, and per-workspace cache keys. 7 new feature tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
export * from './auth';
|
||||
export * from './dashboard';
|
||||
export * from './navigation';
|
||||
export * from './notification';
|
||||
export * from './team';
|
||||
export * from './ui';
|
||||
|
||||
26
resources/js/types/notification.ts
Normal file
26
resources/js/types/notification.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
export type NotificationType =
|
||||
| 'nudge'
|
||||
| 'declaration_overdue'
|
||||
| 'document_uploaded'
|
||||
| 'bulk_notification'
|
||||
| 'status_changed';
|
||||
|
||||
export type NotificationData = {
|
||||
workspace_id: number;
|
||||
notification_type: NotificationType;
|
||||
declaration_id?: number;
|
||||
sender_id?: number;
|
||||
client_id?: number;
|
||||
declaration_title?: string;
|
||||
sender_name?: string;
|
||||
url?: string;
|
||||
};
|
||||
|
||||
export type AppNotification = {
|
||||
id: string;
|
||||
type: string;
|
||||
data: NotificationData;
|
||||
read_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
Reference in New Issue
Block a user