diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index 2c9d29fc1..cabd05633 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -218,6 +218,7 @@ class AcceptanceController extends Controller 'item_tag' => $item->asset_tag, 'item_model' => $display_model, 'item_serial' => $item->serial, + 'item_status' => $item->assetstatus->name ?: '', 'eula' => $item->getEula(), 'note' => $request->input('note'), 'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d'), @@ -308,6 +309,7 @@ class AcceptanceController extends Controller 'item_tag' => $item->asset_tag, 'item_model' => $display_model, 'item_serial' => $item->serial, + 'item_status' => $item->assetstatus->name ?: '', 'note' => $request->input('note'), 'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'), 'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null, diff --git a/app/Notifications/AcceptanceAssetAcceptedNotification.php b/app/Notifications/AcceptanceAssetAcceptedNotification.php index db1555b57..7798dbc0d 100644 --- a/app/Notifications/AcceptanceAssetAcceptedNotification.php +++ b/app/Notifications/AcceptanceAssetAcceptedNotification.php @@ -24,6 +24,7 @@ class AcceptanceAssetAcceptedNotification extends Notification $this->item_tag = $params['item_tag']; $this->item_model = $params['item_model']; $this->item_serial = $params['item_serial']; + $this->item_status = $params['item_status']; $this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'date', false); $this->assigned_to = $params['assigned_to']; $this->note = $params['note']; @@ -65,6 +66,7 @@ class AcceptanceAssetAcceptedNotification extends Notification 'item_tag' => $this->item_tag, 'item_model' => $this->item_model, 'item_serial' => $this->item_serial, + 'item_status' => $this->item_status, 'note' => $this->note, 'accepted_date' => $this->accepted_date, 'assigned_to' => $this->assigned_to, diff --git a/app/Notifications/AcceptanceAssetDeclinedNotification.php b/app/Notifications/AcceptanceAssetDeclinedNotification.php index abdfbbf0c..0a9d6c211 100644 --- a/app/Notifications/AcceptanceAssetDeclinedNotification.php +++ b/app/Notifications/AcceptanceAssetDeclinedNotification.php @@ -24,6 +24,7 @@ class AcceptanceAssetDeclinedNotification extends Notification $this->item_tag = $params['item_tag']; $this->item_model = $params['item_model']; $this->item_serial = $params['item_serial']; + $this->item_status = $params['item_status']; $this->declined_date = Helper::getFormattedDateObject($params['declined_date'], 'date', false); $this->note = $params['note']; $this->assigned_to = $params['assigned_to']; @@ -63,6 +64,7 @@ class AcceptanceAssetDeclinedNotification extends Notification 'item_tag' => $this->item_tag, 'item_model' => $this->item_model, 'item_serial' => $this->item_serial, + 'item_status' => $this->item_status, 'note' => $this->note, 'declined_date' => $this->declined_date, 'assigned_to' => $this->assigned_to, diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index 1c8c901b5..7c9b6b2a8 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -209,6 +209,7 @@ public function toGoogleChat() [ 'item' => $this->item, 'admin' => $this->admin, + 'status' => $this->item->assetstatus(), 'note' => $this->note, 'target' => $this->target, 'fields' => $fields, diff --git a/resources/views/notifications/markdown/asset-acceptance.blade.php b/resources/views/notifications/markdown/asset-acceptance.blade.php index 93292375a..037e24c13 100644 --- a/resources/views/notifications/markdown/asset-acceptance.blade.php +++ b/resources/views/notifications/markdown/asset-acceptance.blade.php @@ -16,6 +16,9 @@ @if (isset($note)) | **{{ trans('general.notes') }}** | {{ $note }} | @endif +@if (isset($item_status)) + | **{{ trans('general.status') }}** | {{ $item_status }} | +@endif @if ((isset($item_tag)) && ($item_tag!='')) | **{{ trans('mail.asset_tag') }}** | {{ $item_tag }} | @endif diff --git a/resources/views/notifications/markdown/checkout-asset.blade.php b/resources/views/notifications/markdown/checkout-asset.blade.php index 4646cef48..b76e3e66a 100644 --- a/resources/views/notifications/markdown/checkout-asset.blade.php +++ b/resources/views/notifications/markdown/checkout-asset.blade.php @@ -31,6 +31,9 @@ @if (isset($last_checkout)) | **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} | @endif +@if (isset($status)) + | **{{ trans('general.status') }}** | {{ $status }} | +@endif @if ((isset($expected_checkin)) && ($expected_checkin!='')) | **{{ trans('mail.expecting_checkin_date') }}** | {{ $expected_checkin }} | @endif