sql fixes

This commit is contained in:
salam committed 2026-07-09 17:52:10 +02:00
1 parent feb9070e5a
commit 1905440212
2 files changed
+88 -72

No files matched your search

+5 -5
View File
@@ -113,7 +113,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
->preload()
->live()
->options(function (Get $get) {
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id)->groupBy('country_id')->orderBy('country');
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id);
$timeframe = $get('starttime_period') ?? [];
if ($timeframe['start'] || $timeframe['end']) {
@@ -148,7 +148,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
->preload()
->live()
->options(function (Get $get) {
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id)->groupBy('group_cc');
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id);
$timeframe = $get('starttime_period') ?? [];
@@ -190,11 +190,11 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
->preload()
->options(function (Get $get) {
if ($get('country_id')) {
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id)->where('country_id', $get('country_id'))->groupBy('group_id');
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id)->where('country_id', $get('country_id'));
} elseif ($get('group_cc')) {
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id)->where('group_cc', $get('group_cc'))->groupBy('group_id');
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id)->where('group_cc', $get('group_cc'));
} else {
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id)->groupBy('group_id');
$query = Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id);
}
$timeframe = $get('starttime_period') ?? [];