NotificationTriggers - IEEE-Team-3/map GitHub Wiki
Notification triggers define the conditions under which users receive notifications. These conditions are based on various events within the application, such as task assignments, new messages, and user status updates. Notifications help users stay informed about important activities related to their teams and tasks.
- New Task Assignment: Notify users when a task is assigned to them.
- New Message in Chat: Notify users when they receive a new message in a team or private chat.
- Team Invitation: Notify users when they are invited to join a team.
- Role Change: Notify users when their role in a team or application changes.
- System Alerts: Notify users of important system events, such as downtime or maintenance.
const NotificationTriggerSchema = new Schema({
eventType: { type: String, enum: ['Task Assigned', 'Message Received', 'Team Invitation', 'Role Change', 'System Alert'] },
condition: { type: String },
enabled: { type: Boolean, default: true },
});
- A task is assigned to a user.
- The application checks if the "New Task Assignment" trigger is enabled.
- If enabled, the system sends a notification to the user.
- The notification is delivered based on the user's preferences.
+-----------------------------------------+
| Event Type | Task Assigned |
|-----------------------------------------|
| Condition | User is assigned |
| to a new task |
| Trigger Enabled | [X] Yes |
+-----------------------------------------+