wip
This commit is contained in:
1 parent
458274b040
commit
6af8f0e860
1 file changed
+8
-8
@@ -467,24 +467,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('warning');
|
||||
$indicators[] = Indicator::make(implode(', ', $countries))->removeField('country_id')->color('info');
|
||||
} else {
|
||||
$indicators[] = Indicator::make('Country: '.$countries[0])->removeField('country_id')->color('warning');
|
||||
$indicators[] = Indicator::make($countries[0])->removeField('country_id')->color('info');
|
||||
}
|
||||
}
|
||||
|
||||
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('warning');
|
||||
$indicators[] = Indicator::make(implode(', ', $group_ids))->removeField('group_id')->color('info');
|
||||
} else {
|
||||
$indicators[] = Indicator::make('Tournaments: '.$group_ids[0])->removeField('group_id')->color('warning');
|
||||
$indicators[] = Indicator::make($group_ids[0])->removeField('group_id')->color('info');
|
||||
}
|
||||
}
|
||||
|
||||
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('warning');
|
||||
$indicators[] = Indicator::make('Custom Group: '.$client_group_list_name)->removeField('client_group_list_id')->color('info');
|
||||
}
|
||||
|
||||
if ($data['filter_stars'] ?? null) {
|
||||
@@ -524,16 +524,16 @@ class EventsTable
|
||||
$text .= ' - '.Carbon::parse($span['end'])->format('d. M.');
|
||||
}
|
||||
if ($text) {
|
||||
$indicators[] = Indicator::make($text)->removeField('starttime_period.start')->color('warning');
|
||||
$indicators[] = Indicator::make($text)->removeField('starttime_period.start')->color('info');
|
||||
}
|
||||
}
|
||||
|
||||
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('warning');
|
||||
$indicators[] = Indicator::make(implode(', ', $competition_groups))->removeField('competition_group_id')->color('info');
|
||||
} else {
|
||||
$indicators[] = Indicator::make('League: '.$competition_groups[0])->removeField('competition_group_id')->color('info')->color('warning');
|
||||
$indicators[] = Indicator::make($competition_groups[0])->removeField('competition_group_id')->color('info')->color('info');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user