feat(push notification): menambahkan notification click di worker nya dan menambahan url nya di componentnya
This commit is contained in:
parent
55c0defdbe
commit
78661af615
@ -89,6 +89,7 @@ public function register()
|
||||
[
|
||||
'title' => 'Member Baru',
|
||||
'body' => 'Seorang member baru baru saja bergabung. Cek selengkapnya di aplikasi',
|
||||
'url' => route('studio.loyalty.customer.index'),
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
@ -78,6 +78,7 @@ public function create()
|
||||
[
|
||||
'title' => 'Order',
|
||||
'body' => $result['message'],
|
||||
'url' => route('studio.finance.payroll.index'),
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
@ -97,6 +97,7 @@ public function save()
|
||||
[
|
||||
'title' => 'Order',
|
||||
'body' => 'Ada order baru masuk dengan nominal '.$result->total,
|
||||
'url' => route('studio.manage.order.index'),
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
@ -12,3 +12,9 @@ self.addEventListener('push', (event) => {
|
||||
})
|
||||
);
|
||||
})
|
||||
|
||||
self.addEventListener('notificationclick', (event) => {
|
||||
event.waitUntil(
|
||||
clients.openWindow(event.notification.data.url)
|
||||
);
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user