On-site ("bell") notifications

This page is about notifications displayed within the app. If you are interested in push notifications, you may want to read this instead.

On-site notifications are supposed to inform the user about important events, for example when somebody joined their group or they have a pickup soon.

Notifications are generated by the backend, either as follow-up events to user actions (user joins a group) or because time passed (pickup happens in some hours).

The frontend loads these via API on startup. If there's unseen notifications, it displays the number of unseen notifications.

To add a new notification, have a look at the notifications module on the backend. Create a new signal receiver if a notification depends on a model change, or create a huey crontab task if it depends on time. Make sure to prevent duplicated notifications. If you add more entries to the context JSON field, make sure to follow the existing pattern. You can add an expiry date, too.

Now the notification needs to get integrated in the frontend. The module is called notifications, too. Every notification needs a nice telling text, a route and an icon.

results matching ""

    No results matching ""