Files
nuhodds_fi4/resources/views/filament/tables/columns/fumetto/fumetto_ml.blade.php
T
2026-01-17 14:41:31 +01:00

55 lines
2.0 KiB
PHP

@if ($hasData())
<div class="mx-3 my-auto">
<template x-ref="template_2way_{{ $record->id }}">
<div class="grid grid-cols-9 grid-rows-5 gap-1 m-5 z-10 text-xs text-center">
@include('filament.tables.columns.fumetto-multiline.label', ['labels' => ['Home', 'Away']])
@php
$max = $getMax();
$min = $getMin();
@endphp
@foreach ($record->odds_2ways as $i => $item)
@include('filament.tables.columns.fumetto-multiline.bkm', [
'bookmaker_id' => $item->bookmaker_id,
'icon' => $item->bookmaker->icon ?? '',
])
@include('filament.tables.columns.fumetto-multiline.odds', [
'odd' => $item->h2w,
'dec' => 2,
'max' => $item->h2w == $max['h2w'] ? 1 : 0,
'min' => $item->h2w == $min['h2w'] ? 1 : 0,
])
@include('filament.tables.columns.fumetto-multiline.odds', [
'odd' => $item->a2w,
'dec' => 2,
'max' => $item->a2w == $max['a2w'] ? 1 : 0,
'min' => $item->a2w == $min['a2w'] ? 1 : 0,
])
@include('filament.tables.columns.fumetto-multiline.odds', [
'odd' => $item->margin,
'dec' => 1,
'max' => false,
'min' => false,
])
@if($i %2 == 0)
<div></div>
@endif
@endforeach
</div>
</template>
<x-filament::icon-button icon="phosphor-chat-centered-text" color="gray"
x-tooltip.html="{
content: () => $refs.template_2way_{{ $record->id }}.innerHTML,
allowHTML: true,
theme: $store.theme,
appendTo: $root
}" />
</div>
@endif