Refactor CharacteristicApprovalMail to include additional properties for pending approvers and subject line
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
This commit is contained in:
@@ -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)),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user