@props([
'match',
'type' => 'past',
'filterType' => 'one-zero',
'showStreak' => true,
'showResult' => true,
'showCorrectScoreOdds' => true,
'correctScoreLabels' => ['1 1:0'] // Array of labels to display
])
@php
$isPast = $type === 'past';
$dateFormatted = \Carbon\Carbon::parse($match->time->starting_at->date_time)->format('Y.m.d');
$megfelelt = $match->megfelelt ?? null;
$hanyadik = $match->hanyadik ?? null;
$matchingOddsType = $match->matching_odds_type ?? null; // For 2-1 filter: '1_2_1' or '2_1_2'
// Determine which odds property to check based on filter type
$oddsPropertyMap = [
'one-zero' => 'one_zero_odds',
'one-one' => 'one_one_odds',
'two-one' => 'two_one_odds',
'draw' => 'draw_odds',
];
$oddsProperty = $oddsPropertyMap[$filterType] ?? 'one_zero_odds';
$hasOdds = isset($match->$oddsProperty);
@endphp
{{-- Home Team --}}
{{ $dateFormatted }}
{{ $match->localTeam->data->name }}
@if(isset($match->localTeam->data->logo_path))
@endif
Megfelelt?:
@if($isPast)
@else
@endif
|
{{-- Away Team --}}
@if($showStreak && $isPast)
@if($hanyadik) Sorozat: @endif {{ $hanyadik ?? 'Nincs a sorozatban' }}
@endif
{{ $match->visitorTeam->data->name }}
@if(isset($match->visitorTeam->data->logo_path))
@endif
|
{{-- Megfelelt (desktop) --}}
@if($isPast)
@else
@endif
|
{{-- Streak (desktop, past only) --}}
@if($showStreak && $isPast)
@if($hanyadik)
{{ $hanyadik }}
@elseif($megfelelt === 2)
NULLÁZTA A SOROZATOT
@else
Nincs a sorozatban
@endif
|
@endif
{{-- Result (past only) --}}
@if($showResult && $isPast)
{{ $match->scores->localteam_score ?? 0 }}-{{ $match->scores->visitorteam_score ?? 0 }} |
@endif
{{-- Round --}}
{{ $match->round->data->name ?? '-' }} |
{{-- Date/Time --}}
{{ $match->time->starting_at->date_time }} |
{{-- Odds --}}
|
{{-- Correct Score Odds --}}
@if($showCorrectScoreOdds)
|
@endif