fixes notifications for licenses and asset to asset checkouables

This commit is contained in:
Godfrey M
2024-11-04 15:13:10 -08:00
parent 5897d37fcf
commit 0d707a1851
7 changed files with 75 additions and 40 deletions
+3 -2
View File
@@ -23,7 +23,7 @@ class CheckinLicenseMail extends Mailable
public function __construct(LicenseSeat $licenseSeat, $checkedOutTo, User $checkedInBy, $note)
{
$this->target = $checkedOutTo;
$this->item = $licenseSeat->license;
$this->item = $licenseSeat;
$this->admin = $checkedInBy;
$this->note = $note;
$this->settings = Setting::getSettings();
@@ -50,7 +50,8 @@ class CheckinLicenseMail extends Mailable
return new Content(
markdown: 'mail.markdown.checkin-license',
with: [
'item' => $this->item,
'license_seat' => $this->item,
'license' => $this->item->license,
'admin' => $this->admin,
'note' => $this->note,
'target' => $this->target,
+3 -3
View File
@@ -22,7 +22,7 @@ class CheckoutLicenseMail extends Mailable
*/
public function __construct(LicenseSeat $licenseSeat, $checkedOutTo, User $checkedOutBy, $acceptance, $note)
{
$this->item = $licenseSeat->license;
$this->item = $licenseSeat;
$this->admin = $checkedOutBy;
$this->note = $note;
$this->target = $checkedOutTo;
@@ -53,11 +53,11 @@ class CheckoutLicenseMail extends Mailable
$req_accept = method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0;
$accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance);
return new Content(
markdown: 'mail.markdown.checkout-license',
with: [
'item' => $this->item,
'license_seat' => $this->item,
'license' => $this->item->license,
'admin' => $this->admin,
'note' => $this->note,
'target' => $this->target,