remove color in event history

This commit is contained in:
salam committed 2026-03-09 12:22:25 +01:00
1 parent 64fd59101d
commit 7094992931
2 files changed
+13 -14

No files matched your search

+10 -13
View File
@@ -51,8 +51,8 @@ class EncounterHistory extends Component implements HasSchemas
TextEntry::make('time')->formatStateUsing(function ($state) {
return Carbon::createFromTimestamp($state)->format('d. m. Y H:i');
}),
TextEntry::make('home.name')->color(fn ($state) => $state == $this->home ? 'primary' : 'warning'),
TextEntry::make('away.name')->color(fn ($state) => $state == $this->away ? 'warning' : 'primary'),
TextEntry::make('home.name'),
TextEntry::make('away.name'),
TextEntry::make('ss'),
]),
]),
@@ -72,8 +72,8 @@ class EncounterHistory extends Component implements HasSchemas
TextEntry::make('time')->formatStateUsing(function ($state) {
return Carbon::createFromTimestamp($state)->format('d. m. Y H:i');
}),
TextEntry::make('home.name')->color(fn ($state) => $state == $this->home ? 'primary' : 'warning'),
TextEntry::make('away.name')->color(fn ($state) => $state == $this->home ? 'primary' : 'warning'),
TextEntry::make('home.name'),
TextEntry::make('away.name'),
TextEntry::make('ss'),
]),
]),
@@ -93,8 +93,8 @@ class EncounterHistory extends Component implements HasSchemas
TextEntry::make('time')->formatStateUsing(function ($state) {
return Carbon::createFromTimestamp($state)->format('d. m. Y H:i');
}),
TextEntry::make('home.name')->color(fn ($state) => $state == $this->away ? 'warning' : 'primary'),
TextEntry::make('away.name')->color(fn ($state) => $state == $this->away ? 'warning' : 'primary'),
TextEntry::make('home.name'),
TextEntry::make('away.name'),
TextEntry::make('ss'),
]),
]),
@@ -102,9 +102,11 @@ class EncounterHistory extends Component implements HasSchemas
]);
}
public function mount($betsapi_id)
public function mount($betsapi_id, $home, $away)
{
$this->betsapi_id = $betsapi_id;
$this->home = $home;
$this->away = $away;
}
public function getHome()
@@ -119,11 +121,6 @@ class EncounterHistory extends Component implements HasSchemas
public function getData()
{
$res = Http::get('https://api.b365api.com/v1/event/history?token='.config('env.betsapi_token').'&event_id='.$this->betsapi_id)->json();
$this->home = $res['results']['h2h']['0']['home']['name'];
$this->away = $res['results']['h2h']['0']['away']['name'];
return $res;
return Http::get('https://api.b365api.com/v1/event/history?token='.config('env.betsapi_token').'&event_id='.$this->betsapi_id)->json();
}
}
@@ -14,6 +14,7 @@
@endif
<div>{{ $record->home?->name }}</div>
</div>
{{-- <div class="text-gray-600 dark:!text-gray-400 text-xs">{{ $record->group?->name }}</div> --}}
</div>
@else
<div {{ $getExtraAttributeBag() }} class="w-full">
@@ -33,6 +34,7 @@
{{ $record->away?->name }}
</div>
</div>
{{-- <div class="text-gray-600 dark:!text-gray-400 text-xs">{{ $record->group?->name }}</div> --}}
</div>
@endif
@@ -42,7 +44,7 @@
<x-filament::icon-button icon="phosphor-info" color="gray" size="sm"
tooltip="Encounter History" />
</x-slot>
@livewire('encounter-history', ['betsapi_id' => $record->betsapi_id])
@livewire('encounter-history', ['betsapi_id' => $record->betsapi_id, 'home' => $record->home->name, 'away' => $record->away->name])
</x-filament::modal>
@endif
</div>