wip
This commit is contained in:
1 parent
ca102d3e51
commit
121a16bd79
4 files changed
+8
-6
No files matched your search
@@ -103,7 +103,7 @@ class PlayerProps extends Page implements HasForms
|
|||||||
$this->sliderValue(),
|
$this->sliderValue(),
|
||||||
$this->selectSeason(),
|
$this->selectSeason(),
|
||||||
$this->dateSplitter(),
|
$this->dateSplitter(),
|
||||||
View::make('components.form-lockout'),
|
View::make('components.calculation-spinner'),
|
||||||
])
|
])
|
||||||
->extraAttributes([
|
->extraAttributes([
|
||||||
'wire:loading.class' => 'opacity-60 pointer-events-none transition-opacity',
|
'wire:loading.class' => 'opacity-60 pointer-events-none transition-opacity',
|
||||||
@@ -325,11 +325,11 @@ class PlayerProps extends Page implements HasForms
|
|||||||
$set('mid', null);
|
$set('mid', null);
|
||||||
$set('tid', null);
|
$set('tid', null);
|
||||||
$this->dispatch('clear-all');
|
$this->dispatch('clear-all');
|
||||||
$this->setSeason($state);
|
$this->setSeasonMode($state);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setSeason(string $country_id)
|
public function setSeasonMode(string $country_id)
|
||||||
{
|
{
|
||||||
$this->season_mode = SofaScoreCategory::where('id', $country_id)->value('season_mode');
|
$this->season_mode = SofaScoreCategory::where('id', $country_id)->value('season_mode');
|
||||||
$this->dispatch('season_mode-update', season_mode: $this->season_mode);
|
$this->dispatch('season_mode-update', season_mode: $this->season_mode);
|
||||||
@@ -410,7 +410,8 @@ class PlayerProps extends Page implements HasForms
|
|||||||
})
|
})
|
||||||
->afterStateUpdated(function (callable $set, $state) {
|
->afterStateUpdated(function (callable $set, $state) {
|
||||||
$set('ss_player_id', null);
|
$set('ss_player_id', null);
|
||||||
$this->dispatch('season_selected-update', season_selected: $state);
|
// cat all values in array to strings
|
||||||
|
$this->dispatch('season_selected-update', season_selected: array_map('strval', $state));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ class PlayerPropsDrop extends Widget
|
|||||||
public function setSeasonSelected(array $season_selected)
|
public function setSeasonSelected(array $season_selected)
|
||||||
{
|
{
|
||||||
$this->season_selected = $season_selected;
|
$this->season_selected = $season_selected;
|
||||||
|
|
||||||
if ($this->player_on_field_counter >= 10) {
|
if ($this->player_on_field_counter >= 10) {
|
||||||
$this->calculateAspg();
|
$this->calculateAspg();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use App\Models\StatistikoDetail;
|
|||||||
use App\Models\StatistikoEvent;
|
use App\Models\StatistikoEvent;
|
||||||
use App\Models\StatistikoPlayer;
|
use App\Models\StatistikoPlayer;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
trait PlayerQuery
|
trait PlayerQuery
|
||||||
{
|
{
|
||||||
@@ -21,10 +22,9 @@ trait PlayerQuery
|
|||||||
case 'season':
|
case 'season':
|
||||||
if (! $this->season_selected) {
|
if (! $this->season_selected) {
|
||||||
$this->season_selected = $this->getCurrentSeason();
|
$this->season_selected = $this->getCurrentSeason();
|
||||||
// dd($this->liga_id, $this->season_selected);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log::debug('season_selected', [$this->liga_id, $this->season_selected]);
|
Log::debug('season_selected', $this->season_selected);
|
||||||
|
|
||||||
$matches_ids = match ($part) {
|
$matches_ids = match ($part) {
|
||||||
1 => StatistikoEvent::where('league_id', $this->liga_id)
|
1 => StatistikoEvent::where('league_id', $this->liga_id)
|
||||||
|
|||||||
File renamed without changes.
Reference in new issue
Block a user