mapper provider wip
This commit is contained in:
1 parent
b3318b1c03
commit
a487fe0838
11 files changed
+161
-92
No files matched your search
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions;
|
||||
|
||||
use App\Models\Event;
|
||||
|
||||
class MapperEvents
|
||||
{
|
||||
public static function load()
|
||||
{
|
||||
switch (auth()->user()->provider_id) {
|
||||
case 2:
|
||||
// BETSAPI
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('betsapi_id', 0);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
// Magloo Kenia
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('magnig_id', 0);
|
||||
break;
|
||||
|
||||
case 24:
|
||||
// Magloo Nigeria
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('magken_id', 0);
|
||||
break;
|
||||
|
||||
case 26:
|
||||
// Logifuture Nigeria
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('lognig_id', 0);
|
||||
break;
|
||||
|
||||
case 27:
|
||||
// Magloo Colombia
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('logcol_id', 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('betradar_id', 0);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions;
|
||||
|
||||
use App\Models\Mapper;
|
||||
|
||||
class MapperProvider
|
||||
{
|
||||
public static function load()
|
||||
{
|
||||
|
||||
return Mapper::query()->where('sport_id', auth()->user()->sport_id)->where('provider_id', auth()->user()->provider_id);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Actions\MapperEvents;
|
||||
use App\Filament\Tables\Columns\MapperLeftColumn;
|
||||
use App\Models\CompetitionGroup;
|
||||
use App\Models\Country;
|
||||
@@ -37,7 +38,7 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->query(Event::query()->where('betradar_id', 0))
|
||||
->query(MapperEvents::load())
|
||||
->columns([
|
||||
MapperLeftColumn::make('left')->label(''),
|
||||
])
|
||||
@@ -112,7 +113,8 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
||||
Action::make('reload_data_left')
|
||||
->hiddenLabel()
|
||||
->color('gray')
|
||||
->icon('phosphor-x')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
// ->icon('phosphor-x')
|
||||
->action(function (Component $livewire) {
|
||||
$livewire->resetTableFiltersForm(); // Clears all filters
|
||||
$livewire->tableSearch = ''; // Clears the main search bar
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Actions\MapperProvider;
|
||||
use App\Filament\Tables\Columns\MapperRightColumn;
|
||||
use App\Models\Event;
|
||||
use App\Models\Mapper;
|
||||
@@ -33,7 +34,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->query(Mapper::query())
|
||||
->query(MapperProvider::load())
|
||||
->columns([
|
||||
MapperRightColumn::make('right')->label(''),
|
||||
])->searchable(['home', 'away'])
|
||||
@@ -86,7 +87,8 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
||||
Action::make('reload_data')
|
||||
->hiddenLabel()
|
||||
->color('gray')
|
||||
->icon('phosphor-x')
|
||||
->icon('heroicon-o-arrow-path')
|
||||
// ->icon('phosphor-x')
|
||||
->action(function (Component $livewire) {
|
||||
$livewire->resetTableFiltersForm(); // Clears all filters
|
||||
$livewire->tableSearch = ''; // Clears the main search bar
|
||||
|
||||
@@ -54,11 +54,15 @@ class TopMenuItems extends Component
|
||||
|
||||
public function swop($client_id)
|
||||
{
|
||||
$providers = Client::where('id', $client_id)->pluck('provider')->first();
|
||||
|
||||
$provider_id = array_shift($providers);
|
||||
|
||||
$bookmakers = Client::where('id', $client_id)->pluck('bookmaker')->first();
|
||||
|
||||
$bookmaker_id = array_shift($bookmakers);
|
||||
|
||||
User::where('id', auth()->user()->id)->update(['bookmaker_mapper_id' => $bookmaker_id, 'bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]);
|
||||
User::where('id', auth()->user()->id)->update(['provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]);
|
||||
|
||||
$this->js('window.location.reload()');
|
||||
}
|
||||
@@ -70,9 +74,9 @@ class TopMenuItems extends Component
|
||||
$this->js('window.location.reload()');
|
||||
}
|
||||
|
||||
public function swopMapper($bookmaker_id)
|
||||
public function swopProvider($provider_id)
|
||||
{
|
||||
User::where('id', auth()->user()->id)->update(['bookmaker_mapper_id' => $bookmaker_id]);
|
||||
User::where('id', auth()->user()->id)->update(['provider_id' => $provider_id]);
|
||||
|
||||
$this->dispatch('reload_data');
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class User extends Authenticatable implements FilamentUser, HasAppAuthentication
|
||||
'client_id',
|
||||
'sport_id',
|
||||
'bookmaker_id',
|
||||
'bookmaker_mapper_id',
|
||||
'provider_id',
|
||||
];
|
||||
|
||||
protected static function newFactory(): Factory
|
||||
|
||||
Generated
+54
-54
@@ -6369,16 +6369,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v7.4.1",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e"
|
||||
"reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e",
|
||||
"reference": "6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/732a9ca6cd9dfd940c639062d5edbde2f6727fb6",
|
||||
"reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6443,7 +6443,7 @@
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v7.4.1"
|
||||
"source": "https://github.com/symfony/console/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6463,7 +6463,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-05T15:23:39+00:00"
|
||||
"time": "2025-12-23T14:50:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
@@ -6846,16 +6846,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "340b9ed7320570f319028a2cbec46d40535e94bd"
|
||||
"reference": "fffe05569336549b20a1be64250b40516d6e8d06"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/340b9ed7320570f319028a2cbec46d40535e94bd",
|
||||
"reference": "340b9ed7320570f319028a2cbec46d40535e94bd",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/fffe05569336549b20a1be64250b40516d6e8d06",
|
||||
"reference": "fffe05569336549b20a1be64250b40516d6e8d06",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6890,7 +6890,7 @@
|
||||
"description": "Finds files and directories via an intuitive fluent interface",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/finder/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/finder/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6910,7 +6910,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-05T05:42:40+00:00"
|
||||
"time": "2025-12-23T14:50:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/html-sanitizer",
|
||||
@@ -6988,16 +6988,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v7.4.1",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "bd1af1e425811d6f077db240c3a588bdb405cd27"
|
||||
"reference": "a70c745d4cea48dbd609f4075e5f5cbce453bd52"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/bd1af1e425811d6f077db240c3a588bdb405cd27",
|
||||
"reference": "bd1af1e425811d6f077db240c3a588bdb405cd27",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/a70c745d4cea48dbd609f4075e5f5cbce453bd52",
|
||||
"reference": "a70c745d4cea48dbd609f4075e5f5cbce453bd52",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7046,7 +7046,7 @@
|
||||
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v7.4.1"
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7066,20 +7066,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-07T11:13:10+00:00"
|
||||
"time": "2025-12-23T14:23:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v7.4.2",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-kernel.git",
|
||||
"reference": "f6e6f0a5fa8763f75a504b930163785fb6dd055f"
|
||||
"reference": "885211d4bed3f857b8c964011923528a55702aa5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f6e6f0a5fa8763f75a504b930163785fb6dd055f",
|
||||
"reference": "f6e6f0a5fa8763f75a504b930163785fb6dd055f",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/885211d4bed3f857b8c964011923528a55702aa5",
|
||||
"reference": "885211d4bed3f857b8c964011923528a55702aa5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7165,7 +7165,7 @@
|
||||
"description": "Provides a structured process for converting a Request into a Response",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v7.4.2"
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7185,20 +7185,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-08T07:43:37+00:00"
|
||||
"time": "2025-12-31T08:43:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mailer",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/mailer.git",
|
||||
"reference": "a3d9eea8cfa467ece41f0f54ba28185d74bd53fd"
|
||||
"reference": "e472d35e230108231ccb7f51eb6b2100cac02ee4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/mailer/zipball/a3d9eea8cfa467ece41f0f54ba28185d74bd53fd",
|
||||
"reference": "a3d9eea8cfa467ece41f0f54ba28185d74bd53fd",
|
||||
"url": "https://api.github.com/repos/symfony/mailer/zipball/e472d35e230108231ccb7f51eb6b2100cac02ee4",
|
||||
"reference": "e472d35e230108231ccb7f51eb6b2100cac02ee4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7249,7 +7249,7 @@
|
||||
"description": "Helps sending emails",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/mailer/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/mailer/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7269,7 +7269,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-21T15:26:00+00:00"
|
||||
"time": "2025-12-16T08:02:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mime",
|
||||
@@ -8191,16 +8191,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8"
|
||||
"reference": "2f8e1a6cdf590ca63715da4d3a7a3327404a523f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/7ca8dc2d0dcf4882658313aba8be5d9fd01026c8",
|
||||
"reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/2f8e1a6cdf590ca63715da4d3a7a3327404a523f",
|
||||
"reference": "2f8e1a6cdf590ca63715da4d3a7a3327404a523f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -8232,7 +8232,7 @@
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/process/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/process/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -8252,20 +8252,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-10-16T11:21:06+00:00"
|
||||
"time": "2025-12-19T10:00:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/routing.git",
|
||||
"reference": "4720254cb2644a0b876233d258a32bf017330db7"
|
||||
"reference": "5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/routing/zipball/4720254cb2644a0b876233d258a32bf017330db7",
|
||||
"reference": "4720254cb2644a0b876233d258a32bf017330db7",
|
||||
"url": "https://api.github.com/repos/symfony/routing/zipball/5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090",
|
||||
"reference": "5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -8317,7 +8317,7 @@
|
||||
"url"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/routing/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/routing/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -8337,7 +8337,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-27T13:27:24+00:00"
|
||||
"time": "2025-12-19T10:00:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
@@ -8519,16 +8519,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "2d01ca0da3f092f91eeedb46f24aa30d2fca8f68"
|
||||
"reference": "7ef27c65d78886f7599fdd5c93d12c9243ecf44d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/2d01ca0da3f092f91eeedb46f24aa30d2fca8f68",
|
||||
"reference": "2d01ca0da3f092f91eeedb46f24aa30d2fca8f68",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/7ef27c65d78886f7599fdd5c93d12c9243ecf44d",
|
||||
"reference": "7ef27c65d78886f7599fdd5c93d12c9243ecf44d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -8595,7 +8595,7 @@
|
||||
"description": "Provides tools to internationalize your application",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/translation/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -8615,7 +8615,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-27T13:27:24+00:00"
|
||||
"time": "2025-12-29T09:31:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
@@ -8779,16 +8779,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "41fd6c4ae28c38b294b42af6db61446594a0dece"
|
||||
"reference": "7e99bebcb3f90d8721890f2963463280848cba92"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/41fd6c4ae28c38b294b42af6db61446594a0dece",
|
||||
"reference": "41fd6c4ae28c38b294b42af6db61446594a0dece",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/7e99bebcb3f90d8721890f2963463280848cba92",
|
||||
"reference": "7e99bebcb3f90d8721890f2963463280848cba92",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -8842,7 +8842,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -8862,7 +8862,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-10-27T20:36:44+00:00"
|
||||
"time": "2025-12-18T07:04:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "technikermathe/blade-lucide-icons",
|
||||
|
||||
@@ -20,7 +20,7 @@ return new class extends Migration
|
||||
$table->integer('client_id');
|
||||
$table->integer('sport_id')->default(1);
|
||||
$table->integer('bookmaker_id')->nullable();
|
||||
$table->integer('bookmaker_mapper_id')->nullable();
|
||||
$table->integer('provider_id')->nullable();
|
||||
|
||||
$table->text('app_authentication_secret')->nullable();
|
||||
$table->text('app_authentication_recovery_codes')->nullable();
|
||||
|
||||
@@ -19,6 +19,10 @@ return new class extends Migration
|
||||
$table->integer('bet365_id')->default(0)->nullable()->index();
|
||||
$table->integer('_1xbet_id')->default(0)->nullable()->index();
|
||||
$table->integer('bwin_id')->default(0)->nullable()->index();
|
||||
$table->integer('magnig_id')->default(0)->nullable()->index();
|
||||
$table->integer('magken_id')->default(0)->nullable()->index();
|
||||
$table->integer('lognig_id')->default(0)->nullable()->index();
|
||||
$table->integer('logcol_id')->default(0)->nullable()->index();
|
||||
$table->dateTime('starttime')->nullable();
|
||||
$table->integer('sport_id')->index();
|
||||
$table->integer('country_id')->default(0)->nullable()->index();
|
||||
|
||||
@@ -28,7 +28,7 @@ class RolesAndPermissionsSeeder extends Seeder
|
||||
'client_id' => 1,
|
||||
'sport_id' => 1,
|
||||
'bookmaker_id' => 20,
|
||||
'bookmaker_mapper_id' => 20,
|
||||
'provider_id' => 20,
|
||||
]);
|
||||
$user->assignRole('super_admin');
|
||||
$user->assignRole('konto_switch');
|
||||
@@ -43,7 +43,7 @@ class RolesAndPermissionsSeeder extends Seeder
|
||||
'client_id' => 1,
|
||||
'sport_id' => 1,
|
||||
'bookmaker_id' => 20,
|
||||
'bookmaker_mapper_id' => 20,
|
||||
'provider_id' => 20,
|
||||
]);
|
||||
$user->assignRole('super_admin');
|
||||
$user->assignRole('konto_switch');
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<x-slot name="trigger">
|
||||
<x-filament::button outlined color="gray">
|
||||
|
||||
@switch(auth()->user()->bookmaker_mapper_id)
|
||||
@switch(auth()->user()->bookmaker_id)
|
||||
@case(26)
|
||||
<x-bkm-logifuture-nigeria class="h-5" />
|
||||
@break
|
||||
@@ -31,28 +31,28 @@
|
||||
<x-filament::dropdown.list>
|
||||
|
||||
@if (in_array(auth()->user()->bookmaker_id, [26, 27]))
|
||||
@if (auth()->user()->bookmaker_mapper_id != 26)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(26)">
|
||||
@if (auth()->user()->bookmaker_id != 26)
|
||||
<x-filament::dropdown.list.item wire:click="swopBookmaker(26)">
|
||||
<x-bkm-logifuture-nigeria class="h-5 mx-auto" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
|
||||
@if (auth()->user()->bookmaker_mapper_id != 27)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(27)">
|
||||
@if (auth()->user()->bookmaker_id != 27)
|
||||
<x-filament::dropdown.list.item wire:click="swopBookmaker(27)">
|
||||
<x-bkm-logifuture-colombia class="h-5 mx-auto" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (in_array(auth()->user()->bookmaker_id, [20, 24]))
|
||||
@if (auth()->user()->bookmaker_mapper_id != 20)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(20)">
|
||||
@if (auth()->user()->bookmaker_id != 20)
|
||||
<x-filament::dropdown.list.item wire:click="swopBookmaker(20)">
|
||||
<x-bkm-magloo-nigeria class="h-5 mx-auto" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
|
||||
@if (auth()->user()->bookmaker_mapper_id != 24)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(24)">
|
||||
@if (auth()->user()->bookmaker_id != 24)
|
||||
<x-filament::dropdown.list.item wire:click="swopBookmaker(24)">
|
||||
<x-bkm-magloo-kenia class="h-5 mx-auto" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
@@ -85,26 +85,26 @@
|
||||
<div class="flex justify-between items-center w-5xl">
|
||||
<div>Event Mapper</div>
|
||||
@php
|
||||
if (!auth()->user()->bookmaker_mapper_id) {
|
||||
auth()->user()->bookmaker_mapper_id = auth()->user()->bookmaker_id;
|
||||
if (!auth()->user()->provider_id) {
|
||||
auth()->user()->provider_id = 2;
|
||||
}
|
||||
@endphp
|
||||
<x-filament::dropdown>
|
||||
<x-slot name="trigger">
|
||||
@switch(auth()->user()->bookmaker_mapper_id)
|
||||
@case(26)
|
||||
@switch(auth()->user()->provider_id)
|
||||
@case(5)
|
||||
<x-bkm-logifuture-nigeria class="h-5" />
|
||||
@break
|
||||
|
||||
@case(27)
|
||||
@case(6)
|
||||
<x-bkm-logifuture-colombia class="h-5" />
|
||||
@break
|
||||
|
||||
@case(20)
|
||||
@case(4)
|
||||
<x-bkm-magloo-nigeria class="h-5" />
|
||||
@break
|
||||
|
||||
@case(24)
|
||||
@case(3)
|
||||
<x-bkm-magloo-kenia class="h-5" />
|
||||
@break
|
||||
|
||||
@@ -114,39 +114,39 @@
|
||||
@endswitch
|
||||
</x-slot>
|
||||
|
||||
<x-filament::dropdown.list>
|
||||
<x-filament::dropdown.list @click="toggle">
|
||||
|
||||
@if (in_array(auth()->user()->bookmaker_id, [26, 27]))
|
||||
@if (auth()->user()->bookmaker_mapper_id != 26)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(26)">
|
||||
@if (auth()->user()->provider_id != 5)
|
||||
<x-filament::dropdown.list.item wire:click="swopProvider(5)">
|
||||
<x-bkm-logifuture-nigeria class="h-5 mx-auto" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
|
||||
@if (auth()->user()->bookmaker_mapper_id != 27)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(27)">
|
||||
@if (auth()->user()->provider_id != 6)
|
||||
<x-filament::dropdown.list.item wire:click="swopProvider(6)">
|
||||
<x-bkm-logifuture-colombia class="h-5 mx-auto" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (in_array(auth()->user()->bookmaker_id, [20, 24]))
|
||||
@if (auth()->user()->bookmaker_mapper_id != 20)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(20)">
|
||||
@if (auth()->user()->provider_id != 4)
|
||||
<x-filament::dropdown.list.item wire:click="swopProvider(4)">
|
||||
<x-bkm-magloo-nigeria class="h-5 mx-auto" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
|
||||
@if (auth()->user()->bookmaker_mapper_id != 24)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(24)">
|
||||
@if (auth()->user()->provider_id != 3)
|
||||
<x-filament::dropdown.list.item wire:click="swopProvider(3)">
|
||||
<x-bkm-magloo-kenia class="h-5 mx-auto" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
@if (auth()->user()->hasRole('mapper_source_betsapi') && auth()->user()->bookmaker_mapper_id != 2)
|
||||
<x-filament::dropdown.list.item wire:click="swopMapper(2)">
|
||||
@if (auth()->user()->hasRole('mapper_source_betsapi') && auth()->user()->provider_id != 2)
|
||||
<x-filament::dropdown.list.item wire:click="swopProvider(2)">
|
||||
<x-bkm-bet365 class="h-5" />
|
||||
</x-filament::dropdown.list.item>
|
||||
@endif
|
||||
|
||||
Reference in new issue
Block a user