wip
This commit is contained in:
1 parent
b6f77ccc9e
commit
9713388f7d
3 files changed
+87
-89
No files matched your search
@@ -61,13 +61,13 @@ class NotifyAlarms
|
||||
|
||||
switch ($alarm_level_id) {
|
||||
case 1:
|
||||
$message = '<div style="color:rgb(0, 166, 62);">ALARM LEVEL '.$alarm_level_id.'</div>';
|
||||
$message = 'ALARM LEVEL '.$alarm_level_id;
|
||||
break;
|
||||
case 2:
|
||||
$message = '<div style="color:rgb(21, 93, 252);">ALARM LEVEL '.$alarm_level_id.'</div>';
|
||||
$message = 'ALARM LEVEL '.$alarm_level_id;
|
||||
break;
|
||||
default:
|
||||
$message = '<div style="color:rgb(231, 0, 11)">ALARM LEVEL '.$alarm_level_id.'</div>';
|
||||
$message = 'ALARM LEVEL '.$alarm_level_id;
|
||||
break;
|
||||
}
|
||||
$tablecontent = [
|
||||
@@ -81,7 +81,7 @@ class NotifyAlarms
|
||||
];
|
||||
|
||||
Mail::to($user)
|
||||
->send(new AlarmNotification($message, $tablecontent));
|
||||
->send(new AlarmNotification($message, $tablecontent, $alarm_level_id));
|
||||
|
||||
}
|
||||
$stored_alarms[] = $send;
|
||||
|
||||
@@ -16,14 +16,16 @@ class AlarmNotification extends Mailable
|
||||
|
||||
protected array $tablecontent;
|
||||
|
||||
protected int $alarm_level_id;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*/
|
||||
public function __construct($message, $tablecontent)
|
||||
public function __construct($message, $tablecontent, $alarm_level_id)
|
||||
{
|
||||
$this->message = $message;
|
||||
|
||||
$this->tablecontent = $tablecontent;
|
||||
$this->alarm_level_id = $alarm_level_id;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,6 +48,7 @@ class AlarmNotification extends Mailable
|
||||
with: [
|
||||
'tablecontent' => $this->tablecontent,
|
||||
'message' => $this->message,
|
||||
'alarm_level_id' => $this->alarm_level_id,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user