diff --git a/app/Mail/CharacteristicApprovalMail.php b/app/Mail/CharacteristicApprovalMail.php index 9d7127b..88f4cc6 100644 --- a/app/Mail/CharacteristicApprovalMail.php +++ b/app/Mail/CharacteristicApprovalMail.php @@ -23,15 +23,24 @@ class CharacteristicApprovalMail extends Mailable public $pdfPath; public $tableData; + public $pendingApprovers; + + public $approverNameFromMaster; + + public $subjectLine; + /** * Create a new message instance. */ - public function __construct($request, $approverName, $level, $pdfPath = null, $characteristics = []) + public function __construct($request, $approverName, $level, $pdfPath = null, $pendingApprovers, $approverNameFromMaster, $subjectLine, $characteristics = []) { $this->request = $request; $this->approverName = $approverName; $this->level = $level; $this->pdfPath = $pdfPath; + $this->pendingApprovers = $pendingApprovers; + $this->approverNameFromMaster = $approverNameFromMaster; + $this->subjectLine = $subjectLine; $this->tableData = $characteristics; } @@ -41,7 +50,7 @@ class CharacteristicApprovalMail extends Mailable public function envelope(): Envelope { return new Envelope( - subject: 'Characteristic Approval Mail', + subject: $this->subjectLine, ); } @@ -56,7 +65,10 @@ class CharacteristicApprovalMail extends Mailable 'company' => 'CRI Digital Manufacturing Solutions', 'greeting' => 'Dear ' . $this->approverName . ',', 'request' => $this->request, + 'level' => $this->level, 'tableData' => $this->tableData, + 'pendingApprovers' => $this->pendingApprovers, + 'approverNameFromMaster' => $this->approverNameFromMaster, 'approveUrl' => $this->approveUrl(), 'holdUrl' => $this->holdUrl(), 'rejectUrl' => $this->rejectUrl(), @@ -112,4 +124,7 @@ class CharacteristicApprovalMail extends Mailable )->as(basename($this->pdfPath)), ]; } + + + }