A free open source IT asset/license management system
Add default location to checkout and checkin emails
Marcus Moore5d03a3a6b239
diff --git a/app/Mail/CheckoutAssetMail.php b/app/Mail/CheckoutAssetMail.phpindex 57b7cbec64..fbf98e4949 100644--- a/app/Mail/CheckoutAssetMail.php+++ b/app/Mail/CheckoutAssetMail.php@@ -138,6 +138,7 @@ class CheckoutAssetMail extends BaseMailable'last_checkout' => $this->last_checkout,'expected_checkin' => $this->expected_checkin,'location' => $this->getLocation(),+ 'default_location' => $this->getDefaultLocation(),'introduction_line' => $this->introductionLine(),],);@@ -204,4 +205,9 @@ class CheckoutAssetMail extends BaseMailablereturn null;}++ private function getDefaultLocation(): ?string+ {+ return $this->item->defaultLoc?->name;+ }}diff --git a/resources/views/mail/markdown/checkin-asset.blade.php b/resources/views/mail/markdown/checkin-asset.blade.phpindex 1623b3531e..708c93dc51 100644--- a/resources/views/mail/markdown/checkin-asset.blade.php+++ b/resources/views/mail/markdown/checkin-asset.blade.php@@ -36,6 +36,9 @@@if ($item->location)| **{{ trans('general.location') }}** | {{ $item->location->name }} |@endif+@if ($item->defaultLoc)+| **{{ trans('admin/hardware/form.default_location') }}** | {{ $item->defaultLoc->name }} |+@endif@if (isset($last_checkout))| **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} |@endifdiff --git a/resources/views/mail/markdown/checkout-asset.blade.php b/resources/views/mail/markdown/checkout-asset.blade.phpindex 918b66e0c9..7718402b3a 100644--- a/resources/views/mail/markdown/checkout-asset.blade.php+++ b/resources/views/mail/markdown/checkout-asset.blade.php@@ -36,6 +36,9 @@@if ($location)| **{{ trans('general.location') }}** | {{ $location }} |@endif+@if ($default_location)+| **{{ trans('admin/hardware/form.default_location') }}** | {{ $default_location }} |+@endif@if (isset($last_checkout))| **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} |@endif