changed logic in edit transporter bid #144
@@ -29,6 +29,12 @@ class EditRfqTransporterBid extends EditRecord
|
|||||||
->search($this->record->id) + 1;
|
->search($this->record->id) + 1;
|
||||||
|
|
||||||
$recipients = User::role(['Super Admin', 'Rfq Supervisor', 'TransporterBid Employee'])->get();
|
$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();
|
$currentUser = Filament::auth()->user();
|
||||||
|
|
||||||
|
|
||||||
@@ -52,26 +58,26 @@ class EditRfqTransporterBid extends EditRecord
|
|||||||
'recipients' => $recipients->pluck('id'),
|
'recipients' => $recipients->pluck('id'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
foreach ($recipients as $user) {
|
foreach ($recipients1 as $user) {
|
||||||
// $user->notify(
|
$user->notify(
|
||||||
// new PushAlertNotification(
|
new PushAlertNotification(
|
||||||
// 'Rank Updated',
|
'Rank Updated',
|
||||||
// $body
|
$body
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
|
|
||||||
$subscriptions = $user->pushSubscriptions;
|
// $subscriptions = $user->pushSubscriptions;
|
||||||
|
|
||||||
dd($subscriptions);
|
// dd($subscriptions);
|
||||||
|
|
||||||
foreach ($subscriptions as $sub) {
|
// foreach ($subscriptions as $sub) {
|
||||||
$sub->notify(
|
// $sub->notify(
|
||||||
new PushAlertNotification(
|
// new PushAlertNotification(
|
||||||
'Rank Updated',
|
// 'Rank Updated',
|
||||||
$body
|
// $body
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user