Handles broadcasting and subscribing to loan due date reminder notifications. Members get notified via PubSub when they have loans due soon.
This module handles real-time notifications for logged-in users. Email notifications are handled separately by LoanReminderEmail.
Summary
Functions
Broadcasts a loan reminder notification to a specific member. This is used for real-time notifications when the member is logged in.
Broadcasts an overdue notification to a specific member.
Subscribe to loan reminder notifications for a specific member. Should be called when a member logs in or opens a LiveView.
Unsubscribe from loan reminder notifications for a specific member.
Functions
Broadcasts a loan reminder notification to a specific member. This is used for real-time notifications when the member is logged in.
Parameters
- transaction: The transaction that's due soon
- days_until_due: Number of days until the due date (can be negative for overdue)
Broadcasts an overdue notification to a specific member.
Subscribe to loan reminder notifications for a specific member. Should be called when a member logs in or opens a LiveView.
Unsubscribe from loan reminder notifications for a specific member.