changed logic in bid transporter page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Gemini PR Review / Gemini PR Review (pull_request) Successful in 14s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Larastan / larastan (pull_request) Failing after 2m19s
Laravel Pint / pint (pull_request) Failing after 2m29s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Gemini PR Review / Gemini PR Review (pull_request) Successful in 14s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Larastan / larastan (pull_request) Failing after 2m19s
Laravel Pint / pint (pull_request) Failing after 2m29s
This commit is contained in:
@@ -17,10 +17,15 @@ class EditRfqTransporterBid extends EditRecord
|
||||
|
||||
protected function afterSave(): void
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (! $this->record->wasChanged('total_freight_charge')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// dd($this->record);
|
||||
|
||||
$rank = RfqTransporterBid::where('request_quotation_id', $this->record->request_quotation_id)
|
||||
->orderBy('total_freight_charge')
|
||||
->pluck('id')
|
||||
@@ -29,19 +34,28 @@ class EditRfqTransporterBid extends EditRecord
|
||||
$recipients = User::role(['Super Admin', 'Rfq Supervisor'])->get();
|
||||
$currentUser = Filament::auth()->user();
|
||||
|
||||
|
||||
if ($currentUser && ! $recipients->contains('id', $currentUser->id)) {
|
||||
$recipients->push($currentUser);
|
||||
}
|
||||
|
||||
$user1 = Filament::auth()->user();
|
||||
// $user1 = Filament::auth()->user();
|
||||
|
||||
$body = "$currentUser current rank is #{$rank}";
|
||||
|
||||
|
||||
Notification::make()
|
||||
->title('Rank Updated')
|
||||
->body("{$currentUser->name} current rank is #{$rank}")
|
||||
->success()
|
||||
->sendToDatabase($recipients);
|
||||
|
||||
\Log::info('Notification sent', [
|
||||
'rank' => $rank,
|
||||
'recipients' => $recipients->pluck('id'),
|
||||
]);
|
||||
|
||||
$body = "$currentUser current rank is #{$rank}";
|
||||
|
||||
Notification::make()
|
||||
->title('Rank Updated')
|
||||
->body("$currentUser current rank is #{$rank}")
|
||||
->success()
|
||||
->sendToDatabase($recipients);
|
||||
|
||||
foreach ($recipients as $user) {
|
||||
$user->notify(
|
||||
|
||||
Reference in New Issue
Block a user