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();
}
}