1.2.1 • Published 7 months ago

@opuscapita/notification-client v1.2.1

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

Notification-Client Library

Overview

The Notification-Client library is a React-based solution designed to deliver real-time notifications to users in a web application. It integrates with a WebSocket backend(live-notification) to provide instant updates and filters notifications dynamically based on user roles, associated business partners, and the currently active service within the application.

Key Features

  • Real-Time Updates: Utilizes WebSocket technology for immediate delivery of notifications.
  • Context-Aware Filtering:
    • Filters notifications based on user roles, ensuring relevance to specific permissions.
    • Matches notifications to the user's associated business partner.
    • Adapts notifications to the currently displayed service.
  • Integration: Serves as a wrapper around the main application.

Requirements

To function correctly, the library requires the following props to be passed:

  • userData.roles: An array of roles associated with the current user, which determines role-based filtering of notifications.
  • userData.businesspartner: The business partner associated with the user, used for context-specific filtering.
<LiveNotificationContainer
userDataRoles={userData.roles}
userDataBusinessPartner={userData.businesspartner}
>

These props allow the library to connect to the backend and filter notifications accurately based on the user context.

How It Works

  1. Backend Communication(live-notification): Connects to the WebSocket backend to receive live notifications.
  2. Dynamic Filtering: Filters notifications using user-specific data (roles, businessPartner, and the active service) to ensure only relevant notifications are displayed.
  3. Seamless Embedding: Acts as a container for a main application, wrapping its content and managing notifications without disrupting the user experience showing the notification at the top of the screen.
1.2.0

7 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.2.1

7 months ago

1.0.2

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago