Merge pull request 'changed logic in bid transporter page' (#129) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

Reviewed-on: #129
This commit was merged in pull request #129.
This commit is contained in:
2026-01-24 09:24:07 +00:00

View File

@@ -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(