wip
This commit is contained in:
1 parent
77eaea5631
commit
6ecee8635a
2 files changed
+43
-15
No files matched your search
@@ -71,11 +71,28 @@ class PlayerPropsDrop extends Widget
|
||||
$this->lineup = $this->lineUpMap[$this->activeLineUp];
|
||||
}
|
||||
|
||||
#[On('match-update')]
|
||||
public function matchUpdate(int $match_id)
|
||||
#[On('clear-all')]
|
||||
public function clearAll()
|
||||
{
|
||||
$this->match_id = $match_id;
|
||||
$this->loadPlacement();
|
||||
$this->team_name = '';
|
||||
$this->match_id = 0;
|
||||
for ($i = 1; $i <= 35; $i++) {
|
||||
$this->boxes[$i] = [];
|
||||
}
|
||||
$this->players = [];
|
||||
$this->dispatch('update-players', players: $this->players);
|
||||
}
|
||||
|
||||
#[On('match-update')]
|
||||
public function matchUpdate(?int $match_id)
|
||||
{
|
||||
$this->clearResultTable();
|
||||
$this->players = [];
|
||||
if ($match_id) {
|
||||
$this->match_id = $match_id;
|
||||
} else {
|
||||
$this->team_name = '';
|
||||
}
|
||||
}
|
||||
|
||||
#[On('team-update')]
|
||||
@@ -234,10 +251,13 @@ class PlayerPropsDrop extends Widget
|
||||
|
||||
public function clearResultTable(): void
|
||||
{
|
||||
|
||||
for ($i = 1; $i <= 35; $i++) {
|
||||
$this->boxes[$i] = [];
|
||||
}
|
||||
|
||||
foreach ($this->players as $k => $record) {
|
||||
// $this->players[$k] = [];
|
||||
$this->players[$k]['active'] = 0;
|
||||
$this->players[$k]['gls'] = '';
|
||||
$this->players[$k]['fls'] = '';
|
||||
|
||||
Reference in new issue
Block a user