trying to get link to work, fixed up markup and url

This commit is contained in:
Godfrey M 2024-05-23 16:08:18 -07:00
parent d3ab152d30
commit 442903ea5e
3 changed files with 9 additions and 4 deletions

View file

@ -22,6 +22,8 @@ class UnacceptedAssetReminderNotification extends Notification
{ {
$this->count = $count; $this->count = $count;
$this->target = $checkout_info['acceptance']->assignedTo; $this->target = $checkout_info['acceptance']->assignedTo;
$this->acceptance = $checkout_info['acceptance'];
} }
/** /**
@ -43,11 +45,13 @@ class UnacceptedAssetReminderNotification extends Notification
*/ */
public function toMail() public function toMail()
{ {
$accept_url = route('account.accept');
$message = (new MailMessage)->markdown('notifications.markdown.asset-reminder', $message = (new MailMessage)->markdown('notifications.markdown.asset-reminder',
[ [
'count' => $this->count, 'count' => $this->count,
'assigned_to' => $this->target->present()->fullName, 'assigned_to' => $this->target->present()->fullName,
'link' => route('account.accept') 'link' => route('account.accept'),
'accept_url' => $accept_url,
]) ])
->subject(trans('mail.unaccepted_asset_reminder')); ->subject(trans('mail.unaccepted_asset_reminder'));

View file

@ -56,7 +56,7 @@ return [
'i_have_read' => 'I have read and agree to the terms of use, and have received this item.', 'i_have_read' => 'I have read and agree to the terms of use, and have received this item.',
'inventory_report' => 'Inventory Report', 'inventory_report' => 'Inventory Report',
'item' => 'Item:', 'item' => 'Item:',
'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please <a href=":link">click here</a> to review your items.', 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.',
'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.',
'link_to_update_password' => 'Please click on the following link to update your :web password:', 'link_to_update_password' => 'Please click on the following link to update your :web password:',
'login' => 'Login:', 'login' => 'Login:',
@ -87,7 +87,7 @@ return [
'upcoming-audits' => 'There is :count asset that is coming up for audit within :threshold days.|There are :count assets that are coming up for audit within :threshold days.', 'upcoming-audits' => 'There is :count asset that is coming up for audit within :threshold days.|There are :count assets that are coming up for audit within :threshold days.',
'user' => 'User', 'user' => 'User',
'username' => 'Username', 'username' => 'Username',
'unaccepted_asset_reminder' => 'You have Unnaccepted Assets.', 'unaccepted_asset_reminder' => 'You have Unaccepted Assets.',
'welcome' => 'Welcome :name', 'welcome' => 'Welcome :name',
'welcome_to' => 'Welcome to :web!', 'welcome_to' => 'Welcome to :web!',
'your_assets' => 'View Your Assets', 'your_assets' => 'View Your Assets',

View file

@ -1,7 +1,8 @@
@component('mail::message') @component('mail::message')
# {{ trans('mail.hello') }} {{ $assigned_to}}, # {{ trans('mail.hello') }} {{ $assigned_to}},
{{ trans('mail.item_checked_reminder', ['link' => $link, 'count' => $count]) }} {{trans('mail.item_checked_reminder', ['count' => $count])}}
[{{ trans('general.click_here')}}]({{$accept_url}})
{{ trans('mail.best_regards') }} {{ trans('mail.best_regards') }}