Merge pull request 'changed logic in edit transporter bid' (#144) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #144
This commit was merged in pull request #144.
This commit is contained in:
@@ -29,6 +29,12 @@ class EditRfqTransporterBid extends EditRecord
|
||||
->search($this->record->id) + 1;
|
||||
|
||||
$recipients = User::role(['Super Admin', 'Rfq Supervisor', 'TransporterBid Employee'])->get();
|
||||
|
||||
$recipients1 = User::role(['Super Admin', 'Rfq Supervisor', 'TransporterBid Employee'])->whereHas('pushSubscriptions')->get();
|
||||
|
||||
dd($recipients1);
|
||||
|
||||
|
||||
$currentUser = Filament::auth()->user();
|
||||
|
||||
|
||||
@@ -52,26 +58,26 @@ class EditRfqTransporterBid extends EditRecord
|
||||
'recipients' => $recipients->pluck('id'),
|
||||
]);
|
||||
|
||||
foreach ($recipients as $user) {
|
||||
// $user->notify(
|
||||
// new PushAlertNotification(
|
||||
// 'Rank Updated',
|
||||
// $body
|
||||
// )
|
||||
// );
|
||||
foreach ($recipients1 as $user) {
|
||||
$user->notify(
|
||||
new PushAlertNotification(
|
||||
'Rank Updated',
|
||||
$body
|
||||
)
|
||||
);
|
||||
|
||||
$subscriptions = $user->pushSubscriptions;
|
||||
// $subscriptions = $user->pushSubscriptions;
|
||||
|
||||
dd($subscriptions);
|
||||
// dd($subscriptions);
|
||||
|
||||
foreach ($subscriptions as $sub) {
|
||||
$sub->notify(
|
||||
new PushAlertNotification(
|
||||
'Rank Updated',
|
||||
$body
|
||||
)
|
||||
);
|
||||
}
|
||||
// foreach ($subscriptions as $sub) {
|
||||
// $sub->notify(
|
||||
// new PushAlertNotification(
|
||||
// 'Rank Updated',
|
||||
// $body
|
||||
// )
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user