The idea is to manage notifications in the Admin app. The operators will be able to have a frienfly interface where to be notified about relevant event in the system and the store.
Also the operators will have the possibility of managing the notifications in a more detailed grid view.
Notifications will be configurable at operator level so every Admin user can specify which events are of interest and which aren't, so only important notifications are receibed.
The main entity for the notification center is the Notification, that represents a notification of any type specifically sent to an operator.
Besides the standard fields id, companyId, createdAt, and updatedAt, the Notification entity will have the fields:
content): [string] The text of the notification.status): [string enum "read"|"unread"] Status of the notification. If not present, it defaults to "unread".group): [string] Group of the notification. It is a small text that can be used to classify the notifications with different criteria. For example to be used to group the notifications in tabs in the notification center. Examples of groups could be "general", "warning", "critical", etc. If not present, it defaults to "general".type): [string] Type of the notification. It is a samll text to identify which event has happened and is being notified. For example "import-finished", "new-customer-message", etc. This field could be used in the notification center to define the little image to show on the left of each notification. If not present, it defaults to "general".operatorId): [string] The id of the operator that the notification is directed to.GET /notifications/mine [available for operator]): Lists the notifications of the caller operator. The service support the standard query parameter filter.GET /notifications/mine/count [available for operator]): Count the notifications of the called operator. The service support the standard query parameter where.PATCH /notifications/mine [available for operator]): Updates the notifications of the called operator. The only field that can be updated is status. The service support the standard query parameter where.DELETE /notifications/{id}): Deletes a notification by id.PATCH /notifications/{id}): Updates a notification by id. The only field that can be updated is status.The notifications to be implemented in this first version are:
"operator-welcome"): An initial notification for new operators."import-finished"): An importation process has finished (with success or error)."taxonomy-synchronized"): The products, categories and related information loaded in the Admin is synchronized to the Store."message-new"): A new message from a guest or customer has been sent.The notification center UI will be a new section accessible through a bell icon in the Admin header.
This icon will show the quantity of unread notifications for the current operator.
When clicked, the UI is expanded (see example in Ant Design Pro site)
The UI shows the list of notifications from the last 30 days groupd in tabs by notification group:

If the current operator has no notifications in the last 30 days, the UI shows its empty version with the default group "general", and a copy saiyng there's no notifications to show:


1. Notifications icon
<BellOutlined />) icon on the left of the operator name.2. Dynamic tabs
group of the returned notifications. For example, if the API returns notification of groups "critical" and "general", there will be two tabs, "Critical" and "General". So, the number and titles of the tabs are variable.3. List of notifications
createdAt DESC (newer on top).content.type.4.1. Unread notifications
4.2. Read notifications
5. Notification date and time
createdAt date and time of the notification is shown in the "ago" format. An external library could be used to show that format, such as javascript-time-ago.6. Notiication icons
type:
"operator-welcome"): <UserAddOutlined />"import-finished"): <ImportOutlined />"taxonomy-synchronized"): <SyncOutlined />"message-new"): <MailOutlined /><NotificationOutlined />7. Button to mark all as read
8. Button to see all notifications
The grid of notifications will show all the notifications for the current operator, allowing to search, filter, sort and mark as read or unread.
Columns:
content): Sortable, filterable.createdAt): Sortable, filterable.status): Sortable, filterable.group): Sortable, filterable.type): Sortable, filterable.Sorting: By default the grid is sorted by createdAt DESC (newer first).