wip calculatore

This commit is contained in:
salam committed 2026-09-08 09:54:18 +02:00
1 parent 29de0c2c6c
commit 272e5b7d3a
6 files changed
+56 -53

No files matched your search

+9 -9
View File
@@ -66,11 +66,8 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
public function getHeadingTable(): HtmlString public function getHeadingTable(): HtmlString
{ {
return new HtmlString('<div class="text-xl w-full">'.$this->ss_team_name.'</div> 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 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>Gls</div>
<div>Crn</div> <div>Crn</div>
<div>Fls</div> <div>Fls</div>
@@ -78,6 +75,9 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
<div>Snt</div> <div>Snt</div>
<div>Tsh</div> <div>Tsh</div>
<div>Crd</div> <div>Crd</div>
<div>Foot</div>
<div>Evt</div>
<div>Øm</div>
</div>'); </div>');
} }
@@ -90,15 +90,15 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
->close(), ->close(),
Action::make('reset') Action::make('reset')
->icon('phosphor-arrows-clockwise') ->icon('phosphor-arrows-clockwise')
->action(fn () => $this->clearAll()), ->action(fn() => $this->clearAll()),
Action::make('calculate') Action::make('calculate')
->icon('phosphor-calculator') ->icon('phosphor-calculator')
->disabled($this->calculationDisabled) ->disabled($this->calculationDisabled)
->action(fn () => $this->calculateAspg()), ->action(fn() => $this->calculateAspg()),
Action::make('download') Action::make('download')
->icon('phosphor-download') ->icon('phosphor-download')
->disabled($this->downloadDisabled) ->disabled($this->downloadDisabled)
->action(fn () => $this->downloadResult()), ->action(fn() => $this->downloadResult()),
]) ])
/** /**
* WICHTIG: Da Filament v5 zwingend eine Query braucht, nutzen wir ein * WICHTIG: Da Filament v5 zwingend eine Query braucht, nutzen wir ein
@@ -112,7 +112,7 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
->columns([ ->columns([
ViewColumn::make('drag_card') ViewColumn::make('drag_card')
->columnSpanFull() ->columnSpanFull()
->label(fn () => $this->getHeadingTable()) ->label(fn() => $this->getHeadingTable())
->view('filament.tables.columns.drag-card'), ->view('filament.tables.columns.drag-card'),
]) ])
->filters([ ->filters([
@@ -214,7 +214,7 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
unset($row['pcolor']); unset($row['pcolor']);
unset($row['ecolor']); unset($row['ecolor']);
unset($row['info']); unset($row['info']);
$copystring .= implode("\t", $row)."\n"; $copystring .= implode("\t", $row) . "\n";
} }
$this->js("navigator.clipboard.writeText(`$copystring`)"); $this->js("navigator.clipboard.writeText(`$copystring`)");
} }
Generated
+12 -8
View File
@@ -4712,24 +4712,24 @@
}, },
{ {
"name": "mongodb/mongodb", "name": "mongodb/mongodb",
"version": "2.3.0", "version": "2.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/mongodb/mongo-php-library", "url": "https://github.com/mongodb/mongo-php-library.git",
"reference": "12e56461166d915e3dd8e4969ad0940ed5207d88" "reference": "bbb13f969e37e047fd822527543df55fdc1c9298"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/12e56461166d915e3dd8e4969ad0940ed5207d88", "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/bbb13f969e37e047fd822527543df55fdc1c9298",
"reference": "12e56461166d915e3dd8e4969ad0940ed5207d88", "reference": "bbb13f969e37e047fd822527543df55fdc1c9298",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer-runtime-api": "^2.0", "composer-runtime-api": "^2.0",
"ext-mongodb": "^2.3", "ext-mongodb": "^2.2",
"php": "^8.1", "php": "^8.1",
"psr/log": "^1.1.4|^2|^3", "psr/log": "^1.1.4|^2|^3",
"symfony/polyfill-php85": "^1.33" "symfony/polyfill-php85": "^1.32"
}, },
"replace": { "replace": {
"mongodb/builder": "*" "mongodb/builder": "*"
@@ -4781,7 +4781,11 @@
"mongodb", "mongodb",
"persistence" "persistence"
], ],
"time": "2026-04-28T12:50:06+00:00" "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"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

+1 -1
View File
@@ -4,7 +4,7 @@
@source '../../../../resources/views/livewire/*'; @source '../../../../resources/views/livewire/*';
@source '../../../../resources/views/filament/**/*'; @source '../../../../resources/views/filament/**/*';
@source '../../../../resources/views/filament/modals/**/*'; @source '../../../../resources/views/filament/modals/**/*';
@source '../../../../resources/views/filament/tables/**/*'; @source '../../../../resources/views/filament/tables/columns/**/*';
@source '../../../../resources/views/components/**/*'; @source '../../../../resources/views/components/**/*';
@source '../../../../vendor/awcodes/light-switch/resources/**/*.blade.php'; @source '../../../../vendor/awcodes/light-switch/resources/**/*.blade.php';
@source '../../../../vendor/guava/filament-modal-relation-managers/resources/**/*'; @source '../../../../vendor/guava/filament-modal-relation-managers/resources/**/*';
@@ -14,30 +14,29 @@
@endphp @endphp
@if ($record['active']) @if ($record['active'])
<div draggable="false" <div draggable="false"
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"> class="border dark:border-gray-600 border-gray-200 w-full text-xs mt-1 p-1 select-none rounded 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="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="text-blue-500 dark:text-blue-600">{{ $record['gls'] }}</div>
<div class="bg-gray-200">{{ $record['events_played'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['crn'] }}</div>
<div class="bg-gray-200">{{ $record['everage_minutes'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['fls'] }}</div>
<div class="bg-blue-100">{{ $record['gls'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['ofs'] }}</div>
<div class="bg-blue-100">{{ $record['crn'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['snt'] }}</div>
<div class="bg-blue-100">{{ $record['fls'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['tsh'] }}</div>
<div class="bg-blue-100">{{ $record['ofs'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['crd'] }}</div>
<div class="bg-blue-100">{{ $record['snt'] }}</div> <div>{{ $record['preferred_foot'] }}</div>
<div class="bg-blue-100">{{ $record['tsh'] }}</div> <div>{{ $record['events_played'] }}</div>
<div class="bg-blue-100">{{ $record['crd'] }}</div> <div>{{ $record['everage_minutes'] }}</div>
<div class="bg-black text-white rounded font-bold">{{ $record['position'] }}</div> <div class="bg-black text-white rounded font-bold">{{ $record['position'] }}</div>
</div> </div>
<div class="w-18 font-stretch-ultra-condensed"> <div class="w-18 font-stretch-ultra-condensed">
<x-filament::badge size="sm" color="{{ $record['player_color'] }}"> <x-filament::badge size="sm" color="{{ $record['player_color'] }}">
{{ ucfirst($record['player_position']) }} {{ ucfirst($record['player_position']) }}
</x-filament::badge> </x-filament::badge>
</div> </div>
<div class="text-left font-bold tracking-tight flex-1"> <div class="text-left font-bold tracking-tight flex-1 text-red-500">
{{ $record['name'] }} {{ $record['name'] }}
</div> </div>
<div class="w-8 flex justify-end"> <div class="w-8 flex justify-end">
<x-phosphor-map-pin class="h-5 w-5 text-orange-500" />
</div> </div>
</div> </div>
@else @else
@@ -46,18 +45,18 @@
e.dataTransfer.effectAllowed = 'copy'; e.dataTransfer.effectAllowed = 'copy';
e.dataTransfer.setData('text/plain', JSON.stringify({ id: {{ $record['id'] }} })); e.dataTransfer.setData('text/plain', JSON.stringify({ id: {{ $record['id'] }} }));
}" }"
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"> class="border dark:border-gray-600 border-gray-200 w-full text-xs mt-1 p-1 select-none cursor-grab active:cursor-grabbing rounded 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="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="text-blue-500 dark:text-blue-600">{{ $record['gls'] }}</div>
<div class="bg-gray-200">{{ $record['events_played'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['crn'] }}</div>
<div class="bg-gray-200">{{ $record['everage_minutes'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['fls'] }}</div>
<div class="bg-blue-100">{{ $record['gls'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['ofs'] }}</div>
<div class="bg-blue-100">{{ $record['crn'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['snt'] }}</div>
<div class="bg-blue-100">{{ $record['fls'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['tsh'] }}</div>
<div class="bg-blue-100">{{ $record['ofs'] }}</div> <div class="text-blue-500 dark:text-blue-600">{{ $record['crd'] }}</div>
<div class="bg-blue-100">{{ $record['snt'] }}</div> <div>{{ $record['preferred_foot'] }}</div>
<div class="bg-blue-100">{{ $record['tsh'] }}</div> <div>{{ $record['events_played'] }}</div>
<div class="bg-blue-100">{{ $record['crd'] }}</div> <div>{{ $record['everage_minutes'] }}</div>
<div class="bg-black text-white rounded font-bold">{{ $record['position'] }}</div> <div class="bg-black text-white rounded font-bold">{{ $record['position'] }}</div>
</div> </div>
<div class="w-18 font-stretch-ultra-condensed"> <div class="w-18 font-stretch-ultra-condensed">
@@ -72,4 +71,4 @@
<x-phosphor-dots-six-vertical class="h-5 w-5" /> <x-phosphor-dots-six-vertical class="h-5 w-5" />
</div> </div>
</div> </div>
@endif @endif
@@ -1,13 +1,13 @@
@php @php
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
@endphp @endphp
<div class="grid grid-cols-3 gap-3"> <div class="w-full flex flex-row gap-3">
<div class="dispatcher-board-root"> <div class="dispatcher-board-root w-2xl min-w-2xl">
{{ $this->table }} {{ $this->table }}
</div> </div>
<div class="col-span-2"> <div class="w-full">
<div class="rounded col-span-5 grid grid-cols-7 grid-rows-5 p-5 gap-2 bg-cover bg-center bg-no-repeat aspect-7/5" <div class="relative top-16 rounded col-span-5 grid grid-cols-7 grid-rows-5 p-5 gap-2 bg-cover bg-center bg-no-repeat aspect-7/5"
style="background-image: url({{ asset('images/soccerfield-middle.jpg') }});"> style="background-image: url({{ asset('images/soccerfield-cleand.jpg') }});">
@foreach ($beschriftung as $boxNumber => $benennung) @foreach ($beschriftung as $boxNumber => $benennung)
@if ($benennung) @if ($benennung)
<div x-data="{ isOver: false }" @dragover.prevent="isOver = true" @dragenter.prevent="isOver = true" <div x-data="{ isOver: false }" @dragover.prevent="isOver = true" @dragenter.prevent="isOver = true"
@@ -24,10 +24,10 @@
'border-gray-800 bg-white/30'" 'border-gray-800 bg-white/30'"
class="border rounded-xl transition-all pt-0 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 --> <!-- Box Header -->
<div <div class="grid grid-cols-6 items-center p-1">
class="grid grid-cols-6 items-center border-b p-1">
<div></div> <div></div>
<div class="w-16 text-center mx-auto bg-black text-white p-1 text-xl font-black rounded col-span-4"> <div
class="w-16 text-center mx-auto bg-black text-white p-1 text-xl font-black rounded col-span-4">
{{ $benennung }} {{ $benennung }}
</div> </div>
@@ -39,7 +39,7 @@
<!-- Box Inhalt --> <!-- Box Inhalt -->
@if ($boxes[$boxNumber]) @if ($boxes[$boxNumber])
<div class="border bg-white p-2 m-2 rounded leading-5"> <div class=" bg-black text-white p-1 m-2 rounded leading-5">
{{ $boxes[$boxNumber]['name'] }} {{ $boxes[$boxNumber]['name'] }}
</div> </div>
@endif @endif