toggle difference s book and partner; remove sport froma larm filter

This commit is contained in:
salam committed 2026-02-07 12:23:46 +01:00
1 parent 7c0fd2b7a0
commit 4e64f2f318
12 files changed
+84 -90

No files matched your search

+8 -10
View File
@@ -42,20 +42,18 @@ class SettingGeneratorUser
}
$alarm_levels = AlarmLevel::get();
foreach ($sports as $sport_id) {
foreach ($alarm_levels as $alarm_level) {
foreach ($alarm_levels as $alarm_level) {
PersonalNotification::firstOrCreate(
['user_id' => $record->id, 'bookmaker_id' => $record->bookmaker_id, 'alarm_level_id' => $alarm_level->id],
['notify_by_system' => 0, 'notify_by_email' => 0]
);
if ($record->partner_bookmaker_id) {
PersonalNotification::firstOrCreate(
['sport_id' => $sport_id, 'user_id' => $record->id, 'bookmaker_id' => $record->bookmaker_id, 'alarm_level_id' => $alarm_level->id],
['user_id' => $record->id, 'bookmaker_id' => $record->partner_bookmaker_id, 'alarm_level_id' => $alarm_level->id],
['notify_by_system' => 0, 'notify_by_email' => 0]
);
if ($record->partner_bookmaker_id) {
PersonalNotification::firstOrCreate(
['sport_id' => $sport_id, 'user_id' => $record->id, 'bookmaker_id' => $record->partner_bookmaker_id, 'alarm_level_id' => $alarm_level->id],
['notify_by_system' => 0, 'notify_by_email' => 0]
);
}
}
}