record->loadMissing(['shipment', 'form']); $awb = $this->record->shipment->awb_no; $title = $this->record->form?->title ?? ('فرم #' . $this->record->commitment_form_id); $reason = $this->record->notes ? " دلیل: {$this->record->notes}" : ''; return [ 'type' => 'commitment_rejected', 'shipment_id' => $this->record->shipment_id, 'awb_no' => $awb, 'message' => "تعهدنامه «{$title}» سفارش {$awb} رد شد. لطفاً فایل اصلاح‌شده را دوباره آپلود کنید.{$reason}", 'action_url' => '/order-detail/?order_id=' . $this->record->shipment_id, ]; } }