design wip

This commit is contained in:
salam committed 2026-02-08 12:50:53 +01:00
1 parent 07b9dfac44
commit fbacfdde20
10 files changed
+154 -144

No files matched your search

@@ -185,7 +185,6 @@ class EventsTable
Hidden::make('filter_alarm_red'),
Hidden::make('filter_stars'),
Hidden::make('filter_notes'),
Hidden::make('filter_notification'),
Hidden::make('filter_periode'),
Select::make(name: 'country_id')
->hidden(fn () => auth()->user()->sport_id == 5)
@@ -447,24 +446,24 @@ class EventsTable
if ($data['country_id'] ?? null) {
$countries = Country::whereIn('id', $data['country_id'])->pluck('name')->toArray();
if (count($countries) > 1) {
$indicators[] = Indicator::make('Countries: '.implode(', ', $countries))->removeField('country_id')->color('info');
$indicators[] = Indicator::make('Countries: '.implode(', ', $countries))->removeField('country_id')->color('warning');
} else {
$indicators[] = Indicator::make('Country: '.$countries[0])->removeField('country_id')->color('info');
$indicators[] = Indicator::make('Country: '.$countries[0])->removeField('country_id')->color('warning');
}
}
if ($data['group_id'] ?? null) {
$group_ids = Group::whereIn('id', $data['group_id'])->pluck('name')->toArray();
if (count($group_ids) > 1) {
$indicators[] = Indicator::make('Tournament: '.implode(', ', $group_ids))->removeField('group_id')->color('info');
$indicators[] = Indicator::make('Tournament: '.implode(', ', $group_ids))->removeField('group_id')->color('warning');
} else {
$indicators[] = Indicator::make('Tournaments: '.$group_ids[0])->removeField('group_id')->color('info');
$indicators[] = Indicator::make('Tournaments: '.$group_ids[0])->removeField('group_id')->color('warning');
}
}
if ($data['client_group_list_id'] ?? null) {
$client_group_list_name = ClientGroupList::where('id', $data['client_group_list_id'])->value('name');
$indicators[] = Indicator::make('Custom Group: '.$client_group_list_name)->removeField('client_group_list_id')->color('info');
$indicators[] = Indicator::make('Custom Group: '.$client_group_list_name)->removeField('client_group_list_id')->color('warning');
}
if ($data['filter_stars'] ?? null) {
@@ -472,14 +471,14 @@ class EventsTable
}
if (in_array('odds_tq', self::$bettype_settings)) {
$indicators[] = Indicator::make('To Qualify')->color('away')->removable(false);
$indicators[] = Indicator::make('To Qualify')->color('info')->removable(false);
}
if (auth()->user()->all_only_none == 1) {
$indicators[] = Indicator::make('Only events with '.auth()->user()->bookmaker->name)->color('away')->removable(false);
$indicators[] = Indicator::make('With '.auth()->user()->bookmaker->name)->color('info')->removable(false);
}
if (auth()->user()->all_only_none == 2) {
$indicators[] = Indicator::make('Only events without '.auth()->user()->bookmaker->name)->color('away')->removable(false);
$indicators[] = Indicator::make('Without '.auth()->user()->bookmaker->name)->color('info')->removable(false);
}
if (auth()->user()->partner_show == 1) {
@@ -490,17 +489,13 @@ class EventsTable
}
if (auth()->user()->bookmaker_partner_differences == 1) {
$indicators[] = Indicator::make('Different events '.auth()->user()->bookmaker->name.' vs '.auth()->user()->partnerbookmaker->name)->color('home')->removable(false);
$indicators[] = Indicator::make('Different events '.auth()->user()->bookmaker->name.' vs '.auth()->user()->partnerbookmaker->name)->color('info')->removable(false);
}
if ($data['filter_notes'] ?? null) {
$indicators[] = Indicator::make('Notes')->removeField('filter_notes')->color('info');
}
if ($data['filter_notification'] ?? null) {
$indicators[] = Indicator::make('Notifications')->removeField('filter_notification')->color('home');
}
if ($data['filter_alarm_green'] ?? null) {
$title = OddsTable::where('name', $data['filter_alarm_green'])->value('title');
$indicators[] = Indicator::make('Alarms: '.$title)->removeField('filter_alarm_green')->color('success');
@@ -526,32 +521,32 @@ class EventsTable
$text .= ' To '.Carbon::parse($span['end'])->toFormattedDateString();
}
if ($text) {
$indicators[] = Indicator::make($text)->removeField('starttime_period.start')->color('info');
$indicators[] = Indicator::make($text)->removeField('starttime_period.start')->color('warning');
}
}
if ($data['competition_group_id'] ?? null) {
$competition_groups = CompetitionGroup::whereIn('id', $data['competition_group_id'])->pluck('name')->toArray();
if (count($competition_groups) > 1) {
$indicators[] = Indicator::make('Leagues: '.implode(', ', $competition_groups))->removeField('competition_group_id')->color('info');
$indicators[] = Indicator::make('Leagues: '.implode(', ', $competition_groups))->removeField('competition_group_id')->color('warning');
} else {
$indicators[] = Indicator::make('League: '.$competition_groups[0])->removeField('competition_group_id')->color('info')->color('info');
$indicators[] = Indicator::make('League: '.$competition_groups[0])->removeField('competition_group_id')->color('info')->color('warning');
}
}
if ($data['favorit_threshold'] ?? null) {
switch (auth()->user()->sport_id) {
case 1:
$indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info');
$indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('warning');
break;
case 2:
$indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info');
$indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('warning');
break;
case 3:
$indicators[] = Indicator::make('HC Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info');
$indicators[] = Indicator::make('HC Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('warning');
break;
case 5:
$indicators[] = Indicator::make('ML Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info');
$indicators[] = Indicator::make('ML Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('warning');
break;
}