Merge pull request #21 from Godmartinz/status_labels_check_emails_checkout

adds Status labels to check in and out emails
This commit is contained in:
Godfrey Martinez 2024-07-30 09:41:05 -07:00 committed by GitHub
commit f19e58b352
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View file

@ -162,6 +162,7 @@ class CheckinAssetNotification extends Notification
$message = (new MailMessage)->markdown('notifications.markdown.checkin-asset',
[
'item' => $this->item,
'status' => $this->item->assetstatus->name ?: '',
'admin' => $this->admin,
'note' => $this->note,
'target' => $this->target,

View file

@ -209,7 +209,7 @@ public function toGoogleChat()
[
'item' => $this->item,
'admin' => $this->admin,
'status' => $this->item->assetstatus(),
'status' => $this->item->assetstatus->name ?: '',
'note' => $this->note,
'target' => $this->target,
'fields' => $fields,

View file

@ -31,6 +31,9 @@
@if (isset($last_checkout))
| **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} |
@endif
@if (isset($status))
| **{{ trans('general.status') }}** | {{ $status }} |
@endif
@foreach($fields as $field)
@if (($item->{ $field->db_column_name() }!='') && ($field->show_in_email) && ($field->field_encrypted=='0'))
| **{{ $field->name }}** | {{ $item->{ $field->db_column_name() } }} |