sql fixes
This commit is contained in:
1 parent
feb9070e5a
commit
1905440212
2 files changed
+88
-72
No files matched your search
@@ -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') ?? [];
|
||||
|
||||
Reference in new issue
Block a user