mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Only send notification if the item is assigned to a person
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
54552fc95c
commit
3351998efd
|
@ -1156,6 +1156,9 @@ class ReportsController extends Controller
|
||||||
$logItem = $logItem_res[0];
|
$logItem = $logItem_res[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only send notification if assigned
|
||||||
|
if ($assetItem->assignedTo) {
|
||||||
|
|
||||||
if (!$assetItem->assignedTo->locale) {
|
if (!$assetItem->assignedTo->locale) {
|
||||||
Notification::locale(Setting::getSettings()->locale)->send(
|
Notification::locale(Setting::getSettings()->locale)->send(
|
||||||
$assetItem->assignedTo,
|
$assetItem->assignedTo,
|
||||||
|
@ -1167,6 +1170,7 @@ class ReportsController extends Controller
|
||||||
new CheckoutAssetNotification($assetItem, $assetItem->assignedTo, $logItem->user, $acceptance, $logItem->note)
|
new CheckoutAssetNotification($assetItem, $assetItem->assignedTo, $logItem->user, $acceptance, $logItem->note)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue