This commit is contained in:
salam committed 2026-09-08 08:44:04 +02:00
1 parent 9f157adc96
commit 29de0c2c6c
13 files changed
+319 -784

No files matched your search

+4 -4
View File
@@ -14,7 +14,7 @@ class PlayerPerSeason
// when data changes clear player chche
SofaScorePlayerCache::truncate();
$res = StatistikoDetail::query()->select('ss_player_id', 'ss_team_id')->get();
$res = StatistikoDetail::query()->where('is_active', 1)->select('ss_player_id', 'ss_team_id')->get();
foreach ($res as $val) {
@@ -25,7 +25,7 @@ class PlayerPerSeason
foreach ($res2 as $val2) {
if (isset($val2->event->season)) {
if (!isset($collection[$val2->event->season])) {
if (! isset($collection[$val2->event->season])) {
$collection[$val2->event->season]['events_played_home'] = 0;
$collection[$val2->event->season]['events_played_away'] = 0;
$collection[$val2->event->season]['minutes_played_home'] = 0;
@@ -37,7 +37,7 @@ class PlayerPerSeason
$collection[$val2->event->season]['events_played_home'] += 1;
$collection[$val2->event->season]['minutes_played_home'] += $val2->minutes_played;
} else if ($val2->activeteam_id == $val2->event->away_id) {
} elseif ($val2->activeteam_id == $val2->event->away_id) {
$collection[$val2->event->season]['events_played_away'] += 1;
$collection[$val2->event->season]['minutes_played_away'] += $val2->minutes_played;
@@ -52,7 +52,7 @@ class PlayerPerSeason
[
'ss_player_id' => $val->ss_player_id,
'ss_team_id' => $val->ss_team_id,
'season' => $season
'season' => $season,
],
[
'events_played_home' => $row['events_played_home'],
@@ -2,10 +2,10 @@
namespace App\Console\Commands\Grapper\Sofascore;
use App\Console\Commands\Grap;
use App\Console\Commands\Grapper\Sofascore\Helper\CurlSofa;
use App\Console\Commands\Grapper\Sofascore\Helper\Sleeper;
use App\Console\Commands\Grapper\Sofascore\Helper\Strings;
use App\Console\Commands\Grap;
use App\Models\SofaScoreRosa;
use App\Utilities\Notice;
use Illuminate\Support\Facades\File;
@@ -17,13 +17,12 @@ class Rose
$debug = Grap::$options['d'] ?? 0;
$restart = Grap::$options['r'] ?? 0;
if ($debug && !$restart) {
Notice::note("RESTART ?", 'bb');
if ($debug && ! $restart) {
Notice::note('RESTART ?', 'bb');
sleep(5);
}
File::makeDirectory(Grap::$storage . '/' . Grap::$folder, 0775, true, true);
File::makeDirectory(Grap::$storage.'/'.Grap::$folder, 0775, true, true);
if ($restart) {
SofaScoreRosa::query()->update(['grapped' => 0]);
@@ -36,8 +35,7 @@ class Rose
}
}
$res = SofaScoreRosa::where('grapped', 0)->get();
$res = SofaScoreRosa::where('is_active', 1)->where('grapped', 0)->get();
$all = $res->count();
@@ -52,7 +50,7 @@ class Rose
echo "\n$key/$all\n";
}
$url = Grap::$options['base_url'] . 'api/v1/team/' . $value->ss_team_id . '/players';
$url = Grap::$options['base_url'].'api/v1/team/'.$value->ss_team_id.'/players';
$data = CurlSofa::load($url);
@@ -63,7 +61,7 @@ class Rose
* add team to folder
*********************************/
File::put(Grap::$storage . '/' . Grap::$folder . '/' . Strings::clean($value->ss_team_name) . '.json', json_encode($data));
File::put(Grap::$storage.'/'.Grap::$folder.'/'.Strings::clean($value->ss_team_name).'.json', json_encode($data));
SofaScoreRosa::where('id', $value->id)->update(['grapped' => 1]);
@@ -3,6 +3,7 @@
namespace App\Console\Commands\Grapper\Sofascore;
use App\Console\Commands\Grap;
use App\Models\SofaScoreRosa;
use App\Models\SofaScoreTask;
use App\Models\SofaScoreTaskTournament;
use App\Models\SofaScoreTournament;
@@ -16,17 +17,29 @@ class SettingsToLocal
$debug = Grap::$options['d'] ?? 0;
if ($debug) {
Notice::note("⚽ settings to local");
Notice::note("⚽ close all vpn");
Notice::note('⚽ settings to local');
Notice::note('⚽ close all vpn');
}
exec('killall ssh');
if ($debug) {
Notice::note("⚽ open vpn");
Notice::note('⚽ open vpn');
}
exec('ssh -f -N -L 13306:127.0.0.1:3306 -p 58371 root@162.55.242.190');
/**
* SofaScoreRosa
*/
if ($debug) {
Notice::note('SofaScoreRosa', 'g');
}
SofaScoreRosa::truncate();
$rows = DB::connection('remote_mariadb')->table('sofa_score_rosas')->get();
foreach ($rows as $row) {
SofaScoreRosa::insert((array) $row);
}
/**
* SofaScoreTask
*/
if ($debug) {
Notice::note('SofaScoreTask', 'g');
}
@@ -35,7 +48,9 @@ class SettingsToLocal
foreach ($rows as $row) {
SofaScoreTask::insert((array) $row);
}
/**
* SofaScoreTaskTournament
*/
if ($debug) {
Notice::note('SofaScoreTaskTournament', 'g');
}
@@ -44,7 +59,9 @@ class SettingsToLocal
foreach ($rows as $row) {
SofaScoreTaskTournament::insert((array) $row);
}
/**
* SofaScoreTournament
*/
if ($debug) {
Notice::note('SofaScoreTournament', 'g');
}
@@ -55,7 +72,7 @@ class SettingsToLocal
}
if ($debug) {
Notice::note("⚽ close all vpn");
Notice::note('⚽ close all vpn');
}
exec('killall ssh');
}
@@ -14,7 +14,7 @@ class ImportDetails
{
$now = now()->format('Y-m-d H:i:s');
SimpleExcelReader::create(storage_path('app/public/' . $filePath))
SimpleExcelReader::create(storage_path('app/public/'.$filePath))
->getRows()
->chunk(1000)
->each(function (LazyCollection $chunk) use ($now) {
@@ -24,7 +24,6 @@ class ImportDetails
$row = array_values($row);
// ss_player_id
//
// ss_team_id
// tx_team_id
// player_name
@@ -60,6 +59,8 @@ class ImportDetails
}
});
StatistikoDetail::where('updated_at', '!=', $now)->update(['is_active' => 0]);
/**update statistic player tabel */
PlayerPerSeason::run();
}
+30 -30
View File
@@ -93,14 +93,14 @@ class Statistic extends BaseDashboard
->label('Calculate')
->icon('icon-player')
->color('indigo')
->color(fn(): string => $this->filters['team_id'] ? 'primary' : 'gray')
->disabled(fn(): string => $this->filters['team_id'] ? false : true)
->color(fn (): string => $this->filters['team_id'] ? 'primary' : 'gray')
->disabled(fn (): string => $this->filters['team_id'] ? false : true)
->slideOver()
->slideOverPosition(SlideOverPosition::Start)
->modalWidth(Width::Screen)
->modalSubmitAction(false)
->modalCancelAction(false)
->modalContent(fn(): View => view('livewire.board-dispatcher-modal-wrapper', ['filters' => $this->filters])),
->modalContent(fn (): View => view('livewire.board-dispatcher-modal-wrapper', ['filters' => $this->filters])),
];
}
@@ -138,10 +138,10 @@ class Statistic extends BaseDashboard
->live()
->preload()
->searchable(false)
->prefixIconColor(fn(Get $get): string => $get('sofascore_category_id') ? 'success' : 'danger')
->prefixIconColor(fn (Get $get): string => $get('sofascore_category_id') ? 'success' : 'danger')
->prefixIcon('phosphor-globe-fill')
->hiddenLabel()
->options(fn() => LoadSofaScoreCategory::load())
->options(fn () => LoadSofaScoreCategory::load())
->placeholder('Country')
->afterStateUpdated(function (callable $set, $state) {
$set('seasonmode', SofaScoreCategory::where('id', $state)->value('season_mode'));
@@ -154,10 +154,10 @@ class Statistic extends BaseDashboard
Select::make('league_id')
->live()
->preload()
->prefixIconColor(fn(Get $get): string => $get('league_id') ? 'success' : 'danger')
->prefixIconColor(fn (Get $get): string => $get('league_id') ? 'success' : 'danger')
->prefixIcon('phosphor-trophy-fill')
->hiddenLabel()
->options(fn(Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('sofascore_category_id')))
->options(fn (Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('sofascore_category_id')))
->placeholder('League')
->afterStateUpdated(function (callable $set) {
$set('match_id', null);
@@ -168,7 +168,7 @@ class Statistic extends BaseDashboard
Select::make('match_id')
->live()
->hiddenLabel()
->prefixIconColor(fn(Get $get): string => $get('match_id') ? 'success' : 'danger')
->prefixIconColor(fn (Get $get): string => $get('match_id') ? 'success' : 'danger')
->prefixIcon('phosphor-calendar-check-fill')
->options(function (Get $get) {
return LoadStatisticFixturesMatchOptions::load($get('league_id'));
@@ -193,7 +193,7 @@ class Statistic extends BaseDashboard
}
})
->prefixIcon('phosphor-users-three-fill')
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
->options(function (Get $get) {
if ($get('match_id')) {
$res = StatisticFixtures::where('id', $get('match_id'))->first();
@@ -222,9 +222,9 @@ class Statistic extends BaseDashboard
Action::make('iconInfo')
->color('success')
->icon('phosphor-question-fill')
->tooltip(fn() => 'Team Position')
->tooltip(fn () => 'Team Position')
)
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
->default('all')
->selectablePlaceholder(false)
->options([
@@ -280,17 +280,17 @@ class Statistic extends BaseDashboard
->hiddenLabel()
->suffixAction(Action::make('reset')
->icon('phosphor-x-circle')
->action(fn(callable $set) => $set('similar_past_matches', 'none'))
->color(fn(Get $get): string => $get('similar_past_matches') != 'none' ? 'info' : 'gray'))
->action(fn (callable $set) => $set('similar_past_matches', 'none'))
->color(fn (Get $get): string => $get('similar_past_matches') != 'none' ? 'info' : 'gray'))
->placeholder('Similar Past Matches')
->suffix(fn(Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± ' . $get('accuracy') . '</div>') : '')
->suffix(fn (Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± '.$get('accuracy').'</div>') : '')
->prefix('SPM')
->prefixAction(
Action::make('iconInfo')
->icon('phosphor-question-fill')
// ->color(fn(Get $get): string => $get('similar_past_matches') != 'none' ? 'success' : 'primary')
->color('success')
->tooltip(fn() => $this->tooltip_similar_past_matches())
->tooltip(fn () => $this->tooltip_similar_past_matches())
)
->default('none')
->selectablePlaceholder(false)
@@ -310,7 +310,7 @@ class Statistic extends BaseDashboard
Slider::make('accuracy')
->live()
->hiddenLabel()
->hidden(fn(Get $get) => $get('similar_past_matches') == 'none')
->hidden(fn (Get $get) => $get('similar_past_matches') == 'none')
->fillTrack()
->minValue(0)
->maxValue(0.25)
@@ -329,17 +329,17 @@ class Statistic extends BaseDashboard
->hiddenLabel()
->allowHtml()
->placeholder('Player')
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
->prefixIconColor(fn(Get $get): string => $get('similar_past_matches') == 'none' ? 'success' : '')
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'success' : '')
->prefixIcon('icon-player')
->preload()
->searchable()
->extraAttributes(fn() => ['id' => 'player_selector'])
->extraAttributes(fn () => ['id' => 'player_selector'])
->suffixAction(
Action::make('iconInfo')
->icon('phosphor-question-fill')
->color('success')
->tooltip(fn() => $this->tooltip_player_info())
->tooltip(fn () => $this->tooltip_player_info())
)
->options(function (Get $get) {
$team_id = $get('team_id');
@@ -356,7 +356,7 @@ class Statistic extends BaseDashboard
->placeholder('Time on field')
->prefixIcon('phosphor-watch-fill')
->default('all')
->hidden(fn(Get $get) => ! $get('ss_player_id'))
->hidden(fn (Get $get) => ! $get('ss_player_id'))
->prefixIconColor('success')
->selectablePlaceholder(false)
->options([
@@ -376,7 +376,7 @@ class Statistic extends BaseDashboard
->extraAttributes([
'class' => 'radio-statistic-group',
])
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
->columnSpan([
'default' => 4,
'sm' => 4,
@@ -400,7 +400,7 @@ class Statistic extends BaseDashboard
->multiple()
->placeholder('Current Season')
->prefixIconColor('success')
->hidden(fn(Get $get) => $get('seasonmode') == 'halfyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
->hidden(fn (Get $get) => $get('seasonmode') == 'halfyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
->prefixIcon('phosphor-calendar-star-fill')
->options([
'2026' => '2026',
@@ -420,7 +420,7 @@ class Statistic extends BaseDashboard
->multiple()
->placeholder('Current Season')
->prefixIconColor('success')
->hidden(fn(Get $get) => $get('seasonmode') == 'fullyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
->hidden(fn (Get $get) => $get('seasonmode') == 'fullyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
->prefixIcon('phosphor-calendar-star-fill')
->options([
'26/27' => '26/27',
@@ -436,30 +436,30 @@ class Statistic extends BaseDashboard
DatePicker::make('start_date')
->live()
->hiddenLabel()
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
->hidden(fn (Get $get) => $get('season_or_date') == 'season')
->native(false)
->prefixIconColor(fn(Get $get): string => $get('start_date') ? 'success' : 'primary')
->prefixIconColor(fn (Get $get): string => $get('start_date') ? 'success' : 'primary')
->prefixIcon('phosphor-calendar-fill')
->prefix('Start')
->suffixAction(
Action::make('clear_start')
->icon('phosphor-x')
->color('gray')
->action(fn(Set $set) => $set('start_date', null))
->action(fn (Set $set) => $set('start_date', null))
),
DatePicker::make('end_date')
->live()
->hiddenLabel()
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
->hidden(fn (Get $get) => $get('season_or_date') == 'season')
->native(false)
->prefixIconColor(fn(Get $get): string => $get('end_date') ? 'success' : 'primary')
->prefixIconColor(fn (Get $get): string => $get('end_date') ? 'success' : 'primary')
->prefixIcon('phosphor-calendar-fill')
->prefix('End')
->suffixAction(
Action::make('clear_end')
->icon('phosphor-x')
->color('gray')
->action(fn(Set $set) => $set('end_date', null))
->action(fn (Set $set) => $set('end_date', null))
),
]);
}
+91 -203
View File
@@ -3,6 +3,7 @@
namespace App\Livewire;
use App\Models\SofaScoreRosa;
use App\Models\User;
use Filament\Actions\Action;
use Filament\Actions\Concerns\InteractsWithActions;
use Filament\Actions\Contracts\HasActions;
@@ -16,28 +17,33 @@ use Filament\Tables\Enums\FiltersLayout;
use Filament\Tables\Filters\SelectFilter;
use Filament\Tables\Table;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\HtmlString;
use Livewire\Attributes\On;
use Livewire\Component;
class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTable
{
use InteractsWithActions;
use InteractsWithSchemas;
use InteractsWithTable;
use RestrictsFileUploadsToSchemaComponents;
public array $sourceRecords = [];
public array $lists = [];
public array $results = [];
public array $activeBoxes = [2 => 'DR', 4 => 'MR', 6 => 'RW', 9 => 'DC', 10 => 'DM', 11 => 'MC', 12 => 'AM', 15 => 'SW', 16 => 'DC', 17 => 'DM', 18 => 'MC', 19 => 'AM', 20 => 'SM', 21 => 'ST', 23 => 'DC', 24 => 'DM', 25 => 'MC', 26 => 'AM', 30 => 'DL', 32 => 'ML', 34 => 'LM'];
public bool $copyDisabled = true;
public bool $downloadDisabled = true;
public bool $calculationDisabled = true;
public string $calculationColor = 'gray';
public string $copyColor = 'gray';
public string $ss_team_name = '';
public array $boxes = [];
public array $beschriftung = [];
public function mount(array $filters)
@@ -48,37 +54,65 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
for ($i = 1; $i <= 35; $i++) {
$this->boxes[$i] = [];
if (isset($this->activeBoxes[$i]))
if (isset($this->activeBoxes[$i])) {
$this->beschriftung[$i] = $this->activeBoxes[$i];
else
} else {
$this->beschriftung[$i] = '';
}
}
Log::debug('boxes', $this->boxes);
}
public function getHeadingTable(): HtmlString
{
return new HtmlString('<div class="text-xl w-full">'.$this->ss_team_name.'</div>
<div class="text-[11px] p-0 flex flex-row gap-3 font-bold font-mono" style="position: relative; left: -2px; bottom: -13px;">
<div>Foot</div>
<div>Evt</div>
<div>Øm</div>
<div>Gls</div>
<div>Crn</div>
<div>Fls</div>
<div>Ofs</div>
<div>Snt</div>
<div>Tsh</div>
<div>Crd</div>
</div>');
}
public function table(Table $table): Table
{
return $table
->headerActions([
Action::make('close')->icon('phosphor-x')->close(),
Action::make('reset')->icon('phosphor-arrows-clockwise'),
Action::make('calculate')->icon('phosphor-calculator')->color('gray'),
Action::make('download')->icon('phosphor-download')->color('gray'),
Action::make('close')
->icon('phosphor-x')
->close(),
Action::make('reset')
->icon('phosphor-arrows-clockwise')
->action(fn () => $this->clearAll()),
Action::make('calculate')
->icon('phosphor-calculator')
->disabled($this->calculationDisabled)
->action(fn () => $this->calculateAspg()),
Action::make('download')
->icon('phosphor-download')
->disabled($this->downloadDisabled)
->action(fn () => $this->downloadResult()),
])
/**
* WICHTIG: Da Filament v5 zwingend eine Query braucht, nutzen wir ein
* leeres Modell (z.B. ein beliebiges Basis-Modell deines Projekts) NUR als Dummy-Builder.
* Alternativ kannst du ein anonymes Model nutzen.
*/
->query(\App\Models\User::query()->whereRaw('1 = 0')) // Verhindert DB-Abfragen
->query(User::query()->whereRaw('1 = 0')) // Verhindert DB-Abfragen
->paginated(false)
// ->striped()
->striped()
->defaultSort('name')
->columns([
ViewColumn::make('drag_card')
->columnSpanFull()
->label('Roster of ' . $this->ss_team_name)
->label(fn () => $this->getHeadingTable())
->view('filament.tables.columns.drag-card'),
])
->filters([
@@ -98,9 +132,10 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
->records(function () {
$collection = collect($this->sourceRecords);
$selectedPosition = $this->tableFilters['player_position']['value'] ?? null;
if (!empty($selectedPosition)) {
if (! empty($selectedPosition)) {
$collection = $collection->where('player_position', $selectedPosition);
}
return $collection;
});
}
@@ -111,17 +146,21 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
$boxNumber = (int) $boxNumber;
$player = is_array($elementData) ? $elementData : json_decode($elementData, true);
if (!$player || !isset($player['id'])) {
if (! $player || ! isset($player['id'])) {
return;
}
foreach ($this->sourceRecords as $k => $record) {
if ($record['id'] == (int) $player['id']) {
$this->calculationDisabled = false;
if ($this->boxes[$boxNumber]) {
$this->clearBox($boxNumber);
}
$this->boxes[$boxNumber] = $record;
$this->sourceRecords[$k]['active'] = 1;
$this->sourceRecords[$k]['position'] = $this->activeBoxes[$boxNumber];
}
}
}
@@ -132,207 +171,56 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
$tmp = $this->boxes[$boxNumber];
$player_id = 0;
foreach ($tmp as $key => $value) {
if ($key == 'id')
if ($key == 'id') {
$player_id = $value;
}
}
foreach ($this->sourceRecords as $k => $record) {
if ($record['id'] == (int) $player_id) {
$this->boxes[$boxNumber] = [];
$this->sourceRecords[$k]['position'] = '';
$this->sourceRecords[$k]['active'] = 0;
}
}
}
}
public function calculateAspg(): void
{
$this->downloadDisabled = false;
}
public function clearAll(): void
{
for ($i = 1; $i <= 35; $i++) {
$this->boxes[$i] = [];
}
foreach ($this->sourceRecords as $k => $record) {
$this->sourceRecords[$k]['position'] = '';
$this->sourceRecords[$k]['active'] = 0;
}
$this->downloadDisabled = true;
$this->calculationDisabled = true;
}
public function downloadResult()
{
return;
$copystring = '';
foreach ($this->results as $row) {
unset($row['origin']);
unset($row['pcolor']);
unset($row['ecolor']);
unset($row['info']);
$copystring .= implode("\t", $row)."\n";
}
$this->js("navigator.clipboard.writeText(`$copystring`)");
}
public function render()
{
return view('livewire.board-dispatcher');
}
// public function setCalculationButton()
// {
// $count = 1;
// for ($i = 1; $i <= 35; $i++) {
// $bayKey = "dest-{$i}";
// if (isset($this->lists[$bayKey]) && ! empty($this->lists[$bayKey])) {
// $count++;
// }
// }
// if ($count > 2) {
// $this->calculationDisabled = false;
// $this->calculationColor = 'info';
// } else {
// $this->calculationDisabled = true;
// $this->calculationColor = 'gray';
// }
// }
// public function setCopyButton()
// {
// if (\count($this->results) > 0) {
// $this->copyDisabled = false;
// $this->copyColor = 'info';
// } else {
// $this->copyDisabled = true;
// $this->copyColor = 'gray';
// }
// }
// public function calculate()
// {
// $this->results = [];
// for ($i = 1; $i <= 35; $i++) {
// $bayKey = "dest-{$i}";
// if (isset($this->lists[$bayKey]) && ! empty($this->lists[$bayKey])) {
// $this->results[] = $this->lists[$bayKey][0];
// }
// }
// $this->setCopyButton();
// }
// public function copyResult()
// {
// $copystring = '';
// foreach ($this->results as $row) {
// unset($row['origin']);
// unset($row['pcolor']);
// unset($row['ecolor']);
// unset($row['info']);
// $copystring .= implode("\t", $row) . "\n";
// }
// $this->js("navigator.clipboard.writeText(`$copystring`)");
// }
// public function moveItem($itemId, $fromList, $toList, $newIndex)
// {
// $itemId = (string) $itemId;
// $newIndex = (int) $newIndex;
// if (! $toList || $fromList === $toList || ! isset($this->lists[$fromList]) || ! isset($this->lists[$toList])) {
// $this->boardVersion = uniqid();
// return;
// }
// // Limit-Guard: Wenn das Ziel bereits ein Element enthält, abbrechen
// if (count($this->lists[$toList]) >= 1) {
// $this->boardVersion = uniqid();
// return;
// }
// $foundItem = null;
// foreach ($this->lists[$fromList] as $key => $item) {
// if ((string) $item['id'] === $itemId) {
// $item['position'] = $this->positions($toList);
// $foundItem = $item;
// unset($this->lists[$fromList][$key]);
// $this->lists[$fromList] = array_values($this->lists[$fromList]);
// break;
// }
// }
// if ($foundItem) {
// array_splice($this->lists[$toList], $newIndex, 0, [$foundItem]);
// }
// $this->setCalculationButton();
// $this->boardVersion = uniqid();
// }
// public function positions(string $pos)
// {
// $pos = (int) str_replace('dest-', '', $pos);
// $options = [2 => 'DR', 4 => 'MR', 6 => 'RW', 9 => 'DC', 10 => 'DM', 11 => 'MC', 12 => 'AM', 15 => 'SW', 16 => 'DC', 17 => 'DM', 18 => 'MC', 19 => 'AM', 20 => 'SM', 21 => 'ST', 23 => 'DC', 24 => 'DM', 25 => 'MC', 26 => 'AM', 30 => 'DL', 32 => 'ML', 34 => 'LM'];
// if (isset($options[$pos]))
// return $options[$pos];
// else
// return $pos;
// }
// public function returnToOrigin($itemId, $currentListId)
// {
// $itemId = (string) $itemId;
// // Log::info($this->boardVersion);
// // Log::info('itemId, currentListId', [$itemId, $currentListId]);
// // Log::info('OLD LIST', $this->lists);
// if (! isset($this->lists[$currentListId])) {
// $this->boardVersion = uniqid();
// return;
// }
// $foundItem = null;
// foreach ($this->lists[$currentListId] as $key => $item) {
// if ((string) $item['id'] === $itemId) {
// $foundItem = $item;
// unset($this->lists[$currentListId][$key]);
// $this->lists[$currentListId] = array_values($this->lists[$currentListId]);
// break;
// }
// }
// if ($foundItem && isset($this->lists[$foundItem['origin']])) {
// // Nur zurücklegen, wenn die Quelle wirklich frei ist
// array_unshift($this->lists[$foundItem['origin']], $foundItem);
// // if (count($this->lists[$foundItem['origin']]) < 2) {
// // Log::info('origin');
// // array_unshift($this->lists[$foundItem['origin']], $foundItem);
// // } else {
// // // Ausfallsicherheit gegen Datenverlust: Zurück in die Bucht schieben
// // array_unshift($this->lists[$currentListId], $foundItem);
// // Log::info('box');
// // }
// }
// $this->setCalculationButton();
// $this->boardVersion = uniqid();
// }
// public function resetBoard()
// {
// // Alle 21 Zielbays durchlaufen
// for ($i = 1; $i <= 21; $i++) {
// $bayKey = "dest-{$i}";
// if (isset($this->lists[$bayKey]) && ! empty($this->lists[$bayKey])) {
// foreach ($this->lists[$bayKey] as $item) {
// $targetOrigin = $item['origin'];
// // Element zurück in sein Original-Quell-Tab schieben
// if (isset($this->lists[$targetOrigin])) {
// array_unshift($this->lists[$targetOrigin], $item);
// }
// }
// // Die Zielbucht komplett leeren
// $this->lists[$bayKey] = [];
// }
// }
// // Falls Sie die boardVersion-Logik nutzen, erneuern wir sie hier für den DOM-Refresh:
// if (property_exists($this, 'boardVersion')) {
// $this->boardVersion = uniqid();
// }
// // Falls Sie die Javascript-Event/ignore-Logik nutzen, feuern wir das Refresh-Event:
// $this->dispatch('refreshBoard', lists: $this->lists);
// $this->results = [];
// $this->setCalculationButton();
// $this->setCopyButton();
// }
}
+9 -1
View File
@@ -47,7 +47,7 @@ class PlayerCalculator extends Component
$arr = [];
foreach ($player as $val) {
if ($val->details) {
if ($val->details && $val->details->is_active) {
$player_id = $val->ss_player_id;
if (! isset($arr[$player_id])) {
$arr[$player_id]['player_name'] = $val->details->player_name;
@@ -126,7 +126,15 @@ class PlayerCalculator extends Component
'timed_color' => $timed_color,
'events_played' => $events_played,
'everage_minutes' => $everage_minutes,
'position' => '',
'active' => 0,
'gls' => 0,
'crn' => 0,
'fls' => 0,
'ofs' => 0,
'snt' => 0,
'tsh' => 0,
'crd' => 0,
];
}
-284
View File
@@ -1,284 +0,0 @@
<?php
namespace App\Livewire;
use Filament\Actions\Action;
use Filament\Actions\Concerns\InteractsWithActions;
use Filament\Actions\Contracts\HasActions;
use Filament\Schemas\Concerns\InteractsWithSchemas;
use Filament\Schemas\Concerns\RestrictsFileUploadsToSchemaComponents;
use Filament\Schemas\Contracts\HasSchemas;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Tables\Contracts\HasTable;
use Filament\Tables\Table;
use Livewire\Component;
class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTable
{
use InteractsWithActions;
use InteractsWithSchemas;
use InteractsWithTable;
use RestrictsFileUploadsToSchemaComponents;
public array $filters = [];
public array $lists = [];
public array $results = [];
public array $destLabels = ['DR', 'MR', 'RW', 'DC', 'DM', 'MC', 'AM', 'SW', 'DC', 'DM', 'MC', 'AM', 'SM', 'ST', 'DC', 'DM', 'MC', 'AM', 'DL', 'ML', 'LM'];
public string $boardVersion = '';
public bool $copyDisabled = true;
public bool $calculationDisabled = true;
public string $calculationColor = 'gray';
public string $copyColor = 'gray';
public function mount(array $filters)
{
$this->boardVersion = uniqid();
$this->filters = $filters;
$active = [2, 4, 6, 9, 10, 11, 12, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 30, 32, 34];
for ($i = 1; $i <= 35; $i++) {
if (in_array($i, $active))
$this->lists["dest-{$i}"] = [];
else
$this->lists["blind-{$i}"] = [];
}
}
/*
'id' => $player_id,
'name' => $val['player_name'],
'preferred_foot' => $val['preferred_foot'],
'player_position' => $player_position,
'player_color' => $player_color,
'timed_color' => $timed_color,
'events_played' => $events_played,
'everage_minutes' => $everage_minutes,
*/
public function table(Table $table): Table
{
return $table
->headerActions([
Action::make('Close')->icon('phosphor-x')->close()
])
->records(fn(): array => PlayerCalculator::load($this->filters))
->paginated(false)
->striped()
->columns([
TextColumn::make('name')
->sortable()
// ->searchable()
->icon('icon-soccerplayer')
->extraAttributes(fn($record) => [
'data-id' => $record['id'],
'class' => 'sortable-zone',
'style' => 'padding: 4px !important; cursor:pointer; user-select: none;',
'wire:key' => "item-src-" . $record['id'] . "-v-" . $this->boardVersion
]),
])
->filters([
// ...
])
->recordActions([
// ...
])
->toolbarActions([
// ...
]);
}
public function render()
{
return view('livewire.board-dispatcher');
}
public function setCalculationButton()
{
$count = 1;
for ($i = 1; $i <= 35; $i++) {
$bayKey = "dest-{$i}";
if (isset($this->lists[$bayKey]) && ! empty($this->lists[$bayKey])) {
$count++;
}
}
if ($count > 2) {
$this->calculationDisabled = false;
$this->calculationColor = 'info';
} else {
$this->calculationDisabled = true;
$this->calculationColor = 'gray';
}
}
public function setCopyButton()
{
if (\count($this->results) > 0) {
$this->copyDisabled = false;
$this->copyColor = 'info';
} else {
$this->copyDisabled = true;
$this->copyColor = 'gray';
}
}
public function calculate()
{
$this->results = [];
for ($i = 1; $i <= 35; $i++) {
$bayKey = "dest-{$i}";
if (isset($this->lists[$bayKey]) && ! empty($this->lists[$bayKey])) {
$this->results[] = $this->lists[$bayKey][0];
}
}
$this->setCopyButton();
}
public function copyResult()
{
$copystring = '';
foreach ($this->results as $row) {
unset($row['origin']);
unset($row['pcolor']);
unset($row['ecolor']);
unset($row['info']);
$copystring .= implode("\t", $row) . "\n";
}
$this->js("navigator.clipboard.writeText(`$copystring`)");
}
public function moveItem($itemId, $fromList, $toList, $newIndex)
{
$itemId = (string) $itemId;
$newIndex = (int) $newIndex;
if (! $toList || $fromList === $toList || ! isset($this->lists[$fromList]) || ! isset($this->lists[$toList])) {
$this->boardVersion = uniqid();
return;
}
// Limit-Guard: Wenn das Ziel bereits ein Element enthält, abbrechen
if (count($this->lists[$toList]) >= 1) {
$this->boardVersion = uniqid();
return;
}
$foundItem = null;
foreach ($this->lists[$fromList] as $key => $item) {
if ((string) $item['id'] === $itemId) {
$item['position'] = $this->positions($toList);
$foundItem = $item;
unset($this->lists[$fromList][$key]);
$this->lists[$fromList] = array_values($this->lists[$fromList]);
break;
}
}
if ($foundItem) {
array_splice($this->lists[$toList], $newIndex, 0, [$foundItem]);
}
$this->setCalculationButton();
$this->boardVersion = uniqid();
}
public function positions(string $pos)
{
$pos = (int) str_replace('dest-', '', $pos);
$options = [2 => 'DR', 4 => 'MR', 6 => 'RW', 9 => 'DC', 10 => 'DM', 11 => 'MC', 12 => 'AM', 15 => 'SW', 16 => 'DC', 17 => 'DM', 18 => 'MC', 19 => 'AM', 20 => 'SM', 21 => 'ST', 23 => 'DC', 24 => 'DM', 25 => 'MC', 26 => 'AM', 30 => 'DL', 32 => 'ML', 34 => 'LM'];
if (isset($options[$pos]))
return $options[$pos];
else
return $pos;
}
public function returnToOrigin($itemId, $currentListId)
{
$itemId = (string) $itemId;
// Log::info($this->boardVersion);
// Log::info('itemId, currentListId', [$itemId, $currentListId]);
// Log::info('OLD LIST', $this->lists);
if (! isset($this->lists[$currentListId])) {
$this->boardVersion = uniqid();
return;
}
$foundItem = null;
foreach ($this->lists[$currentListId] as $key => $item) {
if ((string) $item['id'] === $itemId) {
$foundItem = $item;
unset($this->lists[$currentListId][$key]);
$this->lists[$currentListId] = array_values($this->lists[$currentListId]);
break;
}
}
if ($foundItem && isset($this->lists[$foundItem['origin']])) {
// Nur zurücklegen, wenn die Quelle wirklich frei ist
array_unshift($this->lists[$foundItem['origin']], $foundItem);
// if (count($this->lists[$foundItem['origin']]) < 2) {
// Log::info('origin');
// array_unshift($this->lists[$foundItem['origin']], $foundItem);
// } else {
// // Ausfallsicherheit gegen Datenverlust: Zurück in die Bucht schieben
// array_unshift($this->lists[$currentListId], $foundItem);
// Log::info('box');
// }
}
$this->setCalculationButton();
$this->boardVersion = uniqid();
}
public function resetBoard()
{
// Alle 21 Zielbays durchlaufen
for ($i = 1; $i <= 21; $i++) {
$bayKey = "dest-{$i}";
if (isset($this->lists[$bayKey]) && ! empty($this->lists[$bayKey])) {
foreach ($this->lists[$bayKey] as $item) {
$targetOrigin = $item['origin'];
// Element zurück in sein Original-Quell-Tab schieben
if (isset($this->lists[$targetOrigin])) {
array_unshift($this->lists[$targetOrigin], $item);
}
}
// Die Zielbucht komplett leeren
$this->lists[$bayKey] = [];
}
}
// Falls Sie die boardVersion-Logik nutzen, erneuern wir sie hier für den DOM-Refresh:
if (property_exists($this, 'boardVersion')) {
$this->boardVersion = uniqid();
}
// Falls Sie die Javascript-Event/ignore-Logik nutzen, feuern wir das Refresh-Event:
$this->dispatch('refreshBoard', lists: $this->lists);
$this->results = [];
$this->setCalculationButton();
$this->setCopyButton();
}
}
Generated
+98 -94
View File
@@ -602,16 +602,16 @@
},
{
"name": "carbonphp/carbon-doctrine-types",
"version": "3.2.0",
"version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/CarbonPHP/carbon-doctrine-types.git",
"reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d"
"reference": "5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d",
"reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d",
"url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc",
"reference": "5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc",
"shasum": ""
},
"require": {
@@ -626,6 +626,11 @@
"phpunit/phpunit": "^10.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Carbon\\Doctrine\\": "src/Carbon/Doctrine/"
@@ -651,7 +656,7 @@
],
"support": {
"issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues",
"source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0"
"source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.1"
},
"funding": [
{
@@ -667,7 +672,7 @@
"type": "tidelift"
}
],
"time": "2024-02-09T16:56:22+00:00"
"time": "2026-09-06T14:11:38+00:00"
},
{
"name": "chillerlan/php-qrcode",
@@ -1579,16 +1584,16 @@
},
{
"name": "filament/actions",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/actions.git",
"reference": "cc84d88a7318eb1faae39cb5f36191ccc3b81334"
"reference": "2a85c76d75854c5a633ea162ae541af6f9205f21"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/actions/zipball/cc84d88a7318eb1faae39cb5f36191ccc3b81334",
"reference": "cc84d88a7318eb1faae39cb5f36191ccc3b81334",
"url": "https://api.github.com/repos/filamentphp/actions/zipball/2a85c76d75854c5a633ea162ae541af6f9205f21",
"reference": "2a85c76d75854c5a633ea162ae541af6f9205f21",
"shasum": ""
},
"require": {
@@ -1624,24 +1629,25 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:03:02+00:00"
"time": "2026-09-07T18:43:33+00:00"
},
{
"name": "filament/filament",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/panels.git",
"reference": "16adb1532c639739944a2acea959e16ac100e093"
"reference": "dee3b8fb5432420386aa27af06151239200f020e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/panels/zipball/16adb1532c639739944a2acea959e16ac100e093",
"reference": "16adb1532c639739944a2acea959e16ac100e093",
"url": "https://api.github.com/repos/filamentphp/panels/zipball/dee3b8fb5432420386aa27af06151239200f020e",
"reference": "dee3b8fb5432420386aa27af06151239200f020e",
"shasum": ""
},
"require": {
"chillerlan/php-qrcode": "^5.0",
"composer-runtime-api": "^2.1",
"filament/actions": "self.version",
"filament/forms": "self.version",
"filament/infolists": "self.version",
@@ -1681,20 +1687,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:09:06+00:00"
"time": "2026-09-07T18:43:32+00:00"
},
{
"name": "filament/forms",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/forms.git",
"reference": "ea0a0ee11efca648a043f9b3ff4113e54dadb7b0"
"reference": "f066cb545466d5c6a8b208a7485bd21512ffb76e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/forms/zipball/ea0a0ee11efca648a043f9b3ff4113e54dadb7b0",
"reference": "ea0a0ee11efca648a043f9b3ff4113e54dadb7b0",
"url": "https://api.github.com/repos/filamentphp/forms/zipball/f066cb545466d5c6a8b208a7485bd21512ffb76e",
"reference": "f066cb545466d5c6a8b208a7485bd21512ffb76e",
"shasum": ""
},
"require": {
@@ -1731,20 +1737,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:04:14+00:00"
"time": "2026-09-07T18:42:41+00:00"
},
{
"name": "filament/infolists",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/infolists.git",
"reference": "0a8ca9b6cc60f7179de87b0ad9c2f787bbbd2d29"
"reference": "6ebe9b6831c82ca8eab131e41317648d0482fce0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/0a8ca9b6cc60f7179de87b0ad9c2f787bbbd2d29",
"reference": "0a8ca9b6cc60f7179de87b0ad9c2f787bbbd2d29",
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/6ebe9b6831c82ca8eab131e41317648d0482fce0",
"reference": "6ebe9b6831c82ca8eab131e41317648d0482fce0",
"shasum": ""
},
"require": {
@@ -1776,20 +1782,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:09:57+00:00"
"time": "2026-09-07T18:43:33+00:00"
},
{
"name": "filament/notifications",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/notifications.git",
"reference": "95d7d4730152353fbcd7365ee890022707382de7"
"reference": "a42cb3e6b217a5478bf974dbe4880daed2033cfd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/notifications/zipball/95d7d4730152353fbcd7365ee890022707382de7",
"reference": "95d7d4730152353fbcd7365ee890022707382de7",
"url": "https://api.github.com/repos/filamentphp/notifications/zipball/a42cb3e6b217a5478bf974dbe4880daed2033cfd",
"reference": "a42cb3e6b217a5478bf974dbe4880daed2033cfd",
"shasum": ""
},
"require": {
@@ -1823,20 +1829,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:08:43+00:00"
"time": "2026-09-07T18:43:33+00:00"
},
{
"name": "filament/query-builder",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/query-builder.git",
"reference": "900b00b9dd5162c929aee540888c66883e7dd832"
"reference": "311c5015b529043e229beeb1c8a54b95f2180f00"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/query-builder/zipball/900b00b9dd5162c929aee540888c66883e7dd832",
"reference": "900b00b9dd5162c929aee540888c66883e7dd832",
"url": "https://api.github.com/repos/filamentphp/query-builder/zipball/311c5015b529043e229beeb1c8a54b95f2180f00",
"reference": "311c5015b529043e229beeb1c8a54b95f2180f00",
"shasum": ""
},
"require": {
@@ -1869,20 +1875,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:03:51+00:00"
"time": "2026-09-07T18:43:22+00:00"
},
{
"name": "filament/schemas",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/schemas.git",
"reference": "890fa9f369267f8a002ec6ea2313586b1f54cddb"
"reference": "ed0d42475497567a5b32d1b1a49c5ae9cfe3b73d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/890fa9f369267f8a002ec6ea2313586b1f54cddb",
"reference": "890fa9f369267f8a002ec6ea2313586b1f54cddb",
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/ed0d42475497567a5b32d1b1a49c5ae9cfe3b73d",
"reference": "ed0d42475497567a5b32d1b1a49c5ae9cfe3b73d",
"shasum": ""
},
"require": {
@@ -1914,24 +1920,25 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:09:38+00:00"
"time": "2026-09-07T18:43:53+00:00"
},
{
"name": "filament/support",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/support.git",
"reference": "db044fa876c998aa55b867f5774a4eb5b42c75ea"
"reference": "1feb02e2535bdcab7e6acbf9e56ca1f5411ed24a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/support/zipball/db044fa876c998aa55b867f5774a4eb5b42c75ea",
"reference": "db044fa876c998aa55b867f5774a4eb5b42c75ea",
"url": "https://api.github.com/repos/filamentphp/support/zipball/1feb02e2535bdcab7e6acbf9e56ca1f5411ed24a",
"reference": "1feb02e2535bdcab7e6acbf9e56ca1f5411ed24a",
"shasum": ""
},
"require": {
"blade-ui-kit/blade-heroicons": "^2.5",
"composer-runtime-api": "^2.1",
"danharrin/livewire-rate-limiting": "^2.0",
"ext-intl": "*",
"illuminate/contracts": "^11.28|^12.0|^13.0",
@@ -1972,20 +1979,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-09-01T08:40:00+00:00"
"time": "2026-09-07T18:43:52+00:00"
},
{
"name": "filament/tables",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/tables.git",
"reference": "71c498959168c0a60b6cbe754c216a3a1f0ec623"
"reference": "758e62c4f4690a1e1faedd7348e18c44b8145488"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/tables/zipball/71c498959168c0a60b6cbe754c216a3a1f0ec623",
"reference": "71c498959168c0a60b6cbe754c216a3a1f0ec623",
"url": "https://api.github.com/repos/filamentphp/tables/zipball/758e62c4f4690a1e1faedd7348e18c44b8145488",
"reference": "758e62c4f4690a1e1faedd7348e18c44b8145488",
"shasum": ""
},
"require": {
@@ -2018,20 +2025,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:09:20+00:00"
"time": "2026-09-07T18:44:28+00:00"
},
{
"name": "filament/widgets",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/widgets.git",
"reference": "ce0718e8c0aced904fb9f09be03f4fb33f8dcde6"
"reference": "20e52cc560b591d2e3cc01bf4a5e9aca8f176476"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/widgets/zipball/ce0718e8c0aced904fb9f09be03f4fb33f8dcde6",
"reference": "ce0718e8c0aced904fb9f09be03f4fb33f8dcde6",
"url": "https://api.github.com/repos/filamentphp/widgets/zipball/20e52cc560b591d2e3cc01bf4a5e9aca8f176476",
"reference": "20e52cc560b591d2e3cc01bf4a5e9aca8f176476",
"shasum": ""
},
"require": {
@@ -2062,7 +2069,7 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-08-31T17:10:07+00:00"
"time": "2026-09-07T18:43:09+00:00"
},
{
"name": "fruitcake/php-cors",
@@ -3357,16 +3364,16 @@
},
{
"name": "league/commonmark",
"version": "2.10.0",
"version": "2.10.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "d2d1aa8b35e072966c89bc0c66cf926e56767dc4"
"reference": "9d489ab67a02960fd8ffe624d93f751daf95439e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d2d1aa8b35e072966c89bc0c66cf926e56767dc4",
"reference": "d2d1aa8b35e072966c89bc0c66cf926e56767dc4",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/9d489ab67a02960fd8ffe624d93f751daf95439e",
"reference": "9d489ab67a02960fd8ffe624d93f751daf95439e",
"shasum": ""
},
"require": {
@@ -3460,7 +3467,7 @@
"type": "tidelift"
}
],
"time": "2026-08-11T16:06:25+00:00"
"time": "2026-09-07T13:44:26+00:00"
},
{
"name": "league/config",
@@ -4091,16 +4098,16 @@
},
{
"name": "livewire/livewire",
"version": "v4.4.3",
"version": "v4.4.4",
"source": {
"type": "git",
"url": "https://github.com/livewire/livewire.git",
"reference": "92f1427022714b34024459167aa6a85d4fb4af44"
"reference": "00bf1b9959807d7cbcf38fc088515a7261cb6fa8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/livewire/zipball/92f1427022714b34024459167aa6a85d4fb4af44",
"reference": "92f1427022714b34024459167aa6a85d4fb4af44",
"url": "https://api.github.com/repos/livewire/livewire/zipball/00bf1b9959807d7cbcf38fc088515a7261cb6fa8",
"reference": "00bf1b9959807d7cbcf38fc088515a7261cb6fa8",
"shasum": ""
},
"require": {
@@ -4155,7 +4162,7 @@
"description": "A front-end framework for Laravel.",
"support": {
"issues": "https://github.com/livewire/livewire/issues",
"source": "https://github.com/livewire/livewire/tree/v4.4.3"
"source": "https://github.com/livewire/livewire/tree/v4.4.4"
},
"funding": [
{
@@ -4163,7 +4170,7 @@
"type": "github"
}
],
"time": "2026-08-31T15:40:58+00:00"
"time": "2026-09-07T16:02:43+00:00"
},
{
"name": "maennchen/zipstream-php",
@@ -4705,24 +4712,24 @@
},
{
"name": "mongodb/mongodb",
"version": "2.2.0",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/mongodb/mongo-php-library.git",
"reference": "bbb13f969e37e047fd822527543df55fdc1c9298"
"url": "https://github.com/mongodb/mongo-php-library",
"reference": "12e56461166d915e3dd8e4969ad0940ed5207d88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/bbb13f969e37e047fd822527543df55fdc1c9298",
"reference": "bbb13f969e37e047fd822527543df55fdc1c9298",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/12e56461166d915e3dd8e4969ad0940ed5207d88",
"reference": "12e56461166d915e3dd8e4969ad0940ed5207d88",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2.0",
"ext-mongodb": "^2.2",
"ext-mongodb": "^2.3",
"php": "^8.1",
"psr/log": "^1.1.4|^2|^3",
"symfony/polyfill-php85": "^1.32"
"symfony/polyfill-php85": "^1.33"
},
"replace": {
"mongodb/builder": "*"
@@ -4774,11 +4781,7 @@
"mongodb",
"persistence"
],
"support": {
"issues": "https://github.com/mongodb/mongo-php-library/issues",
"source": "https://github.com/mongodb/mongo-php-library/tree/2.2.0"
},
"time": "2026-02-11T11:39:56+00:00"
"time": "2026-04-28T12:50:06+00:00"
},
{
"name": "monolog/monolog",
@@ -10589,19 +10592,20 @@
},
{
"name": "filament/upgrade",
"version": "v5.7.8",
"version": "v5.8.0",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/upgrade.git",
"reference": "1dec8fe9a7d36892dfaca9460f640c4c9fb2dc2c"
"reference": "5a53f0e8aea7b76f6641d846b8f44fee78e17dfa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/upgrade/zipball/1dec8fe9a7d36892dfaca9460f640c4c9fb2dc2c",
"reference": "1dec8fe9a7d36892dfaca9460f640c4c9fb2dc2c",
"url": "https://api.github.com/repos/filamentphp/upgrade/zipball/5a53f0e8aea7b76f6641d846b8f44fee78e17dfa",
"reference": "5a53f0e8aea7b76f6641d846b8f44fee78e17dfa",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2.1",
"nunomaduro/termwind": "^2.0",
"php": "^8.2",
"rector/rector": "^2.0"
@@ -10625,7 +10629,7 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-20T17:21:47+00:00"
"time": "2026-09-07T18:43:54+00:00"
},
{
"name": "filp/whoops",
@@ -10895,16 +10899,16 @@
},
{
"name": "laravel/pint",
"version": "v1.30.5",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "fe4148c503a0e266353d61396b79bbf7f35122df"
"reference": "0730363418ad06a7b267d8f2a4f87eed0ab7f610"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/fe4148c503a0e266353d61396b79bbf7f35122df",
"reference": "fe4148c503a0e266353d61396b79bbf7f35122df",
"url": "https://api.github.com/repos/laravel/pint/zipball/0730363418ad06a7b267d8f2a4f87eed0ab7f610",
"reference": "0730363418ad06a7b267d8f2a4f87eed0ab7f610",
"shasum": ""
},
"require": {
@@ -10916,13 +10920,13 @@
},
"require-dev": {
"composer/semver": "^3.4.4",
"friendsofphp/php-cs-fixer": "^3.95.18",
"illuminate/view": "^13.24.0",
"larastan/larastan": "^3.10.0",
"friendsofphp/php-cs-fixer": "^3.95.24",
"illuminate/view": "^13.30.1",
"larastan/larastan": "^3.11.0",
"laravel-zero/framework": "^13.0.0",
"laravel/agent-detector": "^2.0.2",
"laravel/prompts": "^0.3.22",
"mockery/mockery": "^1.6.12",
"laravel/prompts": "^0.3.24",
"mockery/mockery": "^1.6.15",
"nunomaduro/termwind": "^2.4.0",
"pestphp/pest": "^4.7.8"
},
@@ -10961,7 +10965,7 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2026-08-10T15:35:50+00:00"
"time": "2026-09-07T15:03:30+00:00"
},
{
"name": "laravel/sail",
+6 -6
View File
@@ -19,9 +19,9 @@
}
},
"node_modules/@alpinejs/sort": {
"version": "3.17.1",
"resolved": "https://registry.npmjs.org/@alpinejs/sort/-/sort-3.17.1.tgz",
"integrity": "sha512-Q6qF00WI4cQAZdIxPgbsHnxZIiIv4T1kfSPyEy2QB/SLhLdISuIjzTBa3TQAe1P45BkRtNk5Y8fQuDZuKhN/6w==",
"version": "3.17.2",
"resolved": "https://registry.npmjs.org/@alpinejs/sort/-/sort-3.17.2.tgz",
"integrity": "sha512-72v63zuFkepgO2nwi8wNrD1z6pAY3S+d+lCwSZ9Q39hkIFISxPXKffEh3qtTu7Dzlc98EYLz4kVS/pxp3mdw5g==",
"license": "MIT",
"dependencies": {
"sortablejs": "^1.15.2"
@@ -2256,9 +2256,9 @@
}
},
"node_modules/prettier-plugin-blade": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/prettier-plugin-blade/-/prettier-plugin-blade-3.3.2.tgz",
"integrity": "sha512-bw5bWD+C0Xj1jd+wcOcU5fh4EVtD0ZzWKeEL276kmA5j7k2KfX5lGQgj/C+SFU9Ga4PcoOdJ7k9dJUCC5DkoNQ==",
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/prettier-plugin-blade/-/prettier-plugin-blade-3.3.3.tgz",
"integrity": "sha512-ZjilA3czAFLSdGjM/F+T8jlXv20vSI7zb6ZqfVp3vX/+313mFZspuPz2DHN26xemjgOfW5mnyuOXjBvY399gsA==",
"license": "MIT",
"dependencies": {
"@prettier/html-tags": "^2.2.0",
@@ -9,33 +9,36 @@
'timed_color' => $timed_color,
'events_played' => $events_played,
'everage_minutes' => $everage_minutes,
style="opacity:0.25 !important;"
*/
@endphp
@if ($record['active'])
<div draggable="false"
class="w-full mt-1 p-1 cursor-grab active:cursor-grabbing border border-gray-300 rounded hover:border-primary-500 transition-colors grid grid-cols-7 items-center gap-1"
style="opacity:0.25 !important;">
<div>
<x-filament::badge color="{{ $record['player_color'] }}">
{{ strtoupper($record['player_position']) }}
class="w-full text-xs mt-1 p-1 select-none border border-gray-300 rounded hover:border-primary-500 transition-colors flex justify-end content-center items-center gap-1">
<div class="w-86 text-[11px] min-w-86 text-center grid grid-cols-11 content-center items-center gap-1">
<div class="bg-gray-200">{{ $record['preferred_foot'] }}</div>
<div class="bg-gray-200">{{ $record['events_played'] }}</div>
<div class="bg-gray-200">{{ $record['everage_minutes'] }}</div>
<div class="bg-blue-100">{{ $record['gls'] }}</div>
<div class="bg-blue-100">{{ $record['crn'] }}</div>
<div class="bg-blue-100">{{ $record['fls'] }}</div>
<div class="bg-blue-100">{{ $record['ofs'] }}</div>
<div class="bg-blue-100">{{ $record['snt'] }}</div>
<div class="bg-blue-100">{{ $record['tsh'] }}</div>
<div class="bg-blue-100">{{ $record['crd'] }}</div>
<div class="bg-black text-white rounded font-bold">{{ $record['position'] }}</div>
</div>
<div class="w-18 font-stretch-ultra-condensed">
<x-filament::badge size="sm" color="{{ $record['player_color'] }}">
{{ ucfirst($record['player_position']) }}
</x-filament::badge>
</div>
<div class="text-left font-medium dark:text-white col-span-3">
<div class="text-left font-bold tracking-tight flex-1">
{{ $record['name'] }}
</div>
<div class="text-xs">
{{ $record['preferred_foot'] }},
Ev {{ $record['events_played'] }},
Av {{ $record['everage_minutes'] }}min
<div class="w-8 flex justify-end">
<x-phosphor-map-pin class="h-5 w-5 text-orange-500" />
</div>
<div class="flex justify-end row-span-2">
</div>
<div class="bg-gray-100 text-xs text-center">Goal: 0.13</div>
<div class="bg-gray-100 text-xs text-center">Card: 0.41</div>
<div class="bg-gray-100 text-xs text-center">Foul: 0.41</div>
<div class="bg-gray-100 text-xs text-center">Goal: 0.13</div>
<div class="bg-gray-100 text-xs text-center">Card: 0.41</div>
<div class="bg-gray-100 text-xs text-center">Foul: 0.41</div>
</div>
@else
<div draggable="true"
@@ -43,28 +46,30 @@
e.dataTransfer.effectAllowed = 'copy';
e.dataTransfer.setData('text/plain', JSON.stringify({ id: {{ $record['id'] }} }));
}"
class="w-full mt-1 p-1 cursor-grab active:cursor-grabbing border border-gray-300 rounded hover:border-primary-500 transition-colors grid grid-cols-7 items-center gap-1">
<div>
<x-filament::badge color="{{ $record['player_color'] }}">
{{ strtoupper($record['player_position']) }}
class="w-full text-xs mt-1 p-1 select-none cursor-grab active:cursor-grabbing border border-gray-300 rounded hover:border-primary-500 transition-colors flex justify-end content-center items-center gap-1">
<div class="w-86 text-[11px] min-w-86 text-center grid grid-cols-11 content-center items-center gap-1">
<div class="bg-gray-200">{{ $record['preferred_foot'] }}</div>
<div class="bg-gray-200">{{ $record['events_played'] }}</div>
<div class="bg-gray-200">{{ $record['everage_minutes'] }}</div>
<div class="bg-blue-100">{{ $record['gls'] }}</div>
<div class="bg-blue-100">{{ $record['crn'] }}</div>
<div class="bg-blue-100">{{ $record['fls'] }}</div>
<div class="bg-blue-100">{{ $record['ofs'] }}</div>
<div class="bg-blue-100">{{ $record['snt'] }}</div>
<div class="bg-blue-100">{{ $record['tsh'] }}</div>
<div class="bg-blue-100">{{ $record['crd'] }}</div>
<div class="bg-black text-white rounded font-bold">{{ $record['position'] }}</div>
</div>
<div class="w-18 font-stretch-ultra-condensed">
<x-filament::badge size="sm" color="{{ $record['player_color'] }}">
{{ ucfirst($record['player_position']) }}
</x-filament::badge>
</div>
<div class="text-left font-medium dark:text-white col-span-3">
<div class="text-left font-bold tracking-tight flex-1">
{{ $record['name'] }}
</div>
<div class="text-xs col-span-2">
{{ $record['preferred_foot'] }},
Ev {{ $record['events_played'] }},
Av {{ $record['everage_minutes'] }}min
</div>
<div class="flex justify-end row-span-2 p-1">
<div class="w-8 flex justify-end">
<x-phosphor-dots-six-vertical class="h-5 w-5" />
</div>
<div class="bg-gray-100 text-xs text-center">Goal: 0.13</div>
<div class="bg-gray-100 text-xs text-center">Card: 0.41</div>
<div class="bg-gray-100 text-xs text-center">Foul: 0.41</div>
<div class="bg-gray-100 text-xs text-center">Goal: 0.13</div>
<div class="bg-gray-100 text-xs text-center">Card: 0.41</div>
<div class="bg-gray-100 text-xs text-center">Foul: 0.41</div>
</div>
@endif
@@ -1,7 +1,7 @@
@php
use Illuminate\Support\Facades\Log;
@endphp
<div class="grid grid-cols-3 gap-3 p-10">
<div class="grid grid-cols-3 gap-3">
<div class="dispatcher-board-root">
{{ $this->table }}
</div>
@@ -22,11 +22,12 @@
"
:class="isOver ? 'border-primary-500 bg-primary-500/10 ring-2 ring-primary-500/50 scale-[1.02]' :
'border-gray-800 bg-white/30'"
class="border rounded-xl p-2 transition-all flex flex-col justify-start shadow-2xs transform">
class="border rounded-xl transition-all pt-0 flex flex-col justify-start shadow-2xs transform">
<!-- Box Header -->
<div
class="flex justify-between items-center border-b border-gray-100 dark:border-gray-800 p-1">
<div class="border bg-white p-1 text-md m-1 rounded">
class="grid grid-cols-6 items-center border-b p-1">
<div></div>
<div class="w-16 text-center mx-auto bg-black text-white p-1 text-xl font-black rounded col-span-4">
{{ $benennung }}
</div>
@@ -38,7 +39,7 @@
<!-- Box Inhalt -->
@if ($boxes[$boxNumber])
<div class="border bg-white p-1 m-1 rounded leading-5">
<div class="border bg-white p-2 m-2 rounded leading-5">
{{ $boxes[$boxNumber]['name'] }}
</div>
@endif
@@ -1,103 +0,0 @@
<x-filament-panels::page>
<!-- Zentraler Alpine-Zustand für das Modal-Handling -->
<div x-data="{ isOpen: false }" @open-kanban-modal.window="isOpen = true" class="space-y-6">
<!-- Steuerungsbar -->
<div
class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 bg-white dark:bg-gray-900 p-5 rounded-xl border border-gray-200 dark:border-gray-800 shadow-xs">
<div>
<h2 class="text-base font-bold text-gray-900 dark:text-white">Elemente-Kopierer (v5)</h2>
<p class="text-xs text-gray-500 dark:text-gray-400">Ziehe einen Eintrag aus der Tabelle. Das Ziel-Modal
öffnet sich synchron beim Ziehen.</p>
</div>
<x-filament::button type="button" icon="heroicon-o-squares-2x2" @click="isOpen = true">
Slots manuell öffnen (21 Boxen)
</x-filament::button>
</div>
<!-- Filament v5 Datenquelle -->
<div class="bg-white dark:bg-gray-900 rounded-xl shadow-xs border border-gray-200 dark:border-gray-800 p-4">
{{ $this->table }}
</div>
<!-- Filament v5 Modal-Komponente -->
<x-filament::modal id="kanban-boxes-modal" x-model="isOpen" width="7xl">
<x-slot name="heading">
<div class="flex items-center gap-2 text-gray-900 dark:text-white">
<x-heroicon-o-tray class="h-5 w-5 text-gray-400" />
<span>Ziel-Matrix (21 Slots)</span>
</div>
</x-slot>
<x-slot name="description">
Lass das gezogene Element über der gewünschten Box los, um eine Kopie zuzuweisen.
</x-slot>
<!-- 21 Boxen Grid (Verwendet optimierte Responsive-Spalten) -->
<div
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-7 gap-3 my-4 max-h-[65vh] overflow-y-auto p-1">
@foreach ($boxes as $boxNumber => $items)
<div x-data="{ isOver: false }" @dragover.prevent="isOver = true" @dragenter.prevent="isOver = true"
@dragleave.prevent="isOver = false"
@drop.prevent="
isOver = false;
const rawData = $event.dataTransfer.getData('text/plain');
if (rawData) {
const elementData = JSON.parse(rawData);
// Nutzt die direkte Livewire v4 Brücke über das Proxy-Objekt ($wire)
$wire.dispatch('element-dropped-in-box', { elementData: elementData, boxNumber: {{ $boxNumber }} });
}
"
:class="isOver ? 'border-primary-500 bg-primary-500/10 ring-2 ring-primary-500/50 scale-[1.03]' :
'border-gray-200 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-950/50'"
class="border rounded-xl p-3 min-h-[110px] transition-all flex flex-col justify-between shadow-2xs transform">
<!-- Box Kopfzeile -->
<div
class="flex justify-between items-center border-b border-gray-200/50 dark:border-gray-800 pb-1 mb-2">
<span
class="text-[10px] font-bold px-1.5 py-0.5 rounded bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 text-gray-500 dark:text-gray-400">
Box {{ $boxNumber }}
</span>
@if (count($items) > 0)
<button type="button" wire:click="clearBox({{ $boxNumber }})"
class="text-[10px] text-danger-600 hover:text-danger-500 font-semibold transition-colors">
Leeren
</button>
@endif
</div>
<!-- Listen-Inhalt der Box -->
<div class="space-y-1 flex-grow overflow-y-auto max-h-[80px]">
@forelse($items as $item)
<div
class="px-2 py-1 bg-white dark:bg-gray-900 border border-gray-100 dark:border-gray-800/80 rounded shadow-3xs text-[10px] flex flex-col">
<span class="font-medium text-gray-800 dark:text-gray-200 truncate">
{{ $item['title'] }}
</span>
<span class="text-[9px] text-gray-400 dark:text-gray-500">ID:
{{ $item['id'] }}</span>
</div>
@empty
<div
class="h-full flex items-center justify-center py-4 text-center text-gray-400 dark:text-gray-600 text-[10px] italic">
Bereit
</div>
@endforelse
</div>
</div>
@endforeach
</div>
<x-slot name="footer">
<div class="flex justify-end">
<x-filament::button color="gray" @click="isOpen = false">
Schließen
</x-filament::button>
</div>
</x-slot>
</x-filament::modal>
</div>
</x-filament-panels::page>