[IMP] website_event_track: ask for notifications when favoriting a track
PURPOSE When a user adds a track to his/her favorites, we really want to make sure that the notifications are activated so that he/she can be notified when a track is about to start. The "Set Favorite" button of the tracks will now propagate a new event that will notify the notification manager that a new push notification request should be issued immediately. SPECS - Trigger a new event when the user adds a tracks to his/her favorite. LINKS Task-2347597 COM PR odoo/odoo#69102 ENT PR odoo/enterprise#17612 X-original-commit: 0e28bfdea3938b1d76cb62223b84f155a6ce75d7
This commit is contained in:
committed by
Thibault Delavallée
parent
b7b7ca38c4
commit
17edf6712d
@@ -63,6 +63,13 @@ publicWidget.registry.websiteEventTrackReminder = publicWidget.Widget.extend({
|
||||
type: 'info',
|
||||
title: message
|
||||
});
|
||||
if (self.reminderOn) {
|
||||
core.bus.trigger('open_notification_request', 'add_track_to_favorite', {
|
||||
title: _t('Allow push notifications?'),
|
||||
body: _t('You have to enable push notifications to get reminders for your favorite tracks.'),
|
||||
delay: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
if (result.visitor_uuid) {
|
||||
utils.set_cookie('visitor_uuid', result.visitor_uuid);
|
||||
|
||||
Reference in New Issue
Block a user