From ea049cdf22fa61ae502f0cc01ecd21db12629ece Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 6 Feb 2026 17:40:47 +0100 Subject: [PATCH] wip --- app/Console/Commands/Services/Tasks/NotifyAlarms.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/Services/Tasks/NotifyAlarms.php b/app/Console/Commands/Services/Tasks/NotifyAlarms.php index 37004b67..704ef3a1 100644 --- a/app/Console/Commands/Services/Tasks/NotifyAlarms.php +++ b/app/Console/Commands/Services/Tasks/NotifyAlarms.php @@ -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; } - $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,8 +141,9 @@ class NotifyAlarms ->sendToDatabase($user); break; + } else { + $stored_alarms[] = $send; } - $stored_alarms[] = $send; } } }