tooltip fumetto refresh wip
This commit is contained in:
1 parent
531b4c0dc9
commit
a6fc328669
18 files changed
+118
-34
No files matched your search
@@ -16,7 +16,7 @@ class Column3way extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class Column3wayHt extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnDc extends Column
|
|||||||
|
|
||||||
protected ?array $bookmakers;
|
protected ?array $bookmakers;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnDnb extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnGgng extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnMl extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnMlS1 extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnPoint extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnPointQ1 extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnTotal extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnTotalHt extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnTotalQ1 extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ColumnTq extends Column
|
|||||||
|
|
||||||
protected $act;
|
protected $act;
|
||||||
|
|
||||||
protected ?int $has_data;
|
protected ?bool $has_data;
|
||||||
|
|
||||||
public function bookmakers(?array $bookmakers): static
|
public function bookmakers(?array $bookmakers): static
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,20 +1,92 @@
|
|||||||
@php
|
@php
|
||||||
$loadData($record);
|
$loadData($record);
|
||||||
$act = $getAct();
|
$act = $getAct();
|
||||||
|
$max = $getMax();
|
||||||
|
$min = $getMin();
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if ($hasData())
|
@if ($hasData())
|
||||||
|
|
||||||
@include('filament.tables.columns.fumetto.fumetto_1x2')
|
<div class="mx-3 my-auto">
|
||||||
|
<template x-ref="template_1x2_{{ $record->id }}">
|
||||||
|
|
||||||
|
@if ($hasData() > 9)
|
||||||
|
<div class="grid grid-cols-13 gap-2 m-5 z-10 text-xs text-center">
|
||||||
|
@include('filament.tables.columns.fumetto-multiline.label', [
|
||||||
|
'labels' => ['1', 'X', '2'],
|
||||||
|
'twice' => true,
|
||||||
|
])
|
||||||
|
@else
|
||||||
|
<div class="grid grid-cols-6 gap-2 m-5 z-10 text-xs text-center">
|
||||||
|
@include('filament.tables.columns.fumetto-multiline.label', [
|
||||||
|
'labels' => ['1', 'X', '2'],
|
||||||
|
'twice' => false,
|
||||||
|
])
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@foreach ($record->odds_3ways 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->h3w,
|
||||||
|
'dec' => 2,
|
||||||
|
'max' => $item->h3w >= $max['h3w'] ? 1 : 0,
|
||||||
|
'min' => $item->h3w <= $min['h3w'] ? 1 : 0,
|
||||||
|
])
|
||||||
|
|
||||||
|
@include('filament.tables.columns.fumetto-multiline.odds', [
|
||||||
|
'odd' => $item->d3w,
|
||||||
|
'dec' => 2,
|
||||||
|
'max' => $item->d3w >= $max['d3w'] ? 1 : 0,
|
||||||
|
'min' => $item->d3w <= $min['d3w'] ? 1 : 0,
|
||||||
|
])
|
||||||
|
|
||||||
|
@include('filament.tables.columns.fumetto-multiline.odds', [
|
||||||
|
'odd' => $item->a3w,
|
||||||
|
'dec' => 2,
|
||||||
|
'max' => $item->a3w >= $max['a3w'] ? 1 : 0,
|
||||||
|
'min' => $item->a3w <= $min['a3w'] ? 1 : 0,
|
||||||
|
])
|
||||||
|
|
||||||
|
@include('filament.tables.columns.fumetto-multiline.odds', [
|
||||||
|
'odd' => $item->margin,
|
||||||
|
'dec' => 1,
|
||||||
|
'max' => false,
|
||||||
|
'min' => false,
|
||||||
|
])
|
||||||
|
@include('filament.tables.columns.fumetto-multiline.lastcheck', [
|
||||||
|
'lastcheck' => $item->updated_at,
|
||||||
|
])
|
||||||
|
@if ($i % 2 == 0 && $hasData() > 9)
|
||||||
|
<div></div>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<x-filament::icon-button icon="phosphor-chat-centered-text" color="gray"
|
||||||
|
x-tooltip.html="{
|
||||||
|
content: () => $refs.template_1x2_{{ $record->id }}.innerHTML,
|
||||||
|
allowHTML: true,
|
||||||
|
theme: $store.theme,
|
||||||
|
appendTo: $root,
|
||||||
|
interactive: true,
|
||||||
|
}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5 gap-1" style="width: 225px;">
|
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5 gap-1" style="width: 225px;">
|
||||||
|
|
||||||
@include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']])
|
@include('filament.tables.columns.multiline.label', [
|
||||||
|
'labels' => ['1', 'X', '2'],
|
||||||
|
'twice' => false,
|
||||||
|
])
|
||||||
|
|
||||||
@foreach ($getBookmaker() as $bookmaker_id)
|
@foreach ($getBookmaker() as $bookmaker_id)
|
||||||
@foreach ($record->odds_3ways as $item)
|
@foreach ($record->odds_3ways as $item)
|
||||||
@if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots()))
|
@if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots()))
|
||||||
|
|
||||||
@include('filament.tables.columns.multiline.bkm', [
|
@include('filament.tables.columns.multiline.bkm', [
|
||||||
'bookmaker_id' => $item->bookmaker_id,
|
'bookmaker_id' => $item->bookmaker_id,
|
||||||
'icon' => $item->bookmaker->icon ?? '',
|
'icon' => $item->bookmaker->icon ?? '',
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
<div>{{ $label }}</div>
|
<div>{{ $label }}</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
<div>Margin</div>
|
<div>Margin</div>
|
||||||
<div>Lastcheck</div>
|
<div>Check</div>
|
||||||
|
|
||||||
@if($twice)
|
@if ($twice)
|
||||||
|
|
||||||
<div></div>
|
<div></div>
|
||||||
<div>Book</div>
|
<div>Book</div>
|
||||||
@foreach ($labels as $label)
|
@foreach ($labels as $label)
|
||||||
<div>{{ $label }}</div>
|
<div>{{ $label }}</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
<div>Margin</div>
|
<div>Margin</div>
|
||||||
<div>Lastcheck</div>
|
<div>Check</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
@@ -1,5 +1,18 @@
|
|||||||
@php
|
@php
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
$lastcheck_5min = Carbon::createFromDate($lastcheck)->addMinutes(5);
|
||||||
|
$lastcheck_30min = Carbon::createFromDate($lastcheck)->addMinutes(30);
|
||||||
|
$now = Carbon::now();
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="text-nowrap text-xs">{{Carbon::createFromDate($lastcheck)->format('d.m H:i')}}</div>
|
@if ($lastcheck_30min->lt($now))
|
||||||
|
<div class="text-xs text-nowrap bg-red-600/20 rounded shadow">
|
||||||
|
{{ Carbon::createFromDate($lastcheck)->format('H:i') }}
|
||||||
|
</div>
|
||||||
|
@elseif ($lastcheck_5min->lt($now))
|
||||||
|
<div class="text-xs text-nowrap bg-blue-600/20 rounded">
|
||||||
|
{{ Carbon::createFromDate($lastcheck)->format('H:i') }}
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="text-xs text-nowrap">{{ Carbon::createFromDate($lastcheck)->format('H:i') }}</div>
|
||||||
|
@endif
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
<div class="mb-0.5 ml-0.5
|
<div
|
||||||
|
class="mb-0.5 ml-0.5
|
||||||
|
|
||||||
@if($max)
|
@if ($max) bg-green-600/25 rounded shadow @endif
|
||||||
bg-green-600/25 rounded
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if($min)
|
@if ($min) bg-blue-600/25 rounded shadow @endif
|
||||||
bg-blue-600/25 rounded
|
|
||||||
@endif
|
|
||||||
|
|
||||||
">
|
">
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
])
|
])
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
<div>{{ $time }}</div>
|
||||||
|
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$max = $getMax();
|
$max = $getMax();
|
||||||
@@ -71,7 +73,7 @@
|
|||||||
allowHTML: true,
|
allowHTML: true,
|
||||||
theme: $store.theme,
|
theme: $store.theme,
|
||||||
appendTo: $root,
|
appendTo: $root,
|
||||||
interactive: true
|
interactive: true,
|
||||||
}" />
|
}" />
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
Reference in new issue
Block a user