Skip to content

A free open source IT asset/license management system

adds asset tag to subject line of checkin/out

Godfrey M1fcf5e03e7a7
diff --git a/app/Mail/CheckinAssetMail.php b/app/Mail/CheckinAssetMail.php
index 355c2f9f13..72f129dd6d 100644
--- a/app/Mail/CheckinAssetMail.php
+++ b/app/Mail/CheckinAssetMail.php
@@ -47,7 +47,7 @@ class CheckinAssetMail extends Mailable
return new Envelope(
from: $from,
- subject: trans('mail.Asset_Checkin_Notification'),
+ subject: trans('mail.Asset_Checkin_Notification', ['tag' => $this->item->asset_tag]),
);
}
diff --git a/app/Mail/CheckoutAssetMail.php b/app/Mail/CheckoutAssetMail.php
index 44e0c06100..fae935ceb7 100644
--- a/app/Mail/CheckoutAssetMail.php
+++ b/app/Mail/CheckoutAssetMail.php
@@ -125,7 +125,7 @@ class CheckoutAssetMail extends Mailable
private function getSubject(): string
{
if ($this->firstTimeSending) {
- return trans('mail.Asset_Checkout_Notification');
+ return trans('mail.Asset_Checkout_Notification', ['tag' => $this->item->asset_tag]);
}
return trans('mail.unaccepted_asset_reminder');
diff --git a/resources/lang/en-US/mail.php b/resources/lang/en-US/mail.php
index 5efd9c06fe..40a3918cb7 100644
--- a/resources/lang/en-US/mail.php
+++ b/resources/lang/en-US/mail.php
@@ -4,8 +4,8 @@ return [
'Accessory_Checkin_Notification' => 'Accessory checked in',
'Accessory_Checkout_Notification' => 'Accessory checked out',
- 'Asset_Checkin_Notification' => 'Asset checked in',
- 'Asset_Checkout_Notification' => 'Asset checked out',
+ 'Asset_Checkin_Notification' => 'Asset checked in: [:tag]',
+ 'Asset_Checkout_Notification' => 'Asset checked out: [:tag]',
'Confirm_Accessory_Checkin' => 'Accessory checkin confirmation',
'Confirm_Asset_Checkin' => 'Asset checkin confirmation',
'Confirm_component_checkin' => 'Component checkin confirmation',