popup and grapper wip
This commit is contained in:
1 parent
a3c9f16550
commit
c9588f39b6
18 files changed
+656
-156248
No files matched your search
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Tables\Columns;
|
||||
|
||||
use App\Models\Odds3way;
|
||||
use Filament\Tables\Columns\Column;
|
||||
|
||||
class Columns3way extends Column
|
||||
{
|
||||
protected string $view = 'filament.tables.columns.columns_3way';
|
||||
|
||||
protected ?array $multiline;
|
||||
|
||||
protected ?array $fumetto;
|
||||
|
||||
public function loadData($record, $multiline_client)
|
||||
{
|
||||
|
||||
$res = Odds3way::with('bookmaker')->where('event_id', $record->id)->get();
|
||||
|
||||
$this->fumetto = [];
|
||||
|
||||
$this->multiline = [];
|
||||
|
||||
foreach ($res as $item) {
|
||||
|
||||
$this->fumetto[] = $item;
|
||||
foreach ($multiline_client as $slot => $bookmaker) {
|
||||
if ($item->bookmaker_id == $bookmaker->bookmaker_id) {
|
||||
$this->multiline[$slot] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// $this->multiline = [];
|
||||
|
||||
// foreach ($multiline_client as $slot => $bookmaker) {
|
||||
|
||||
// $open = true;
|
||||
|
||||
// foreach ($this->fumetto as $item) {
|
||||
// if ($item['bookmaker_id'] == $bookmaker->bookmaker_id) {
|
||||
// $this->multiline[$slot] = $item;
|
||||
// $open = false;
|
||||
// }
|
||||
// }
|
||||
// if ($open) {
|
||||
// $item = new stdClass;
|
||||
// $item['icon'] = $bookmaker->bookmaker->icon;
|
||||
// $item['h3w'] = 0;
|
||||
// $item['d3w'] = 0;
|
||||
// $item['a3w'] = 0;
|
||||
// $item['margin'] = 0;
|
||||
// $item['bookmaker_id'] = $bookmaker->bookmaker_id;
|
||||
// $this->multiline[$slot] = $item;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public function getMultilines(): ?array
|
||||
{
|
||||
return $this->multiline;
|
||||
}
|
||||
|
||||
public function getFumetto()
|
||||
{
|
||||
return $this->fumetto;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user