fix: add Notifiable trait to Supplier and Customer, add null guards to notification messages

This commit is contained in:
ghassan committed 2026-05-19 13:29:28 +03:00
1 parent 2d54c670de
commit add011790c
6 files changed
+8 -6

No files matched your search

@@ -23,7 +23,7 @@ class ProductionOrderCompletedNotification extends Notification implements Shoul
public function toUltraMessage(mixed $notifiable): UltraMessageMessage
{
return UltraMessageMessage::text(
"✅ *Production Complete*\n\nProduction Order *#{$this->order->order_number}* has been completed.\n\nProduct: {$this->order->product->item_name}\nQuantity: {$this->order->quantity_to_produce}\nCompleted: {$this->order->completion_date->format('d M Y')}"
"✅ *Production Complete*\n\nProduction Order *#{$this->order->order_number}* has been completed.\n\nProduct: {$this->order->product?->item_name ?? 'N/A'}\nQuantity: {$this->order->quantity_to_produce}\nCompleted: {$this->order->completion_date?->format('d M Y') ?? now()->format('d M Y')}"
);
}
}