checks to see if a user has an email before sending them a reminder email.

This commit is contained in:
Godfrey M 2024-03-05 10:30:24 -08:00
parent 9a5c1b8126
commit 6c3a668400
2 changed files with 5 additions and 0 deletions

View file

@ -1178,6 +1178,10 @@ class ReportsController extends Controller
} }
} }
if ($assetItem->assignedTo->email == ''){
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.no_email'));
}
return redirect()->route('reports/unaccepted_assets')->with('success', trans('admin/reports/general.reminder_sent')); return redirect()->route('reports/unaccepted_assets')->with('success', trans('admin/reports/general.reminder_sent'));
} }

View file

@ -201,6 +201,7 @@ return [
'new_password' => 'New Password', 'new_password' => 'New Password',
'next' => 'Next', 'next' => 'Next',
'next_audit_date' => 'Next Audit Date', 'next_audit_date' => 'Next Audit Date',
'no_email' => 'No email address associated with this user',
'last_audit' => 'Last Audit', 'last_audit' => 'Last Audit',
'new' => 'new!', 'new' => 'new!',
'no_depreciation' => 'No Depreciation', 'no_depreciation' => 'No Depreciation',