mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-29 22:51:07 -08:00
fixed conditionals
This commit is contained in:
parent
983b78edd9
commit
de41def2b3
|
@ -1152,13 +1152,14 @@ class ReportsController extends Controller
|
||||||
}
|
}
|
||||||
$logItem = $logItem_res[0];
|
$logItem = $logItem_res[0];
|
||||||
}
|
}
|
||||||
|
$email = $assetItem->assignedTo?->email;
|
||||||
|
$locale = $assetItem->assignedTo?->locale;
|
||||||
// Only send notification if assigned
|
// Only send notification if assigned
|
||||||
if ($assetItem->assignedTo?->email) {
|
if ($locale && $email) {
|
||||||
Mail::to($assetItem->assignedTo->email)->send((new CheckoutAssetMail($assetItem, $assetItem->assignedTo, $logItem->user, $logItem->note, $acceptance))->locale($assetItem->assignedTo?->locale));
|
Mail::to($email)->send((new CheckoutAssetMail($assetItem, $assetItem->assignedTo, $logItem->user, $logItem->note, $acceptance))->locale($locale));
|
||||||
|
|
||||||
} else {
|
} elseif ($email) {
|
||||||
Mail::to($assetItem->assignedTo->email)->send((new CheckoutAssetMail($assetItem, $assetItem->assignedTo, $logItem->user, $logItem->note, $acceptance)));
|
Mail::to($email)->send((new CheckoutAssetMail($assetItem, $assetItem->assignedTo, $logItem->user, $logItem->note, $acceptance)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($assetItem->assignedTo?->email == ''){
|
if ($assetItem->assignedTo?->email == ''){
|
||||||
|
|
Loading…
Reference in a new issue