Skip to content

Commit 63c5177

Browse files
authored
Merge pull request #18077 from Godmartinz/acceptance-notif-fixes-pt2
Adds admin to decline notification, fix asset and model name translations on asset notification
2 parents 485d343 + 4fbfaf6 commit 63c5177

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/Notifications/AcceptanceAssetDeclinedNotification.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function __construct($params)
3131
$this->company_name = $params['company_name'];
3232
$this->settings = Setting::getSettings();
3333
$this->qty = $params['qty'] ?? null;
34+
$this->admin = $params['admin'] ?? null;
3435
}
3536

3637
/**
@@ -70,7 +71,8 @@ public function toMail($notifiable)
7071
'declined_date' => $this->declined_date,
7172
'assigned_to' => $this->assigned_to,
7273
'company_name' => $this->company_name,
73-
'qty' => $this->qty,
74+
'qty' => $this->qty,
75+
'admin' => $this->admin,
7476
'intro_text' => trans('mail.acceptance_asset_declined'),
7577
])
7678
->subject(trans('mail.acceptance_asset_declined'));

resources/views/notifications/markdown/asset-acceptance.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| | |
88
| ------------- | ------------- |
99
@if (isset($item_name))
10-
| **{{ trans('general.name') }}** | {{ $item_name }} |
10+
| **{{ trans('general.asset_name') }}** | {{ $item_name }} |
1111
@endif
1212
| **{{ trans('mail.user') }}** | {{ $assigned_to }} |
1313
@if (isset($user->location))
@@ -32,7 +32,7 @@
3232
| **{{ trans('general.category') }}** | {{ $item->model->category->name }} |
3333
@endif
3434
@if ((isset($item_model)) && ($item_model!=''))
35-
| **{{ trans('mail.asset_name') }}** | {{ $item_model }} |
35+
| **{{ trans('general.model_name') }}** | {{ $item_model }} |
3636
@endif
3737
@if (isset($item->model))
3838
| **{{ trans('general.asset_model') }}** | {{ $item->model->name }} |

0 commit comments

Comments
 (0)