We need to make a generic system that will allow us to enable/disable and select type of notifications (e.g. Email / SMS / etc) for different events in the system.
Requirements:
there should be global, per tenant settings for each type of event. Like we list event types (e.g. Task created, Task Edited, etc) and we can enable/disable and configure the type of notifications for such event (SMS, Email, etc, possible to select few types of notifications for each type of event, e.g. get both SMS and email daily about how much each employee worked specific day and who took day off). Such settings should be placed inside the "Settings" menu item. We can call it "Notifications"
it should be possible to override settings defined per tenant for each organization in the tenant. So we need to add also the same "Notifications" item inside the Organization menu. The page can be identical to the same page for Tenant and should display tenant settings, however, should also allow the user to override any settings with different and our system should respect such overrides.
it should be possible to override settings defined in the Organization per Project. So for each project, we should have same "Notifications" page which will allow overriding settings (but only settings which relevant for Projects of course, e.g. for Tasks notifications, but not for Equipment sharing)
it should be possible to override settings for each "Feature" of Gauzy, e.g. for Goals we should have own menu item "Notifications", same for "Tasks", same for Timesheets, same for Approvals, etc. I.e. such additional pages should be created (with of course the smaller amount of settings relevant only to given feature)
Notifications should use "Custom SMTP" in the Settings menu and we also should add "SMS Gateways" in the settings where it should be possible to enable/disable Twillio and other similar services for SMS notifications.
When we design this feature, we should also keep in mind that we may want to send all such events notifications to services like Zapier (https://github.com/ever-co/gauzy/issues/1691). This is critically important so we don't recreate everything again. We probably should use CQRS / Events / Event Handlers in this feature extensively and have multiple configurable "targets" for notifications, like Emails, SMS, Zapier, Slack, etc
We need to make a generic system that will allow us to enable/disable and select type of notifications (e.g. Email / SMS / etc) for different events in the system.
Requirements: