This commit is contained in:
salam committed 2026-09-08 10:22:46 +02:00
1 parent 75f9a622d3
commit eedd4b0238
1 file changed
+8 -8
+8 -8
View File
@@ -36,7 +36,7 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
public array $activeBoxes = [2 => 'DR', 4 => 'MR', 6 => 'RW', 9 => 'DC', 10 => 'DM', 11 => 'MC', 12 => 'AM', 15 => 'SW', 16 => 'DC', 17 => 'DM', 18 => 'MC', 19 => 'AM', 20 => 'SM', 21 => 'ST', 23 => 'DC', 24 => 'DM', 25 => 'MC', 26 => 'AM', 30 => 'DL', 32 => 'ML', 34 => 'LM']; public array $activeBoxes = [2 => 'DR', 4 => 'MR', 6 => 'RW', 9 => 'DC', 10 => 'DM', 11 => 'MC', 12 => 'AM', 15 => 'SW', 16 => 'DC', 17 => 'DM', 18 => 'MC', 19 => 'AM', 20 => 'SM', 21 => 'ST', 23 => 'DC', 24 => 'DM', 25 => 'MC', 26 => 'AM', 30 => 'DL', 32 => 'ML', 34 => 'LM'];
public bool $downloadDisabled = true; public bool $copyDisabled = true;
public bool $calculationDisabled = true; public bool $calculationDisabled = true;
@@ -95,10 +95,10 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
->icon('phosphor-calculator') ->icon('phosphor-calculator')
->disabled($this->calculationDisabled) ->disabled($this->calculationDisabled)
->action(fn() => $this->calculateAspg()), ->action(fn() => $this->calculateAspg()),
Action::make('download') Action::make('copy')
->icon('phosphor-download') ->icon('phosphor-copy')
->disabled($this->downloadDisabled) ->disabled($this->copyDisabled)
->action(fn() => $this->downloadResult()), ->action(fn() => $this->copyResult()),
]) ])
/** /**
* WICHTIG: Da Filament v5 zwingend eine Query braucht, nutzen wir ein * WICHTIG: Da Filament v5 zwingend eine Query braucht, nutzen wir ein
@@ -187,7 +187,7 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
public function calculateAspg(): void public function calculateAspg(): void
{ {
$this->downloadDisabled = false; $this->copyDisabled = false;
} }
public function clearAll(): void public function clearAll(): void
@@ -200,11 +200,11 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
$this->sourceRecords[$k]['active'] = 0; $this->sourceRecords[$k]['active'] = 0;
} }
$this->downloadDisabled = true; $this->copyDisabled = true;
$this->calculationDisabled = true; $this->calculationDisabled = true;
} }
public function downloadResult() public function copyResult()
{ {
return; return;