wip
This commit is contained in:
1 parent
4480680c8d
commit
d08613c54c
9 files changed
+91
-111
No files matched your search
@@ -28,10 +28,7 @@ use Filament\Forms\Components\Hidden;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Schemas\Components\FusedGroup;
|
||||
use Filament\Schemas\Components\Tabs;
|
||||
use Filament\Schemas\Components\Tabs\Tab;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Support\Enums\VerticalAlignment;
|
||||
use Filament\Support\Enums\Width;
|
||||
@@ -44,7 +41,6 @@ use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class EventsTable
|
||||
{
|
||||
@@ -614,36 +610,6 @@ class EventsTable
|
||||
EventUserStar::insert(['event_id' => $record->id, 'user_id' => auth()->user()->id]);
|
||||
}
|
||||
}),
|
||||
Action::make('view_details')
|
||||
->iconButton()
|
||||
->color('gray')
|
||||
->tooltip('Encounter history')
|
||||
->label('Encounter history')
|
||||
->icon('phosphor-info')
|
||||
->modalWidth(Width::ThreeExtraLarge)
|
||||
->action(function ($record) {
|
||||
$data = Http::get('https://api.b365api.com/v1/event/history?token=36152-aeTRNnZxSPUwGe&event_id='.$record->id)->json();
|
||||
dd($data);
|
||||
})
|
||||
->infolist(fn ($record) => [
|
||||
Tabs::make('Tabs')
|
||||
->tabs([
|
||||
Tab::make($record->home->name.' vs '.$record->away->name)
|
||||
->schema([
|
||||
TextEntry::make('home.name'),
|
||||
]),
|
||||
Tab::make($record->home->name)
|
||||
->schema([
|
||||
// ...
|
||||
]),
|
||||
Tab::make($record->away->name)
|
||||
->schema([
|
||||
// ...
|
||||
]),
|
||||
]),
|
||||
])
|
||||
->modalSubmitAction(false)
|
||||
->modalCancelActionLabel('Close'),
|
||||
Action::make('event_note')
|
||||
->modalIcon('phosphor-note-pencil-duotone')
|
||||
->modalWidth(Width::Large)
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Filament\Actions\Concerns\InteractsWithActions;
|
||||
use Filament\Actions\Contracts\HasActions;
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Schemas\Components\Tabs;
|
||||
use Filament\Schemas\Components\Tabs\Tab;
|
||||
use Filament\Schemas\Concerns\InteractsWithSchemas;
|
||||
use Filament\Schemas\Contracts\HasSchemas;
|
||||
use Filament\Schemas\Schema;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Livewire\Component;
|
||||
|
||||
class EncounterHistory extends Component implements HasActions, HasSchemas
|
||||
{
|
||||
use InteractsWithActions;
|
||||
use InteractsWithSchemas;
|
||||
|
||||
public function content(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->record($this->event)
|
||||
->components([
|
||||
Tabs::make('Tabs')
|
||||
->tabs([
|
||||
Tab::make('Direct')
|
||||
->schema([
|
||||
TextEntry::make('home.name'),
|
||||
]),
|
||||
Tab::make('Home')
|
||||
->schema([
|
||||
// ...
|
||||
]),
|
||||
Tab::make('Away')
|
||||
->schema([
|
||||
// ...
|
||||
]),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public function render(): View
|
||||
{
|
||||
return view('livewire.encounter-history');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Filament\Actions\Concerns\InteractsWithActions;
|
||||
use Filament\Actions\Contracts\HasActions;
|
||||
use Filament\Infolists\Components\RepeatableEntry;
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Schemas\Components\Tabs;
|
||||
use Filament\Schemas\Components\Tabs\Tab;
|
||||
use Filament\Schemas\Concerns\InteractsWithSchemas;
|
||||
use Filament\Schemas\Contracts\HasSchemas;
|
||||
use Filament\Schemas\Schema;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Livewire\Component;
|
||||
|
||||
class EncounterHistroy extends Component implements HasActions, HasSchemas
|
||||
{
|
||||
use InteractsWithActions;
|
||||
use InteractsWithSchemas;
|
||||
|
||||
public $record;
|
||||
|
||||
public $history;
|
||||
|
||||
public function mount($record)
|
||||
{
|
||||
// $this->record = $record;
|
||||
|
||||
$this->record = Http::get('https://api.b365api.com/v1/event/history?token='.config('env.betsapi_token').'&event_id='.$record->betsapi_id)->json();
|
||||
}
|
||||
|
||||
public function eventInfolist(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->record($this->record)
|
||||
->components([
|
||||
RepeatableEntry::make('comments')
|
||||
->schema([
|
||||
TextEntry::make('results'),
|
||||
])
|
||||
->columns(2),
|
||||
// Tabs::make('Tabs')
|
||||
// ->tabs([
|
||||
// Tab::make($this->record->home->name.' vs '.$this->record->away->name)
|
||||
// ->schema([
|
||||
// TextEntry::make('home.name'),
|
||||
// ]),
|
||||
// Tab::make($this->record->home->name)
|
||||
// ->schema([
|
||||
// TextEntry::make($this->history->result->h2h->name),
|
||||
// ]),
|
||||
// Tab::make($this->record->away->name)
|
||||
// ->schema([
|
||||
// // ...
|
||||
// ]),
|
||||
// ])->vertical(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.encounter-histroy');
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class PartnerProgramm extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.partner-programm');
|
||||
}
|
||||
}
|
||||
Generated
+12
-12
@@ -9607,16 +9607,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v4.0.10",
|
||||
"version": "v4.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fruitcake/laravel-debugbar.git",
|
||||
"reference": "96afd5efc93c2cb3140df356893381296259695b"
|
||||
"reference": "5cbe5fc76054723ab9501917b7d252cdafb5ad5d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fruitcake/laravel-debugbar/zipball/96afd5efc93c2cb3140df356893381296259695b",
|
||||
"reference": "96afd5efc93c2cb3140df356893381296259695b",
|
||||
"url": "https://api.github.com/repos/fruitcake/laravel-debugbar/zipball/5cbe5fc76054723ab9501917b7d252cdafb5ad5d",
|
||||
"reference": "5cbe5fc76054723ab9501917b7d252cdafb5ad5d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9624,7 +9624,7 @@
|
||||
"illuminate/session": "^11|^12|^13.0",
|
||||
"illuminate/support": "^11|^12|^13.0",
|
||||
"php": "^8.2",
|
||||
"php-debugbar/php-debugbar": "^3.3.1",
|
||||
"php-debugbar/php-debugbar": "^3.5",
|
||||
"php-debugbar/symfony-bridge": "^1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -9635,7 +9635,7 @@
|
||||
"laravel/telescope": "^5.16",
|
||||
"livewire/livewire": "^3.7|^4",
|
||||
"mockery/mockery": "^1.3.3",
|
||||
"orchestra/testbench-dusk": "^9|^10",
|
||||
"orchestra/testbench-dusk": "^9|^10|^11",
|
||||
"php-debugbar/twig-bridge": "^2.0",
|
||||
"phpstan/phpstan-phpunit": "^2",
|
||||
"phpstan/phpstan-strict-rules": "^2.0",
|
||||
@@ -9653,7 +9653,7 @@
|
||||
]
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "4.0-dev"
|
||||
"dev-master": "4.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -9690,7 +9690,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/fruitcake/laravel-debugbar/issues",
|
||||
"source": "https://github.com/fruitcake/laravel-debugbar/tree/v4.0.10"
|
||||
"source": "https://github.com/fruitcake/laravel-debugbar/tree/v4.1.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -9702,7 +9702,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-02-26T11:45:48+00:00"
|
||||
"time": "2026-03-07T19:01:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brianium/paratest",
|
||||
@@ -13404,12 +13404,12 @@
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"stability-flags": {},
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^8.3"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.6.0"
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.9.0"
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
<div class="flex gap-3 items-center">
|
||||
@if ($record->event_bookmaker?->is_swopped)
|
||||
<div {{ $getExtraAttributeBag() }}>
|
||||
<div class="flex flex-1 gap-1 flex-wrap items-center">
|
||||
@@ -36,3 +37,12 @@
|
||||
{{-- <div class="text-gray-600 dark:!text-gray-400 text-xs">{{ $record->group?->name }}</div> --}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<x-filament::modal width="5xl">
|
||||
<x-slot name="trigger">
|
||||
<x-filament::icon-button icon="phosphor-info" color="gray" size="sm" tooltip="Encounter History" />
|
||||
</x-slot>
|
||||
|
||||
@livewire('encounter-histroy', ['record' => $record])
|
||||
</x-filament::modal>
|
||||
</div>
|
||||
@@ -1,3 +0,0 @@
|
||||
<div>
|
||||
{{ $this->content }}
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{ $this->eventInfolist }}
|
||||
</div>
|
||||
Reference in new issue
Block a user