wip
This commit is contained in:
1 parent
4480680c8d
commit
d08613c54c
9 files changed
+119
-139
No files matched your search
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user