-
Notifications
You must be signed in to change notification settings - Fork 11
✨ Notifications soft-delete #1377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Notifications soft-delete #1377
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements soft-delete functionality for notifications with an updated admin UI to manage archived notifications. The implementation allows notifications to be archived instead of permanently deleted, with the ability to view archived items when needed.
- Adds soft-delete support to the Notification entity by inheriting from BaseAuditableEntity
- Implements archive/unarchive functionality with new API endpoints and UI controls
- Updates notification history queries to optionally include deleted/archived notifications
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
NotificationsController.cs | Adds includeDeleted parameter to List endpoint and new DeleteNotification endpoint |
ApplicationDbContextModelSnapshot.cs | Adds soft-delete columns (DeletedBy, DeletedUtc, LastModifiedBy, LastModifiedUtc) to Notifications table |
AddNotificationSoftDelete.cs | Database migration adding soft-delete columns and index |
NotificationConfiguration.cs | Configures soft-delete behavior for Notification entity |
Notification.cs | Changes inheritance from BaseEntity to BaseAuditableEntity for audit tracking |
NotificationHistoryDto.cs | Adds Id and IsArchived properties for UI display |
GetNotificationHistoryListQuery.cs | Adds IncludeDeleted parameter and query filter logic |
Mapping.cs | Maps IsArchived property based on DeletedUtc value |
SendAdminNotificationCommand.cs | Handles archived notification detection and prevents sending |
NotificationSentResponse.cs | Adds WasArchived property and Archived factory method |
DeleteNotificationCommand.cs | Implements soft-delete command handler |
ScheduleNotificationTask.cs | Removes unnecessary ScheduleAt clearing logic |
INotificationsService.cs | Updates method signatures for archive functionality |
Notifications.razor.cs | Implements UI logic for archive operations and filtering |
Notifications.razor | Updates UI with archive controls and improved layout |
Files not reviewed (1)
- src/Infrastructure/Persistence/Migrations/20250707011647_AddNotificationSoftDelete.Designer.cs: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request introduces functionality for managing archived notifications, refactors the notification handling logic, and adds soft delete support for notifications. The changes span across the Admin UI, API client, application layer, domain layer, and infrastructure layer. Admin UI Enhancements:
API Client Updates:
Application Layer Changes:
Domain Layer Modifications:
Infrastructure Layer Updates:
|
✏️ #1364
✏️ Added soft-delete for notifications and updated UI.
✏️ No.
Figure: Updated UI.
Figure: Include archived notifications