This commit is contained in:
salam committed 2026-08-11 18:26:38 +02:00
1 parent fcfe1e97fd
commit bfd513635d
11 files changed
+781 -176

No files matched your search

+19 -7
View File
@@ -2,9 +2,9 @@
namespace App\Filament\Pages\Selections;
use App\Models\StatistikoEvent;
use App\Models\SofaScorePlayerPosition;
use App\Filament\Pages\Selections\LoadPositions;
use App\Models\SofaScorePlayerPerSeason;
use App\Models\StatistikoEvent;
use Filament\Schemas\Components\Utilities\Get;
class LoadPlayer
@@ -37,7 +37,7 @@ class LoadPlayer
$matches_count = count($matches);
$ss_positions_map = SofaScorePlayerPosition::pluck('name', 'ss_code')->toArray();
$positions_map = LoadPositions::load();
// needs to run daily for pre-calculaton
$player = SofaScorePlayerPerSeason::with('details')->where('ss_team_id', $team_id)->whereIn('season', $season)->get();
@@ -63,8 +63,20 @@ class LoadPlayer
$colorlevel = round($matches_count / 3);
$preferred_foot = $val->details->preferred_foot;
$player_position = ' (Role ' . $val->details->position . ')';
$position = $ss_positions_map[$val->details->position] ?? 'No Specific Position';
if (in_array($val->details->position, $positions_map['MIDFIELD'])) {
$position = 'MIDFIELD';
} else if (in_array($val->details->position, $positions_map['DEFENCE'])) {
$position = 'DEFENCE';
} else if (in_array($val->details->position, $positions_map['ATTACK'])) {
$position = 'ATTACK';
} else if (in_array($val->details->position, $positions_map['GOALKEEPER'])) {
$position = 'GOALKEEPER';
} else {
$player_position = $val->details->position;
$position = 'NO SPECIFIC POSITION';
}
$infostring = $events_played . ' Ev';
if ($preferred_foot)
@@ -73,11 +85,11 @@ class LoadPlayer
$infostring .= ' - ' . round($minues_played / $events_played) . 'min';
if ($events_played < $colorlevel) {
$arr[$position][$val->ss_player_id] = '<span class="text-red-600 dark:text-red-500 cursor-pointer"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
$arr[$position][$val->ss_player_id] = '<span class="text-red-600 dark:text-red-500 cursor-pointer"><b>' . $val->details->player_name . '</b>' . $player_position . '<br>' . $infostring . '</span>';
} else if ($events_played < $colorlevel * 2) {
$arr[$position][$val->ss_player_id] = '<span class="text-blue-600 dark:text-blue-500 cursor-pointer"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
$arr[$position][$val->ss_player_id] = '<span class="text-blue-600 dark:text-blue-500 cursor-pointer"><b>' . $val->details->player_name . '</b>' . $player_position . '<br>' . $infostring . '</span>';
} else {
$arr[$position][$val->ss_player_id] = '<span class="text-green-600 dark:text-green-500 cursor-pointer"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
$arr[$position][$val->ss_player_id] = '<span class="text-green-600 dark:text-green-500 cursor-pointer"><b>' . $val->details->player_name . '</b>' . $player_position . '<br>' . $infostring . '</span>';
}
}
return $arr;
@@ -0,0 +1,20 @@
<?php
namespace App\Filament\Pages\Selections;
use App\Models\SofaScorePlayerPosition;
class LoadPositions
{
public static function load()
{
$res = SofaScorePlayerPosition::all();
$arr = [];
foreach ($res as $val) {
$arr[$val->generalposition][] = $val->ss_code;
}
return $arr;
}
}
+6 -9
View File
@@ -23,6 +23,7 @@ use Filament\Schemas\Components\Utilities\Set;
use Filament\Schemas\Schema;
use Filament\Support\RawJs;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Contracts\View\View;
use Illuminate\Support\HtmlString;
class Statistic extends BaseDashboard
@@ -232,13 +233,13 @@ class Statistic extends BaseDashboard
->prefixIcon('icon-player')
->preload()
->searchable()
->extraAttributes(fn() => ['id' => 'player_selector'])
->suffixAction(
Action::make('iconInfo')
->icon('phosphor-question-fill')
->color('success')
->tooltip(fn() => $this->tooltip_player_info())
)
->extraAttributes(fn() => ['id' => 'player_selector'])
->options(function (Get $get) {
return LoadPlayer::load($get);
}),
@@ -251,10 +252,6 @@ class Statistic extends BaseDashboard
->hidden(fn(Get $get) => ! $get('ss_player_id'))
->prefixIconColor('success')
->selectablePlaceholder(false)
// ->afterStateUpdated(function (callable $set) {
// // $set('team_id', null);
// $set('ss_player_id', null);
// })
->options([
'all' => 'All',
'lineup' => 'Lineup',
@@ -346,13 +343,13 @@ class Statistic extends BaseDashboard
protected function tooltip_player_info(): HtmlString
{
$str = '<div class="m-3 grid grid-cols-2 gap-x-5 max-w-md">';
$str = '<div class="m-3 grid grid-cols-2 gap-2 max-w-lg">';
$str .= '<div class="col-span-2 font-bold">Player Information</div>';
$str .= '<div>Events played:</div>';
$str .= '<div class="font-bold">Events played:</div>';
$str .= '<div>sum</div>';
$str .= '<div>Stronger foot:</div>';
$str .= '<div class="font-bold">Stronger foot:</div>';
$str .= '<div>left | right | both</div>';
$str .= '<div>Average on field:</div>';
$str .= '<div class="font-bold">Average on field:</div>';
$str .= '<div>minutes</div>';
$str .= '</div>';
+2 -1
View File
@@ -13,6 +13,7 @@ class SofaScorePlayerPosition extends Model
protected $fillable = [
'ss_code',
'description',
'name',
'generalposition',
];
}
+7
View File
@@ -2,6 +2,7 @@
namespace App\Providers;
use App\Filament\Pages\Statistic;
use App\Filament\Resources\Events\Pages\ListEvents;
use Carbon\Carbon;
use Filament\Support\Assets\Css;
@@ -13,6 +14,7 @@ use Filament\Support\Facades\FilamentTimezone;
use Filament\Support\Facades\FilamentView;
use Filament\Tables\View\TablesRenderHook;
use Filament\View\PanelsRenderHook;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
@@ -63,6 +65,11 @@ class AppServiceProvider extends ServiceProvider
fn(): string => Blade::render('@livewire(\'top-menu-items\')')
);
FilamentView::registerRenderHook(
PanelsRenderHook::GLOBAL_SEARCH_AFTER,
fn(): View => view('filament.modals.position-abbreviation'),
);
Carbon::setLocale(app()->getLocale());
FilamentColor::register([
+27 -27
View File
@@ -2,38 +2,38 @@
namespace App\Providers\Filament;
// use Agencetwogether\HooksHelper\HooksHelperPlugin;
use Agencetwogether\HooksHelper\HooksHelperPlugin;
use App\Filament\Exports\BetfairExporter;
use App\Filament\Pages\Statistic;
use App\Http\Middleware\RecordUserActivity;
use Awcodes\LightSwitch\Enums\Alignment;
use Awcodes\LightSwitch\LightSwitchPlugin;
use BezhanSalleh\FilamentShield\FilamentShieldPlugin;
use Filament\Actions\Action;
use Filament\Actions\ExportAction;
use Filament\Actions\Exports\Models\Export;
use Filament\Auth\MultiFactor\App\AppAuthentication;
use Filament\Auth\MultiFactor\Email\EmailAuthentication;
use Filament\Auth\Pages\PasswordReset\RequestPasswordReset;
use Filament\Http\Middleware\Authenticate;
use Filament\Http\Middleware\AuthenticateSession;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
use Filament\Panel;
use Filament\PanelProvider;
use Filament\Actions\Action;
use App\Filament\Pages\Statistic;
use Filament\Support\Enums\Width;
use Filament\Actions\ExportAction;
use Illuminate\Support\Facades\Auth;
use Awcodes\LightSwitch\Enums\Alignment;
use App\Filament\Exports\BetfairExporter;
use Illuminate\Database\Eloquent\Builder;
use Awcodes\LightSwitch\LightSwitchPlugin;
use Filament\Http\Middleware\Authenticate;
use App\Http\Middleware\RecordUserActivity;
use Filament\Actions\Exports\Models\Export;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\Cookie\Middleware\EncryptCookies;
use Filament\Http\Middleware\AuthenticateSession;
use Filament\Auth\MultiFactor\App\AppAuthentication;
use BezhanSalleh\FilamentShield\FilamentShieldPlugin;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Swis\Filament\Backgrounds\ImageProviders\MyImages;
use Filament\Auth\MultiFactor\Email\EmailAuthentication;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Swis\Filament\Backgrounds\FilamentBackgroundsPlugin;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Filament\Auth\Pages\PasswordReset\RequestPasswordReset;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Joaopaulolndev\FilamentEditProfile\Pages\EditProfilePage;
use Illuminate\Cookie\Middleware\EncryptCookies;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Joaopaulolndev\FilamentEditProfile\FilamentEditProfilePlugin;
use Joaopaulolndev\FilamentEditProfile\Pages\EditProfilePage;
use Swis\Filament\Backgrounds\FilamentBackgroundsPlugin;
use Swis\Filament\Backgrounds\ImageProviders\MyImages;
class AdminPanelProvider extends PanelProvider
{
Generated
+9 -9
View File
@@ -11054,20 +11054,20 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.13.4",
"version": "1.14.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
"reference": "8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae",
"reference": "8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
"php": "^8.0"
},
"conflict": {
"doctrine/collections": "<1.6.8",
@@ -11102,15 +11102,15 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
"source": "https://github.com/myclabs/DeepCopy/tree/1.14.0"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
"url": "https://github.com/mnapoli",
"type": "github"
}
],
"time": "2025-08-01T08:46:24+00:00"
"time": "2026-08-11T10:17:44+00:00"
},
{
"name": "nunomaduro/collision",
@@ -15,6 +15,7 @@ return new class extends Migration
$table->id();
$table->string('ss_code')->index();
$table->string('name');
$table->string('generalposition');
});
}
+123 -123
View File
@@ -12,130 +12,130 @@ class SofaScorePlayerPositionSeeder extends Seeder
/**
* SofaScore Player Positions
*/
$sql = "INSERT INTO `sofa_score_player_positions` (`ss_code`, `name`)
$sql = "INSERT INTO `sofa_score_player_positions` (`ss_code`, `name`, `generalposition`)
VALUES
('AM', 'Attacking Midfield'),
('DC', 'Centre-Back'),
('DL', 'Left-Back'),
('DM', 'Defensive Midfield'),
('DR', 'Right-Back'),
('GK', 'Goalkeeper'),
('LW', 'Left Winger'),
('MC', 'Central Midfield'),
('ML', 'Left Midfield'),
('MR', 'Right Midfield'),
('RW', 'Right Winger'),
('ST', 'Centre-Forward'),
('DC-AM', 'Centre-Back, Attacking Midfield'),
('DL-AM', 'Left-Back, Attacking Midfield'),
('DM-AM', 'Defensive Midfield, Attacking Midfield'),
('DR-AM', 'Right-Back, Attacking Midfield'),
('LW-AM', 'Left Winger, Attacking Midfield'),
('MC-AM', 'Central Midfield, Attacking Midfield'),
('ML-AM', 'Left Midfield, Attacking Midfield'),
('MR-AM', 'Right Midfield, Attacking Midfield'),
('RW-AM', 'Right Winger, Attacking Midfield'),
('ST-AM', 'Centre-Forward, Attacking Midfield'),
('AM-DC', 'Attacking Midfield, Centre-Back'),
('DL-DC', 'Left-Back, Centre-Back'),
('DM-DC', 'Defensive Midfield, Centre-Back'),
('DR-DC', 'Right-Back, Centre-Back'),
('LW-DC', 'Left Winger, Centre-Back'),
('MC-DC', 'Central Midfield, Centre-Back'),
('ML-DC', 'Left Midfield, Centre-Back'),
('MR-DC', 'Right Midfield, Centre-Back'),
('RW-DC', 'Right Winger, Centre-Back'),
('ST-DC', 'Centre-Forward, Centre-Back'),
('AM-DL', 'Attacking Midfield, Left-Back'),
('DC-DL', 'Centre-Back, Left-Back'),
('DM-DL', 'Defensive Midfield, Left-Back'),
('DR-DL', 'Right-Back, Left-Back'),
('LW-DL', 'Left Winger, Left-Back'),
('MC-DL', 'Central Midfield, Left-Back'),
('ML-DL', 'Left Midfield, Left-Back'),
('MR-DL', 'Right Midfield, Left-Back'),
('RW-DL', 'Right Winger, Left-Back'),
('ST-DL', 'Centre-Forward, Left-Back'),
('AM-DM', 'Attacking Midfield, Defensive Midfield'),
('DC-DM', 'Centre-Back, Defensive Midfield'),
('DL-DM', 'Left-Back, Defensive Midfield'),
('DR-DM', 'Right-Back, Defensive Midfield'),
('LW-DM', 'Left Winger, Defensive Midfield'),
('MC-DM', 'Central Midfield, Defensive Midfield'),
('ML-DM', 'Left Midfield, Defensive Midfield'),
('MR-DM', 'Right Midfield, Defensive Midfield'),
('RW-DM', 'Right Winger, Defensive Midfield'),
('ST-DM', 'Centre-Forward, Defensive Midfield'),
('AM-DR', 'Attacking Midfield, Right-Back'),
('DC-DR', 'Centre-Back, Right-Back'),
('DL-DR', 'Left-Back, Right-Back'),
('DM-DR', 'Defensive Midfield, Right-Back'),
('LW-DR', 'Left Winger, Right-Back'),
('MC-DR', 'Central Midfield, Right-Back'),
('ML-DR', 'Left Midfield, Right-Back'),
('MR-DR', 'Right Midfield, Right-Back'),
('RW-DR', 'Right Winger, Right-Back'),
('ST-DR', 'Centre-Forward, Right-Back'),
('AM-LW', 'Attacking Midfield, Left Winger'),
('DC-LW', 'Centre-Back, Left Winger'),
('DL-LW', 'Left-Back, Left Winger'),
('DM-LW', 'Defensive Midfield, Left Winger'),
('DR-LW', 'Right-Back, Left Winger'),
('MC-LW', 'Central Midfield, Left Winger'),
('ML-LW', 'Left Midfield, Left Winger'),
('MR-LW', 'Right Midfield, Left Winger'),
('RW-LW', 'Right Winger, Left Winger'),
('ST-LW', 'Centre-Forward, Left Winger'),
('AM-MC', 'Attacking Midfield, Central Midfield'),
('DC-MC', 'Centre-Back, Central Midfield'),
('DL-MC', 'Left-Back, Central Midfield'),
('DM-MC', 'Defensive Midfield, Central Midfield'),
('DR-MC', 'Right-Back, Central Midfield'),
('LW-MC', 'Left Winger, Central Midfield'),
('ML-MC', 'Left Midfield, Central Midfield'),
('MR-MC', 'Right Midfield, Central Midfield'),
('RW-MC', 'Right Winger, Central Midfield'),
('ST-MC', 'Centre-Forward, Central Midfield'),
('AM-ML', 'Attacking Midfield, Left Midfield'),
('DC-ML', 'Centre-Back, Left Midfield'),
('DL-ML', 'Left-Back, Left Midfield'),
('DM-ML', 'Defensive Midfield, Left Midfield'),
('DR-ML', 'Right-Back, Left Midfield'),
('LW-ML', 'Left Winger, Left Midfield'),
('MC-ML', 'Central Midfield, Left Midfield'),
('MR-ML', 'Right Midfield, Left Midfield'),
('RW-ML', 'Right Winger, Left Midfield'),
('ST-ML', 'Centre-Forward, Left Midfield'),
('AM-MR', 'Attacking Midfield, Right Midfield'),
('DC-MR', 'Centre-Back, Right Midfield'),
('DL-MR', 'Left-Back, Right Midfield'),
('DM-MR', 'Defensive Midfield, Right Midfield'),
('DR-MR', 'Right-Back, Right Midfield'),
('LW-MR', 'Left Winger, Right Midfield'),
('MC-MR', 'Central Midfield, Right Midfield'),
('ML-MR', 'Left Midfield, Right Midfield'),
('RW-MR', 'Right Winger, Right Midfield'),
('ST-MR', 'Centre-Forward, Right Midfield'),
('AM-RW', 'Attacking Midfield, Right Winger'),
('DC-RW', 'Centre-Back, Right Winger'),
('DL-RW', 'Left-Back, Right Winger'),
('DM-RW', 'Defensive Midfield, Right Winger'),
('DR-RW', 'Right-Back, Right Winger'),
('LW-RW', 'Left Winger, Right Winger'),
('MC-RW', 'Central Midfield, Right Winger'),
('ML-RW', 'Left Midfield, Right Winger'),
('MR-RW', 'Right Midfield, Right Winger'),
('ST-RW', 'Centre-Forward, Right Winger'),
('AM-ST', 'Attacking Midfield, Centre-Forward'),
('DC-ST', 'Centre-Back, Centre-Forward'),
('DL-ST', 'Left-Back, Centre-Forward'),
('DM-ST', 'Defensive Midfield, Centre-Forward'),
('DR-ST', 'Right-Back, Centre-Forward'),
('LW-ST', 'Left Winger, Centre-Forward'),
('MC-ST', 'Central Midfield, Centre-Forward'),
('ML-ST', 'Left Midfield, Centre-Forward'),
('MR-ST', 'Right Midfield, Centre-Forward'),
('RW-ST', 'Right Winger, Centre-Forward');
('LW', 'Left Winger', 'ATTACK'),
('RW', 'Right Winger', 'ATTACK'),
('ST', 'Centre-Forward', 'ATTACK'),
('LW-AM', 'Left Winger, Attacking Midfield', 'ATTACK'),
('RW-AM', 'Right Winger, Attacking Midfield', 'ATTACK'),
('ST-AM', 'Centre-Forward, Attacking Midfield', 'ATTACK'),
('LW-DC', 'Left Winger, Centre-Back', 'ATTACK'),
('RW-DC', 'Right Winger, Centre-Back', 'ATTACK'),
('ST-DC', 'Centre-Forward, Centre-Back', 'ATTACK'),
('LW-DL', 'Left Winger, Left-Back', 'ATTACK'),
('RW-DL', 'Right Winger, Left-Back', 'ATTACK'),
('ST-DL', 'Centre-Forward, Left-Back', 'ATTACK'),
('LW-DM', 'Left Winger, Defensive Midfield', 'ATTACK'),
('RW-DM', 'Right Winger, Defensive Midfield', 'ATTACK'),
('ST-DM', 'Centre-Forward, Defensive Midfield', 'ATTACK'),
('LW-DR', 'Left Winger, Right-Back', 'ATTACK'),
('RW-DR', 'Right Winger, Right-Back', 'ATTACK'),
('ST-DR', 'Centre-Forward, Right-Back', 'ATTACK'),
('RW-LW', 'Right Winger, Left Winger', 'ATTACK'),
('ST-LW', 'Centre-Forward, Left Winger', 'ATTACK'),
('LW-MC', 'Left Winger, Central Midfield', 'ATTACK'),
('RW-MC', 'Right Winger, Central Midfield', 'ATTACK'),
('ST-MC', 'Centre-Forward, Central Midfield', 'ATTACK'),
('LW-ML', 'Left Winger, Left Midfield', 'ATTACK'),
('RW-ML', 'Right Winger, Left Midfield', 'ATTACK'),
('ST-ML', 'Centre-Forward, Left Midfield', 'ATTACK'),
('LW-MR', 'Left Winger, Right Midfield', 'ATTACK'),
('RW-MR', 'Right Winger, Right Midfield', 'ATTACK'),
('ST-MR', 'Centre-Forward, Right Midfield', 'ATTACK'),
('LW-RW', 'Left Winger, Right Winger', 'ATTACK'),
('ST-RW', 'Centre-Forward, Right Winger', 'ATTACK'),
('LW-ST', 'Left Winger, Centre-Forward', 'ATTACK'),
('RW-ST', 'Right Winger, Centre-Forward', 'ATTACK'),
('DC', 'Centre-Back', 'DEFENCE'),
('DL', 'Left-Back', 'DEFENCE'),
('DR', 'Right-Back', 'DEFENCE'),
('DC-AM', 'Centre-Back, Attacking Midfield', 'DEFENCE'),
('DL-AM', 'Left-Back, Attacking Midfield', 'DEFENCE'),
('DR-AM', 'Right-Back, Attacking Midfield', 'DEFENCE'),
('DL-DC', 'Left-Back, Centre-Back', 'DEFENCE'),
('DR-DC', 'Right-Back, Centre-Back', 'DEFENCE'),
('DC-DL', 'Centre-Back, Left-Back', 'DEFENCE'),
('DR-DL', 'Right-Back, Left-Back', 'DEFENCE'),
('DC-DM', 'Centre-Back, Defensive Midfield', 'DEFENCE'),
('DL-DM', 'Left-Back, Defensive Midfield', 'DEFENCE'),
('DR-DM', 'Right-Back, Defensive Midfield', 'DEFENCE'),
('DC-DR', 'Centre-Back, Right-Back', 'DEFENCE'),
('DL-DR', 'Left-Back, Right-Back', 'DEFENCE'),
('DC-LW', 'Centre-Back, Left Winger', 'DEFENCE'),
('DL-LW', 'Left-Back, Left Winger', 'DEFENCE'),
('DR-LW', 'Right-Back, Left Winger', 'DEFENCE'),
('DC-MC', 'Centre-Back, Central Midfield', 'DEFENCE'),
('DL-MC', 'Left-Back, Central Midfield', 'DEFENCE'),
('DR-MC', 'Right-Back, Central Midfield', 'DEFENCE'),
('DC-ML', 'Centre-Back, Left Midfield', 'DEFENCE'),
('DL-ML', 'Left-Back, Left Midfield', 'DEFENCE'),
('DR-ML', 'Right-Back, Left Midfield', 'DEFENCE'),
('DC-MR', 'Centre-Back, Right Midfield', 'DEFENCE'),
('DL-MR', 'Left-Back, Right Midfield', 'DEFENCE'),
('DR-MR', 'Right-Back, Right Midfield', 'DEFENCE'),
('DC-RW', 'Centre-Back, Right Winger', 'DEFENCE'),
('DL-RW', 'Left-Back, Right Winger', 'DEFENCE'),
('DR-RW', 'Right-Back, Right Winger', 'DEFENCE'),
('DC-ST', 'Centre-Back, Centre-Forward', 'DEFENCE'),
('DL-ST', 'Left-Back, Centre-Forward', 'DEFENCE'),
('DR-ST', 'Right-Back, Centre-Forward', 'DEFENCE'),
('GK', 'Goalkeeper', 'GOALKEEPER'),
('AM', 'Attacking Midfield', 'MIDFIELD'),
('DM', 'Defensive Midfield', 'MIDFIELD'),
('MC', 'Central Midfield', 'MIDFIELD'),
('ML', 'Left Midfield', 'MIDFIELD'),
('MR', 'Right Midfield', 'MIDFIELD'),
('DM-AM', 'Defensive Midfield, Attacking Midfield', 'MIDFIELD'),
('MC-AM', 'Central Midfield, Attacking Midfield', 'MIDFIELD'),
('ML-AM', 'Left Midfield, Attacking Midfield', 'MIDFIELD'),
('MR-AM', 'Right Midfield, Attacking Midfield', 'MIDFIELD'),
('AM-DC', 'Attacking Midfield, Centre-Back', 'MIDFIELD'),
('DM-DC', 'Defensive Midfield, Centre-Back', 'MIDFIELD'),
('MC-DC', 'Central Midfield, Centre-Back', 'MIDFIELD'),
('ML-DC', 'Left Midfield, Centre-Back', 'MIDFIELD'),
('MR-DC', 'Right Midfield, Centre-Back', 'MIDFIELD'),
('AM-DL', 'Attacking Midfield, Left-Back', 'MIDFIELD'),
('DM-DL', 'Defensive Midfield, Left-Back', 'MIDFIELD'),
('MC-DL', 'Central Midfield, Left-Back', 'MIDFIELD'),
('ML-DL', 'Left Midfield, Left-Back', 'MIDFIELD'),
('MR-DL', 'Right Midfield, Left-Back', 'MIDFIELD'),
('AM-DM', 'Attacking Midfield, Defensive Midfield', 'MIDFIELD'),
('MC-DM', 'Central Midfield, Defensive Midfield', 'MIDFIELD'),
('ML-DM', 'Left Midfield, Defensive Midfield', 'MIDFIELD'),
('MR-DM', 'Right Midfield, Defensive Midfield', 'MIDFIELD'),
('AM-DR', 'Attacking Midfield, Right-Back', 'MIDFIELD'),
('DM-DR', 'Defensive Midfield, Right-Back', 'MIDFIELD'),
('MC-DR', 'Central Midfield, Right-Back', 'MIDFIELD'),
('ML-DR', 'Left Midfield, Right-Back', 'MIDFIELD'),
('MR-DR', 'Right Midfield, Right-Back', 'MIDFIELD'),
('AM-LW', 'Attacking Midfield, Left Winger', 'MIDFIELD'),
('DM-LW', 'Defensive Midfield, Left Winger', 'MIDFIELD'),
('MC-LW', 'Central Midfield, Left Winger', 'MIDFIELD'),
('ML-LW', 'Left Midfield, Left Winger', 'MIDFIELD'),
('MR-LW', 'Right Midfield, Left Winger', 'MIDFIELD'),
('AM-MC', 'Attacking Midfield, Central Midfield', 'MIDFIELD'),
('DM-MC', 'Defensive Midfield, Central Midfield', 'MIDFIELD'),
('ML-MC', 'Left Midfield, Central Midfield', 'MIDFIELD'),
('MR-MC', 'Right Midfield, Central Midfield', 'MIDFIELD'),
('AM-ML', 'Attacking Midfield, Left Midfield', 'MIDFIELD'),
('DM-ML', 'Defensive Midfield, Left Midfield', 'MIDFIELD'),
('MC-ML', 'Central Midfield, Left Midfield', 'MIDFIELD'),
('MR-ML', 'Right Midfield, Left Midfield', 'MIDFIELD'),
('AM-MR', 'Attacking Midfield, Right Midfield', 'MIDFIELD'),
('DM-MR', 'Defensive Midfield, Right Midfield', 'MIDFIELD'),
('MC-MR', 'Central Midfield, Right Midfield', 'MIDFIELD'),
('ML-MR', 'Left Midfield, Right Midfield', 'MIDFIELD'),
('AM-RW', 'Attacking Midfield, Right Winger', 'MIDFIELD'),
('DM-RW', 'Defensive Midfield, Right Winger', 'MIDFIELD'),
('MC-RW', 'Central Midfield, Right Winger', 'MIDFIELD'),
('ML-RW', 'Left Midfield, Right Winger', 'MIDFIELD'),
('MR-RW', 'Right Midfield, Right Winger', 'MIDFIELD'),
('AM-ST', 'Attacking Midfield, Centre-Forward', 'MIDFIELD'),
('DM-ST', 'Defensive Midfield, Centre-Forward', 'MIDFIELD'),
('MC-ST', 'Central Midfield, Centre-Forward', 'MIDFIELD'),
('ML-ST', 'Left Midfield, Centre-Forward', 'MIDFIELD'),
('MR-ST', 'Right Midfield, Centre-Forward', 'MIDFIELD');
";
DB::unprepared($sql);
}
+1
View File
@@ -3,6 +3,7 @@
@source '../../../../app/Filament/**/*';
@source '../../../../resources/views/livewire/*';
@source '../../../../resources/views/filament/**/*';
@source '../../../../resources/views/filament/modals/**/*';
@source '../../../../resources/views/filament/tables/**/*';
@source '../../../../resources/views/components/**/*';
@source '../../../../vendor/awcodes/light-switch/resources/**/*.blade.php';
@@ -0,0 +1,566 @@
<x-filament::modal alignment="center" width="lg" slide-over>
<x-slot name="trigger">
<x-filament::icon-button icon="phosphor-question-fill" color="gray" size="lg"
tooltip="Player positions explanation of abbreviations" />
</x-slot>
<div class="font-bold">Player positions explanation of abbreviations</div>
<div x-data="{ activeTab: 'tab1' }">
<x-filament::tabs label="Content tabs">
<x-filament::tabs.item alpine-active="activeTab === 'tab1'" x-on:click="activeTab = 'tab1'">
ATTACK
</x-filament::tabs.item>
<x-filament::tabs.item alpine-active="activeTab === 'tab2'" x-on:click="activeTab = 'tab2'">
DEFENCE
</x-filament::tabs.item>
<x-filament::tabs.item alpine-active="activeTab === 'tab3'" x-on:click="activeTab = 'tab3'">
MIDFIELD
</x-filament::tabs.item>
<x-filament::tabs.item alpine-active="activeTab === 'tab4'" x-on:click="activeTab = 'tab4'">
GOALKEEPER
</x-filament::tabs.item>
</x-filament::tabs>
<div class="m-4">
<div x-show="activeTab === 'tab1'">
<table class="border-separate text-xs border-spacing-y-1">
<thead>
<tr>
<th>Abbreviation</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>ST</td>
<td>Centre-Forward</td>
</tr>
<tr>
<td>ST-AM</td>
<td>Centre-Forward, Attacking Midfield</td>
</tr>
<tr>
<td>ST-MC</td>
<td>Centre-Forward, Central Midfield</td>
</tr>
<tr>
<td>ST-DC</td>
<td>Centre-Forward, Centre-Back</td>
</tr>
<tr>
<td>ST-DM</td>
<td>Centre-Forward, Defensive Midfield</td>
</tr>
<tr>
<td>ST-ML</td>
<td>Centre-Forward, Left Midfield</td>
</tr>
<tr>
<td>ST-LW</td>
<td>Centre-Forward, Left Winger</td>
</tr>
<tr>
<td>ST-DL</td>
<td>Centre-Forward, Left-Back</td>
</tr>
<tr>
<td>ST-MR</td>
<td>Centre-Forward, Right Midfield</td>
</tr>
<tr>
<td>ST-RW</td>
<td>Centre-Forward, Right Winger</td>
</tr>
<tr>
<td>ST-DR</td>
<td>Centre-Forward, Right-Back</td>
</tr>
<tr>
<td>LW</td>
<td>Left Winger</td>
</tr>
<tr>
<td>LW-AM</td>
<td>Left Winger, Attacking Midfield</td>
</tr>
<tr>
<td>LW-MC</td>
<td>Left Winger, Central Midfield</td>
</tr>
<tr>
<td>LW-DC</td>
<td>Left Winger, Centre-Back</td>
</tr>
<tr>
<td>LW-ST</td>
<td>Left Winger, Centre-Forward</td>
</tr>
<tr>
<td>LW-DM</td>
<td>Left Winger, Defensive Midfield</td>
</tr>
<tr>
<td>LW-ML</td>
<td>Left Winger, Left Midfield</td>
</tr>
<tr>
<td>LW-DL</td>
<td>Left Winger, Left-Back</td>
</tr>
<tr>
<td>LW-MR</td>
<td>Left Winger, Right Midfield</td>
</tr>
<tr>
<td>LW-RW</td>
<td>Left Winger, Right Winger</td>
</tr>
<tr>
<td>LW-DR</td>
<td>Left Winger, Right-Back</td>
</tr>
<tr>
<td>RW</td>
<td>Right Winger</td>
</tr>
<tr>
<td>RW-AM</td>
<td>Right Winger, Attacking Midfield</td>
</tr>
<tr>
<td>RW-MC</td>
<td>Right Winger, Central Midfield</td>
</tr>
<tr>
<td>RW-DC</td>
<td>Right Winger, Centre-Back</td>
</tr>
<tr>
<td>RW-ST</td>
<td>Right Winger, Centre-Forward</td>
</tr>
<tr>
<td>RW-DM</td>
<td>Right Winger, Defensive Midfield</td>
</tr>
<tr>
<td>RW-ML</td>
<td>Right Winger, Left Midfield</td>
</tr>
<tr>
<td>RW-LW</td>
<td>Right Winger, Left Winger</td>
</tr>
<tr>
<td>RW-DL</td>
<td>Right Winger, Left-Back</td>
</tr>
<tr>
<td>RW-MR</td>
<td>Right Winger, Right Midfield</td>
</tr>
<tr>
<td>RW-DR</td>
<td>Right Winger, Right-Back</td>
</tr>
</tbody>
</table>
</div>
<div x-show="activeTab === 'tab2'">
<table class="border-separate text-xs border-spacing-y-1">
<thead>
<tr>
<th>Abbreviation</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>DC</td>
<td>Centre-Back</td>
</tr>
<tr>
<td>DL</td>
<td>Left-Back</td>
</tr>
<tr>
<td>DR</td>
<td>Right-Back</td>
</tr>
<tr>
<td>DC-AM</td>
<td>Centre-Back, Attacking Midfield</td>
</tr>
<tr>
<td>DL-AM</td>
<td>Left-Back, Attacking Midfield</td>
</tr>
<tr>
<td>DR-AM</td>
<td>Right-Back, Attacking Midfield</td>
</tr>
<tr>
<td>DL-DC</td>
<td>Left-Back, Centre-Back</td>
</tr>
<tr>
<td>DR-DC</td>
<td>Right-Back, Centre-Back</td>
</tr>
<tr>
<td>DC-DL</td>
<td>Centre-Back, Left-Back</td>
</tr>
<tr>
<td>DR-DL</td>
<td>Right-Back, Left-Back</td>
</tr>
<tr>
<td>DC-DM</td>
<td>Centre-Back, Defensive Midfield</td>
</tr>
<tr>
<td>DL-DM</td>
<td>Left-Back, Defensive Midfield</td>
</tr>
<tr>
<td>DR-DM</td>
<td>Right-Back, Defensive Midfield</td>
</tr>
<tr>
<td>DC-DR</td>
<td>Centre-Back, Right-Back</td>
</tr>
<tr>
<td>DL-DR</td>
<td>Left-Back, Right-Back</td>
</tr>
<tr>
<td>DC-LW</td>
<td>Centre-Back, Left Winger</td>
</tr>
<tr>
<td>DL-LW</td>
<td>Left-Back, Left Winger</td>
</tr>
<tr>
<td>DR-LW</td>
<td>Right-Back, Left Winger</td>
</tr>
<tr>
<td>DC-MC</td>
<td>Centre-Back, Central Midfield</td>
</tr>
<tr>
<td>DL-MC</td>
<td>Left-Back, Central Midfield</td>
</tr>
<tr>
<td>DR-MC</td>
<td>Right-Back, Central Midfield</td>
</tr>
<tr>
<td>DC-ML</td>
<td>Centre-Back, Left Midfield</td>
</tr>
<tr>
<td>DL-ML</td>
<td>Left-Back, Left Midfield</td>
</tr>
<tr>
<td>DR-ML</td>
<td>Right-Back, Left Midfield</td>
</tr>
<tr>
<td>DC-MR</td>
<td>Centre-Back, Right Midfield</td>
</tr>
<tr>
<td>DL-MR</td>
<td>Left-Back, Right Midfield</td>
</tr>
<tr>
<td>DR-MR</td>
<td>Right-Back, Right Midfield</td>
</tr>
<tr>
<td>DC-RW</td>
<td>Centre-Back, Right Winger</td>
</tr>
<tr>
<td>DL-RW</td>
<td>Left-Back, Right Winger</td>
</tr>
<tr>
<td>DR-RW</td>
<td>Right-Back, Right Winger</td>
</tr>
<tr>
<td>DC-ST</td>
<td>Centre-Back, Centre-Forward</td>
</tr>
<tr>
<td>DL-ST</td>
<td>Left-Back, Centre-Forward</td>
</tr>
<tr>
<td>DR-ST</td>
<td>Right-Back, Centre-Forward
</tbody>
</table>
</div>
<div x-show="activeTab === 'tab3'">
<table class="border-separate text-xs border-spacing-y-1">
<thead>
<tr>
<th>Abbreviation</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>AM</td>
<td>Attacking Midfield</td>
</tr>
<tr>
<td>DM</td>
<td>Defensive Midfield</td>
</tr>
<tr>
<td>MC</td>
<td>Central Midfield</td>
</tr>
<tr>
<td>ML</td>
<td>Left Midfield</td>
</tr>
<tr>
<td>MR</td>
<td>Right Midfield</td>
</tr>
<tr>
<td>DM-AM</td>
<td>Defensive Midfield, Attacking Midfield</td>
</tr>
<tr>
<td>MC-AM</td>
<td>Central Midfield, Attacking Midfield</td>
</tr>
<tr>
<td>ML-AM</td>
<td>Left Midfield, Attacking Midfield</td>
</tr>
<tr>
<td>MR-AM</td>
<td>Right Midfield, Attacking Midfield</td>
</tr>
<tr>
<td>AM-DC</td>
<td>Attacking Midfield, Centre-Back</td>
</tr>
<tr>
<td>DM-DC</td>
<td>Defensive Midfield, Centre-Back</td>
</tr>
<tr>
<td>MC-DC</td>
<td>Central Midfield, Centre-Back</td>
</tr>
<tr>
<td>ML-DC</td>
<td>Left Midfield, Centre-Back</td>
</tr>
<tr>
<td>MR-DC</td>
<td>Right Midfield, Centre-Back</td>
</tr>
<tr>
<td>AM-DL</td>
<td>Attacking Midfield, Left-Back</td>
</tr>
<tr>
<td>DM-DL</td>
<td>Defensive Midfield, Left-Back</td>
</tr>
<tr>
<td>MC-DL</td>
<td>Central Midfield, Left-Back</td>
</tr>
<tr>
<td>ML-DL</td>
<td>Left Midfield, Left-Back</td>
</tr>
<tr>
<td>MR-DL</td>
<td>Right Midfield, Left-Back</td>
</tr>
<tr>
<td>AM-DM</td>
<td>Attacking Midfield, Defensive Midfield</td>
</tr>
<tr>
<td>MC-DM</td>
<td>Central Midfield, Defensive Midfield</td>
</tr>
<tr>
<td>ML-DM</td>
<td>Left Midfield, Defensive Midfield</td>
</tr>
<tr>
<td>MR-DM</td>
<td>Right Midfield, Defensive Midfield</td>
</tr>
<tr>
<td>AM-DR</td>
<td>Attacking Midfield, Right-Back</td>
</tr>
<tr>
<td>DM-DR</td>
<td>Defensive Midfield, Right-Back</td>
</tr>
<tr>
<td>MC-DR</td>
<td>Central Midfield, Right-Back</td>
</tr>
<tr>
<td>ML-DR</td>
<td>Left Midfield, Right-Back</td>
</tr>
<tr>
<td>MR-DR</td>
<td>Right Midfield, Right-Back</td>
</tr>
<tr>
<td>AM-LW</td>
<td>Attacking Midfield, Left Winger</td>
</tr>
<tr>
<td>DM-LW</td>
<td>Defensive Midfield, Left Winger</td>
</tr>
<tr>
<td>MC-LW</td>
<td>Central Midfield, Left Winger</td>
</tr>
<tr>
<td>ML-LW</td>
<td>Left Midfield, Left Winger</td>
</tr>
<tr>
<td>MR-LW</td>
<td>Right Midfield, Left Winger</td>
</tr>
<tr>
<td>AM-MC</td>
<td>Attacking Midfield, Central Midfield</td>
</tr>
<tr>
<td>DM-MC</td>
<td>Defensive Midfield, Central Midfield</td>
</tr>
<tr>
<td>ML-MC</td>
<td>Left Midfield, Central Midfield</td>
</tr>
<tr>
<td>MR-MC</td>
<td>Right Midfield, Central Midfield</td>
</tr>
<tr>
<td>AM-ML</td>
<td>Attacking Midfield, Left Midfield</td>
</tr>
<tr>
<td>DM-ML</td>
<td>Defensive Midfield, Left Midfield</td>
</tr>
<tr>
<td>MC-ML</td>
<td>Central Midfield, Left Midfield</td>
</tr>
<tr>
<td>MR-ML</td>
<td>Right Midfield, Left Midfield</td>
</tr>
<tr>
<td>AM-MR</td>
<td>Attacking Midfield, Right Midfield</td>
</tr>
<tr>
<td>DM-MR</td>
<td>Defensive Midfield, Right Midfield</td>
</tr>
<tr>
<td>MC-MR</td>
<td>Central Midfield, Right Midfield</td>
</tr>
<tr>
<td>ML-MR</td>
<td>Left Midfield, Right Midfield</td>
</tr>
<tr>
<td>AM-RW</td>
<td>Attacking Midfield, Right Winger</td>
</tr>
<tr>
<td>DM-RW</td>
<td>Defensive Midfield, Right Winger</td>
</tr>
<tr>
<td>MC-RW</td>
<td>Central Midfield, Right Winger</td>
</tr>
<tr>
<td>ML-RW</td>
<td>Left Midfield, Right Winger</td>
</tr>
<tr>
<td>MR-RW</td>
<td>Right Midfield, Right Winger</td>
</tr>
<tr>
<td>AM-ST</td>
<td>Attacking Midfield, Centre-Forward</td>
</tr>
<tr>
<td>DM-ST</td>
<td>Defensive Midfield, Centre-Forward</td>
</tr>
<tr>
<td>MC-ST</td>
<td>Central Midfield, Centre-Forward</td>
</tr>
<tr>
<td>ML-ST</td>
<td>Left Midfield, Centre-Forward</td>
</tr>
<tr>
<td>MR-ST</td>
<td>Right Midfield, Centre-Forward</td>
</tr>
</tbody>
</table>
</div>
<div x-show="activeTab === 'tab4'">
<table class="border-separate text-xs border-spacing-y-1">
<thead>
<tr>
<th>Abbreviation</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>GK</td>
<td>Goaldkeeper</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</x-filament::modal>