This commit is contained in:
salam committed 2026-02-06 17:40:47 +01:00
1 parent 80ca8b4d78
commit ea049cdf22
1 file changed
+7 -2
@@ -66,6 +66,8 @@ class NotifyAlarms
'notify_by_mail' => 1,
]);
$stored_alarms[] = $send->id;
switch ($alarm_level_id) {
case 1:
$message = 'ALARM LEVEL '.$alarm_level_id;
@@ -91,8 +93,9 @@ class NotifyAlarms
Mail::to($user)
->send(new AlarmNotification($message, $tablecontent, $alarm_level_id));
}
} else {
$stored_alarms[] = $send;
}
break;
case 'system':
@@ -109,6 +112,7 @@ class NotifyAlarms
'fieldname' => $fieldname,
'notify_by_system' => 1,
]);
$stored_alarms[] = $send->id;
switch ($alarm_level_id) {
case 1:
@@ -137,7 +141,7 @@ class NotifyAlarms
->sendToDatabase($user);
break;
}
} else {
$stored_alarms[] = $send;
}
}
@@ -145,6 +149,7 @@ class NotifyAlarms
}
}
}
}
dd($stored_alarms);
if ($stored_alarms) {
// PersonalNotificationSend::whereNotIn('id', $stored_alarms)->delete();