multiline wip
This commit is contained in:
1 parent
3fb481afd0
commit
79bb8a0226
16 files changed
+143
-222
No files matched your search
@@ -2,21 +2,19 @@
|
|||||||
|
|
||||||
namespace App\Actions;
|
namespace App\Actions;
|
||||||
|
|
||||||
use App\Models\Multiline;
|
use App\Models\MultilineClient;
|
||||||
|
|
||||||
class MultilineSlots
|
class MultilineSlots
|
||||||
{
|
{
|
||||||
public static function addSlots(&$data, $bettype_id, $matchpart_id)
|
public static function addSlots(&$data)
|
||||||
{
|
{
|
||||||
$slots = Multiline::where('sport_id', auth()->user()->sport_id)
|
$slots = MultilineClient::select('bookmaker_id')
|
||||||
->where('client_id', auth()->user()->client_id)
|
->where('multiline_setting_id', auth()->user()->multiline_setting_id)
|
||||||
// ->where('bettype_id', $bettype_id)
|
|
||||||
// ->where('matchpart_id', $matchpart_id)
|
|
||||||
->with('bookmaker')
|
|
||||||
->orderBy('sort')
|
->orderBy('sort')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$multilines = [];
|
$multilines = [];
|
||||||
|
|
||||||
foreach ($slots as $id => $slot) {
|
foreach ($slots as $id => $slot) {
|
||||||
$open = true;
|
$open = true;
|
||||||
foreach ($data as $item) {
|
foreach ($data as $item) {
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ class EventResource extends Resource
|
|||||||
|
|
||||||
public static function getEloquentQuery(): Builder
|
public static function getEloquentQuery(): Builder
|
||||||
{
|
{
|
||||||
|
|
||||||
return parent::getEloquentQuery()
|
return parent::getEloquentQuery()
|
||||||
->where('starttime', '>', Carbon::now())
|
->where('starttime', '>', Carbon::now())
|
||||||
->where('sport_id', auth()->user()->sport_id);
|
->where('sport_id', auth()->user()->sport_id);
|
||||||
|
|||||||
@@ -3,36 +3,21 @@
|
|||||||
namespace App\Filament\Resources\Events\Tables;
|
namespace App\Filament\Resources\Events\Tables;
|
||||||
|
|
||||||
use App\Filament\Tables\Columns\Odds3Way;
|
use App\Filament\Tables\Columns\Odds3Way;
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\CompetitionGroup;
|
|
||||||
use App\Models\Sport;
|
|
||||||
use App\Models\User;
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Filament\Actions\BulkActionGroup;
|
|
||||||
use Filament\Actions\DeleteAction;
|
use Filament\Actions\DeleteAction;
|
||||||
use Filament\Actions\DeleteBulkAction;
|
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
use Filament\Forms\Components\Select;
|
|
||||||
use Filament\Schemas\Components\Utilities\Get;
|
|
||||||
use Filament\Support\Enums\FontWeight;
|
use Filament\Support\Enums\FontWeight;
|
||||||
use Filament\Support\Enums\IconSize;
|
use Filament\Support\Enums\IconSize;
|
||||||
use Filament\Tables\Columns\IconColumn;
|
use Filament\Tables\Columns\IconColumn;
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
use Filament\Tables\Enums\FiltersLayout;
|
|
||||||
use Filament\Tables\Filters\Filter;
|
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
|
||||||
|
|
||||||
class EventsTable
|
class EventsTable
|
||||||
{
|
{
|
||||||
protected $listeners = [
|
|
||||||
'bettypeswitch' => '$refresh',
|
|
||||||
];
|
|
||||||
|
|
||||||
public static function configure(Table $table): Table
|
public static function configure(Table $table): Table
|
||||||
{
|
{
|
||||||
return $table
|
return $table
|
||||||
// ->poll('10s')
|
->poll('10s')
|
||||||
->striped()
|
->striped()
|
||||||
->columns([
|
->columns([
|
||||||
IconColumn::make('sport.icon')
|
IconColumn::make('sport.icon')
|
||||||
@@ -56,56 +41,14 @@ class EventsTable
|
|||||||
TextColumn::make('home.name')->alignRight()->searchable(),
|
TextColumn::make('home.name')->alignRight()->searchable(),
|
||||||
TextColumn::make('away.name')->searchable(),
|
TextColumn::make('away.name')->searchable(),
|
||||||
|
|
||||||
Odds3Way::make('odds_3way.bookmaker')->label('1X2'),
|
Odds3Way::make('odds_3way.bookmaker')->label('Market')->visible(auth()->user()->multiline_setting_id == 1),
|
||||||
])
|
])
|
||||||
->defaultSort('starttime', 'ASC')
|
->defaultSort('starttime', 'ASC')
|
||||||
->deferFilters(false)
|
->deferFilters(false)
|
||||||
->filters([
|
|
||||||
Filter::make('event')
|
|
||||||
->form([
|
|
||||||
Select::make('sport_id')
|
|
||||||
->label('Sport')
|
|
||||||
->default(1)
|
|
||||||
->options(function () {
|
|
||||||
$sports = Client::where('id', auth()->user()->client_id)->pluck('sport')->first();
|
|
||||||
|
|
||||||
return Sport::query()->whereIn('id', $sports)->pluck('name', 'id');
|
|
||||||
})
|
|
||||||
->afterStateUpdated(function ($state) {
|
|
||||||
|
|
||||||
User::where('id', auth()->user()->id)->update(['sport_id' => $state]);
|
|
||||||
}),
|
|
||||||
Select::make('competition_group_id')
|
|
||||||
->label('League')
|
|
||||||
->default(1)
|
|
||||||
->options(function (Get $get) {
|
|
||||||
return CompetitionGroup::where('sport_id', $get('sport_id'))->pluck('name', 'id');
|
|
||||||
})
|
|
||||||
->live(),
|
|
||||||
])
|
|
||||||
->query(function (Builder $query, array $data): Builder {
|
|
||||||
|
|
||||||
return $query
|
|
||||||
->when(
|
|
||||||
$data['sport_id'],
|
|
||||||
fn (Builder $query, $sport_id) => $query->where('sport_id', $sport_id)
|
|
||||||
)->when(
|
|
||||||
$data['competition_group_id'],
|
|
||||||
fn (Builder $query, $competition_group_id) => $query->where('competition_group_id', $competition_group_id)
|
|
||||||
);
|
|
||||||
})
|
|
||||||
->columns(3)->columnSpan(3),
|
|
||||||
], layout: FiltersLayout::AboveContent)
|
|
||||||
->hiddenFilterIndicators(false)
|
|
||||||
->persistFiltersInSession()
|
->persistFiltersInSession()
|
||||||
->recordActions([
|
->recordActions([
|
||||||
// EditAction::make(),
|
// EditAction::make(),
|
||||||
DeleteAction::make()->iconButton(),
|
// DeleteAction::make()->iconButton(),
|
||||||
])
|
|
||||||
->toolbarActions([
|
|
||||||
BulkActionGroup::make([
|
|
||||||
DeleteBulkAction::make(),
|
|
||||||
]),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ class MultilineClientsTable
|
|||||||
->defaultSort('sort')
|
->defaultSort('sort')
|
||||||
->deferFilters(false)
|
->deferFilters(false)
|
||||||
->filters([
|
->filters([
|
||||||
Filter::make('multilineclient')
|
Filter::make('multiline')
|
||||||
->form([
|
->form([
|
||||||
Select::make('sport_id')
|
Select::make('sport_id')
|
||||||
->label('Sport')
|
->label('Sport')
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ class Odds3Way extends Column
|
|||||||
{
|
{
|
||||||
protected string $view = 'filament.tables.columns.odds3-way';
|
protected string $view = 'filament.tables.columns.odds3-way';
|
||||||
|
|
||||||
protected ?array $multiline;
|
protected ?array $slots = [];
|
||||||
|
|
||||||
public function loadMultiline(&$data)
|
public function loadSlots(&$data)
|
||||||
{
|
{
|
||||||
$this->multiline = MultilineSlots::addSlots($data, 1, 1);
|
$this->slots = MultilineSlots::addSlots($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMultiline(): ?array
|
public function getSlots(): ?array
|
||||||
{
|
{
|
||||||
return $this->multiline;
|
return $this->slots;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,26 +2,40 @@
|
|||||||
|
|
||||||
namespace App\Livewire;
|
namespace App\Livewire;
|
||||||
|
|
||||||
|
use App\Models\Client;
|
||||||
use App\Models\MultilineSetting;
|
use App\Models\MultilineSetting;
|
||||||
use App\Models\MultilineUser;
|
use App\Models\Sport;
|
||||||
|
use App\Models\User;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
class MonitorBettypeSwitch extends Component
|
class MonitorBettypeSwitch extends Component
|
||||||
{
|
{
|
||||||
public $multilines = [];
|
public $multilines = [];
|
||||||
|
|
||||||
|
public $sports = [];
|
||||||
|
|
||||||
|
public $sport_id = 0;
|
||||||
|
|
||||||
|
public $sporticon = '';
|
||||||
|
|
||||||
|
public $iconcolor = '';
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
$settings = MultilineSetting::where('sport_id', auth()->user()->sport_id)->get();
|
$cps = Client::where('id', auth()->user()->client_id)->pluck('sport')->first();
|
||||||
|
|
||||||
$multiline_setting_id = MultilineUser::where('user_id', auth()->user()->id)->where('sport_id', auth()->user()->sport_id)->pluck('multiline_setting_id')->first();
|
$this->sports = Sport::whereIn('id', $cps)->pluck('name', 'id');
|
||||||
|
|
||||||
if (! $multiline_setting_id) {
|
$this->sporticon = Sport::where('id', auth()->user()->sport_id)->pluck('icon')->first();
|
||||||
$multiline_setting_id = MultilineSetting::where('sport_id', auth()->user()->sport_id)->pluck('id')->first();
|
|
||||||
}
|
$this->iconcolor = Sport::where('id', auth()->user()->sport_id)->pluck('color')->first();
|
||||||
|
|
||||||
|
$this->sport_id = auth()->user()->sport_id;
|
||||||
|
|
||||||
$this->multilines = [];
|
$this->multilines = [];
|
||||||
|
|
||||||
|
$settings = MultilineSetting::where('sport_id', auth()->user()->sport_id)->get();
|
||||||
|
|
||||||
foreach ($settings as $setting) {
|
foreach ($settings as $setting) {
|
||||||
|
|
||||||
$this->multilines[] = [
|
$this->multilines[] = [
|
||||||
@@ -30,7 +44,7 @@ class MonitorBettypeSwitch extends Component
|
|||||||
'name' => $setting->name,
|
'name' => $setting->name,
|
||||||
'short' => $setting->short,
|
'short' => $setting->short,
|
||||||
'table' => $setting->table,
|
'table' => $setting->table,
|
||||||
'is_active' => $setting->id == $multiline_setting_id ? 1 : 0,
|
'is_active' => $setting->id == auth()->user()->multiline_setting_id ? 1 : 0,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,13 +54,16 @@ class MonitorBettypeSwitch extends Component
|
|||||||
return view('livewire.monitor-bettype-switch');
|
return view('livewire.monitor-bettype-switch');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function swop($multiline_setting_id)
|
public function swopBettype($multiline_setting_id)
|
||||||
{
|
{
|
||||||
|
User::where('id', auth()->user()->id)->update(['multiline_setting_id' => $multiline_setting_id]);
|
||||||
|
|
||||||
MultilineUser::updateOrCreate(
|
$this->js('window.location.reload()');
|
||||||
['user_id' => auth()->user()->id, 'sport_id' => auth()->user()->sport_id],
|
}
|
||||||
['multiline_setting_id' => $multiline_setting_id]
|
|
||||||
);
|
public function swopSport()
|
||||||
|
{
|
||||||
|
User::where('id', auth()->user()->id)->update(['sport_id' => $this->sport_id]);
|
||||||
|
|
||||||
$this->js('window.location.reload()');
|
$this->js('window.location.reload()');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class MultilineUser extends Model
|
|
||||||
{
|
|
||||||
protected $fillable = [
|
|
||||||
'user_id',
|
|
||||||
'sport_id',
|
|
||||||
'multiline_setting_id',
|
|
||||||
];
|
|
||||||
|
|
||||||
public function sport()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(Sport::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function multiline_setting()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(MultilineSetting::class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -31,6 +31,7 @@ class User extends Authenticatable implements FilamentUser, HasAppAuthentication
|
|||||||
'password',
|
'password',
|
||||||
'agb_akzeptiert',
|
'agb_akzeptiert',
|
||||||
'app_verified_at',
|
'app_verified_at',
|
||||||
|
'sport_id',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected static function newFactory(): Factory
|
protected static function newFactory(): Factory
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
'gray' => Color::Zinc,
|
'gray' => Color::Zinc,
|
||||||
'primary' => Color::Blue,
|
'primary' => Color::Blue,
|
||||||
'success' => Color::Green,
|
'success' => Color::Green,
|
||||||
'warning' => Color::Yellow,
|
'warning' => Color::Amber,
|
||||||
'info' => Color::Fuchsia,
|
'info' => Color::Fuchsia,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ return new class extends Migration
|
|||||||
$table->string('password');
|
$table->string('password');
|
||||||
$table->integer('client_id');
|
$table->integer('client_id');
|
||||||
$table->integer('sport_id')->default(1);
|
$table->integer('sport_id')->default(1);
|
||||||
|
$table->integer('multiline_setting_id')->nullable();
|
||||||
$table->boolean('super_admin')->default(false);
|
$table->boolean('super_admin')->default(false);
|
||||||
|
|
||||||
$table->text('app_authentication_secret')->nullable();
|
$table->text('app_authentication_secret')->nullable();
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ return new class extends Migration
|
|||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('code')->nullable();
|
$table->string('code')->nullable();
|
||||||
$table->string('icon')->nullable();
|
$table->string('icon')->nullable();
|
||||||
|
$table->string('color')->nullable();
|
||||||
$table->integer('bapi')->default(0);
|
$table->integer('bapi')->default(0);
|
||||||
$table->integer('bwin')->default(0);
|
$table->integer('bwin')->default(0);
|
||||||
$table->integer('b365')->default(0);
|
$table->integer('b365')->default(0);
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up(): void
|
|
||||||
{
|
|
||||||
Schema::create('multiline_users', function (Blueprint $table) {
|
|
||||||
$table->id();
|
|
||||||
$table->integer('user_id')->default(0);
|
|
||||||
$table->integer('sport_id')->default(1);
|
|
||||||
$table->integer('multiline_setting_id')->default(1);
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down(): void
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('multiline_users');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -9,83 +9,84 @@ class SportSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO `sports` (`name`, `code`, `icon`, `bapi`, `bwin`, `b365`, `logi`, `magl`, `is_active`, `created_at`, `updated_at`)
|
$sql = "INSERT INTO `sports` (`id`, `name`, `code`, `icon`, `color`, `bapi`, `bwin`, `b365`, `logi`, `magl`, `is_active`, `created_at`, `updated_at`)
|
||||||
VALUES
|
VALUES
|
||||||
('Soccer', 'so', 'icon-soccerball', '1', '4', '1', '1', '1', '1', NULL, NULL),
|
(1, 'Soccer', 'so', 'icon-soccerball', 'primary', 1, 4, 1, 1, 1, 1, NULL, NULL),
|
||||||
('Ice Hockey', 'ic', 'icon-icehockey', '17', '12', '17', '4', '19', '1', NULL, NULL),
|
(2, 'Ice Hockey', 'ic', 'icon-icehockey', 'black', 17, 12, 17, 4, 19, 1, NULL, NULL),
|
||||||
('Basketball', 'ba', 'icon-basketball', '18', '7', '18', '2', '2', '1', NULL, NULL),
|
(3, 'Basketball', 'ba', 'icon-basketball', 'warning', 18, 7, 18, 2, 2, 1, NULL, NULL),
|
||||||
('Rugby', 'rg', 'icon-rugby', '8', '32', '8', '12', '22', '0', NULL, NULL),
|
(4, 'Rugby', 'rg', 'icon-rugby', NULL, 8, 32, 8, 12, 22, 0, NULL, NULL),
|
||||||
('Tennis', 'te', 'icon-tennisball', '13', '5', '13', '5', '15', '1', NULL, NULL),
|
(5, 'Tennis', 'te', 'icon-tennisball', 'gray', 13, 5, 13, 5, 15, 1, NULL, NULL),
|
||||||
('American Football', 'af', 'icon-amercanfootball', '12', '11', '12', '70', '25', '0', NULL, NULL),
|
(6, 'American Football', 'af', 'icon-amercanfootball', NULL, 12, 11, 12, 70, 25, 0, NULL, NULL),
|
||||||
('Baseball', 'bs', 'icon-baseball', '16', '23', '16', '3', '3', '0', NULL, NULL),
|
(7, 'Baseball', 'bs', 'icon-baseball', NULL, 16, 23, 16, 3, 3, 0, NULL, NULL),
|
||||||
('Handball', 'ha', 'icon-handball', '78', '16', '78', '6', '20', '0', NULL, NULL),
|
(8, 'Handball', 'ha', 'icon-handball', NULL, 78, 16, 78, 6, 20, 0, NULL, NULL),
|
||||||
('Pesapallo', NULL, NULL, '0', '0', '0', '0', '7', '0', NULL, NULL),
|
(9, 'Pesapallo', NULL, NULL, NULL, 0, 0, 0, 0, 7, 0, NULL, NULL),
|
||||||
('Floorball', NULL, NULL, '0', '0', '90', '178', '35', '0', NULL, NULL),
|
(10, 'Floorball', NULL, NULL, NULL, 0, 0, 90, 178, 35, 0, NULL, NULL),
|
||||||
('Bandy', NULL, NULL, '0', '0', '0', '0', '28', '0', NULL, NULL),
|
(11, 'Bandy', NULL, NULL, NULL, 0, 0, 0, 0, 28, 0, NULL, NULL),
|
||||||
('Golf', NULL, NULL, '0', '13', '0', '0', '18', '0', NULL, NULL),
|
(12, 'Golf', NULL, NULL, NULL, 0, 13, 0, 0, 18, 0, NULL, NULL),
|
||||||
('Volleyball', 'vo', 'icon-volleyball', '91', '18', '91', '23', '6', '0', NULL, NULL),
|
(13, 'Volleyball', 'vo', 'icon-volleyball', NULL, 91, 18, 91, 23, 6, 0, NULL, NULL),
|
||||||
('Cricket', 'cr', 'icon-cricket', '3', '22', '3', '181', '23', '0', NULL, NULL),
|
(14, 'Cricket', 'cr', 'icon-cricket', NULL, 3, 22, 3, 181, 23, 0, NULL, NULL),
|
||||||
('Table Tennis', 'tt', 'icon-tabletennis', '92', '56', '92', '20', '8', '0', NULL, NULL),
|
(15, 'Table Tennis', 'tt', 'icon-tabletennis', NULL, 92, 56, 92, 20, 8, 0, NULL, NULL),
|
||||||
('Snooker', 'sn', 'icon-snooker', '14', '33', '14', '19', '24', '0', NULL, NULL),
|
(16, 'Snooker', 'sn', 'icon-snooker', NULL, 14, 33, 14, 19, 24, 0, NULL, NULL),
|
||||||
('Futsal', 'fu', 'icon-futsal', '83', '70', '83', '180', '4', '0', NULL, NULL),
|
(17, 'Futsal', 'fu', 'icon-futsal', NULL, 83, 70, 83, 180, 4, 0, NULL, NULL),
|
||||||
('Mixed Martial Arts', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(18, 'Mixed Martial Arts', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Boxing', NULL, NULL, '0', '24', '9', '261', '31', '0', NULL, NULL),
|
(19, 'Boxing', NULL, NULL, NULL, 0, 24, 9, 261, 31, 0, NULL, NULL),
|
||||||
('Darts', 'da', 'icon-darts', '15', '34', '15', '22', '26', '0', NULL, NULL),
|
(20, 'Darts', 'da', 'icon-darts', NULL, 15, 34, 15, 22, 26, 0, NULL, NULL),
|
||||||
('Bowls', NULL, NULL, '0', '0', '66', '0', '11', '0', NULL, NULL),
|
(21, 'Bowls', NULL, NULL, NULL, 0, 0, 66, 0, 11, 0, NULL, NULL),
|
||||||
('Motor Sports', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(22, 'Motor Sports', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Gaelic Football', NULL, NULL, '0', '0', '75', '620', '0', '0', NULL, NULL),
|
(23, 'Gaelic Football', NULL, NULL, NULL, 0, 0, 75, 620, 0, 0, NULL, NULL),
|
||||||
('Water Polo', NULL, NULL, '0', '0', '110', '182', '42', '0', NULL, NULL),
|
(24, 'Water Polo', NULL, NULL, NULL, 0, 0, 110, 182, 42, 0, NULL, NULL),
|
||||||
('Cycling', NULL, NULL, '0', '10', '0', '184', '33', '0', NULL, NULL),
|
(25, 'Cycling', NULL, NULL, NULL, 0, 10, 0, 184, 33, 0, NULL, NULL),
|
||||||
('Aussie Rules', 'ar', 'icon-australianrules', '36', '36', '36', '13', '5', '0', NULL, NULL),
|
(26, 'Aussie Rules', 'ar', 'icon-australianrules', NULL, 36, 36, 36, 13, 5, 0, NULL, NULL),
|
||||||
('Hockey', NULL, NULL, '0', '0', '0', '0', '34', '0', NULL, NULL),
|
(27, 'Hockey', NULL, NULL, NULL, 0, 0, 0, 0, 34, 0, NULL, NULL),
|
||||||
('Rugby Union', 'ru', 'icon-rugby', '8', '32', '8', '0', '0', '0', NULL, NULL),
|
(28, 'Rugby Union', 'ru', 'icon-rugby', NULL, 8, 32, 8, 0, 0, 0, NULL, NULL),
|
||||||
('Rugby League', 'rl', 'icon-rugby', '19', '31', '19', '12', '22', '0', NULL, NULL),
|
(29, 'Rugby League', 'rl', 'icon-rugby', NULL, 19, 31, 19, 12, 22, 0, NULL, NULL),
|
||||||
('Alpine Skiing', NULL, NULL, '0', '9', '0', '0', '17', '0', NULL, NULL),
|
(30, 'Alpine Skiing', NULL, NULL, NULL, 0, 9, 0, 0, 17, 0, NULL, NULL),
|
||||||
('Biathlon', NULL, NULL, '0', '64', '0', '0', '30', '0', NULL, NULL),
|
(31, 'Biathlon', NULL, NULL, NULL, 0, 64, 0, 0, 30, 0, NULL, NULL),
|
||||||
('Curling', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(32, 'Curling', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Nordic Combined', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(33, 'Nordic Combined', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Ski Jumping', NULL, NULL, '0', '0', '0', '0', '40', '0', NULL, NULL),
|
(34, 'Ski Jumping', NULL, NULL, NULL, 0, 0, 0, 0, 40, 0, NULL, NULL),
|
||||||
('Cross-country Skiing', NULL, NULL, '0', '0', '0', '601', '32', '0', NULL, NULL),
|
(35, 'Cross-country Skiing', NULL, NULL, NULL, 0, 0, 0, 601, 32, 0, NULL, NULL),
|
||||||
('Bobsleigh', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(36, 'Bobsleigh', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Freestyle Skiing', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(37, 'Freestyle Skiing', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Luge', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(38, 'Luge', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Short Track Speed Skating', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(39, 'Short Track Speed Skating', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Skeleton', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(40, 'Skeleton', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Snowboard', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(41, 'Snowboard', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Speed Skating', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(42, 'Speed Skating', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Figure Skating', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(43, 'Figure Skating', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Miscellaneous', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(44, 'Miscellaneous', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Roller Hockey', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(45, 'Roller Hockey', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Beach Soccer', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(46, 'Beach Soccer', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Badminton', 'bd', 'icon-badminton', '94', '44', '94', '0', '13', '0', NULL, NULL),
|
(47, 'Badminton', 'bd', 'icon-badminton', NULL, 94, 44, 94, 0, 13, 0, NULL, NULL),
|
||||||
('Archery', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(48, 'Archery', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Athletics', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(49, 'Athletics', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Beach Volleyball', 'bv', 'icon-beachvolleyball', '95', '0', '95', '34', '21', '0', NULL, NULL),
|
(50, 'Beach Volleyball', 'bv', 'icon-beachvolleyball', NULL, 95, 0, 95, 34, 21, 0, NULL, NULL),
|
||||||
('Diving', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(51, 'Diving', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Equestrian', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(52, 'Equestrian', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Fencing', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(53, 'Fencing', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Judo', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(54, 'Judo', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Modern Pentathlon', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(55, 'Modern Pentathlon', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Canoe', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(56, 'Canoe', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Gymnastics', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(57, 'Gymnastics', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Rowing', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(58, 'Rowing', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Shooting', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(59, 'Shooting', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Swimming Synchronised', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(60, 'Swimming Synchronised', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Swimming', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(61, 'Swimming', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Taekwondo', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(62, 'Taekwondo', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Trampoline', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(63, 'Trampoline', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Triathlon', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(64, 'Triathlon', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Weightlifting', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(65, 'Weightlifting', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Wrestling', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(66, 'Wrestling', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Sailing', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(67, 'Sailing', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Horse Racing', 'hr', 'icon-horseracing', '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(68, 'Horse Racing', 'hr', 'icon-horseracing', NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Gaelic Hurling', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(69, 'Gaelic Hurling', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Pool', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(70, 'Pool', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Squash', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(71, 'Squash', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Chess', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(72, 'Chess', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Greyhound Racing', 'gr', 'icon-greyhound', '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(73, 'Greyhound Racing', 'gr', 'icon-greyhound', NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('Harness Racing', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL),
|
(74, 'Harness Racing', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL),
|
||||||
('E-Sports', NULL, NULL, '0', '0', '0', '0', '0', '0', NULL, NULL);";
|
(75, 'E-Sports', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL);
|
||||||
|
";
|
||||||
|
|
||||||
DB::unprepared($sql);
|
DB::unprepared($sql);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ class UserSeeder extends Seeder
|
|||||||
'email' => 'ht@webwerkstatt.tirol',
|
'email' => 'ht@webwerkstatt.tirol',
|
||||||
'password' => Hash::make('salam'),
|
'password' => Hash::make('salam'),
|
||||||
'email_verified_at' => now(),
|
'email_verified_at' => now(),
|
||||||
'super_admin' => 1,
|
|
||||||
'client_id' => 1,
|
'client_id' => 1,
|
||||||
|
'sport_id' => 1,
|
||||||
|
'multiline_setting_id' => 1,
|
||||||
|
'super_admin' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
User::factory()->create([
|
User::factory()->create([
|
||||||
@@ -26,6 +28,9 @@ class UserSeeder extends Seeder
|
|||||||
'password' => Hash::make('oscar'),
|
'password' => Hash::make('oscar'),
|
||||||
'email_verified_at' => now(),
|
'email_verified_at' => now(),
|
||||||
'client_id' => 1,
|
'client_id' => 1,
|
||||||
|
'sport_id' => 1,
|
||||||
|
'multiline_setting_id' => 1,
|
||||||
|
'super_admin' => 1,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,9 @@ use App\Utilities\OddsFormatting;
|
|||||||
|
|
||||||
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5 grid-rows-5 oddsbox">
|
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5 grid-rows-5 oddsbox">
|
||||||
|
|
||||||
{{ $loadMultiline($record->odds_3way) }}
|
{{ $loadSlots($record->odds_3way) }}
|
||||||
|
|
||||||
@foreach ($getMultiline() as $row)
|
@foreach ($getSlots() as $row)
|
||||||
@if (isset($row->bookmaker))
|
@if (isset($row->bookmaker))
|
||||||
<div class="bg-contain bg-center bg-no-repeat dark:opacity-90" title="{{ $row->bookmaker->txid }}"
|
<div class="bg-contain bg-center bg-no-repeat dark:opacity-90" title="{{ $row->bookmaker->txid }}"
|
||||||
style="background-image: url('{{ BkmIconMap::get($row->bookmaker?->icon) }}')">
|
style="background-image: url('{{ BkmIconMap::get($row->bookmaker?->icon) }}')">
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
<div class="flex">
|
<div class="flex justify-start w-full">
|
||||||
|
<x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="{{ $iconcolor }}">
|
||||||
|
<x-filament::input.select wire:model="sport_id" wire:change="swopSport">
|
||||||
|
@foreach ($sports as $id => $name)
|
||||||
|
<option value="{{ $id }}">{{ $name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</x-filament::input.select>
|
||||||
|
</x-filament::input.wrapper>
|
||||||
|
|
||||||
|
|
||||||
@foreach ($multilines as $multiline)
|
@foreach ($multilines as $multiline)
|
||||||
<div class="w-5"></div>
|
<div class="w-5"></div>
|
||||||
@if ($multiline['is_active'] == 1)
|
@if ($multiline['is_active'] == 1)
|
||||||
@@ -6,7 +15,7 @@
|
|||||||
{{ $multiline['name'] }}
|
{{ $multiline['name'] }}
|
||||||
</x-filament::button>
|
</x-filament::button>
|
||||||
@else
|
@else
|
||||||
<x-filament::button outlined color="gray" wire:click="swop({{ $multiline['id'] }})">
|
<x-filament::button outlined color="gray" wire:click="swopBettype({{ $multiline['id'] }})">
|
||||||
{{ $multiline['name'] }}
|
{{ $multiline['name'] }}
|
||||||
</x-filament::button>
|
</x-filament::button>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
Reference in new issue
Block a user